generated-configure.sh revision 635:52741ab7c601
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604JOBS
605MEMORY_SIZE
606NUM_CORES
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
644MACOSX_VERSION_MIN
645PACKAGE_PATH
646LEGACY_EXTRA_LDFLAGS
647LEGACY_EXTRA_CXXFLAGS
648LEGACY_EXTRA_CFLAGS
649CXX_FLAG_DEPS
650C_FLAG_DEPS
651CXX_O_FLAG_NONE
652CXX_O_FLAG_NORM
653CXX_O_FLAG_HI
654CXX_O_FLAG_HIGHEST
655C_O_FLAG_NONE
656C_O_FLAG_NORM
657C_O_FLAG_HI
658C_O_FLAG_HIGHEST
659POST_MCS_CMD
660POST_STRIP_CMD
661SET_EXECUTABLE_ORIGIN
662SET_SHARED_LIBRARY_ORIGIN
663CXX_FLAG_REORDER
664C_FLAG_REORDER
665SET_SHARED_LIBRARY_MAPFILE
666SET_SHARED_LIBRARY_NAME
667SHARED_LIBRARY_FLAGS
668EXE_SUFFIX
669STATIC_LIBRARY_SUFFIX
670SHARED_LIBRARY_SUFFIX
671LIBRARY_PREFIX
672STATIC_LIBRARY
673SHARED_LIBRARY
674OBJ_SUFFIX
675LIPO
676ac_ct_OBJDUMP
677OBJDUMP
678ac_ct_OBJCOPY
679OBJCOPY
680MCS
681STRIP
682NM
683AS
684CXXCPP
685CPP
686COMPILER_TYPE
687RC_FLAGS
688DUMPBIN
689WINAR
690HOTSPOT_RC
691HOTSPOT_MT
692RC
693MT
694WINLD
695HOTSPOT_LD
696HOTSPOT_CXX
697ARFLAGS
698AR
699LDEXECXX
700LDCXX
701LDEXE
702LD
703ac_ct_OBJC
704OBJCFLAGS
705OBJC
706ac_ct_CXX
707CXXFLAGS
708CXX
709ac_ct_PROPER_COMPILER_CXX
710PROPER_COMPILER_CXX
711POTENTIAL_CXX
712TOOLS_DIR_CXX
713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720ac_ct_PROPER_COMPILER_CC
721PROPER_COMPILER_CC
722POTENTIAL_CC
723TOOLS_DIR_CC
724BUILD_LD
725BUILD_CXX
726BUILD_CC
727MSVCR_DLL
728DXSDK_INCLUDE_PATH
729DXSDK_LIB_PATH
730VS_PATH
731VS_LIB
732VS_INCLUDE
733CYGWIN_LINK
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738BUILD_HOTSPOT
739HOTSPOT_DIST
740BUILD_OUTPUT
741OVERRIDE_SRC_ROOT
742ADD_SRC_ROOT
743JDK_TOPDIR
744HOTSPOT_TOPDIR
745JAXWS_TOPDIR
746JAXP_TOPDIR
747CORBA_TOPDIR
748LANGTOOLS_TOPDIR
749BOOT_JDK_JVMARGS
750JAVAC_FLAGS
751BOOT_JDK_SOURCETARGET
752BOOT_JDK
753BOOT_TOOLSJAR
754BOOT_RTJAR
755JAVA_CHECK
756JAVAC_CHECK
757COOKED_BUILD_NUMBER
758JDK_VERSION
759COPYRIGHT_YEAR
760MACOSX_BUNDLE_ID_BASE
761MACOSX_BUNDLE_NAME_BASE
762COMPANY_NAME
763JDK_RC_PLATFORM_NAME
764PRODUCT_SUFFIX
765PRODUCT_NAME
766LAUNCHER_NAME
767MILESTONE
768JDK_BUILD_NUMBER
769JDK_UPDATE_VERSION
770JDK_MICRO_VERSION
771JDK_MINOR_VERSION
772JDK_MAJOR_VERSION
773USER_RELEASE_SUFFIX
774COMPRESS_JARS
775UNLIMITED_CRYPTO
776CACERTS_FILE
777TEST_IN_BUILD
778BUILD_HEADLESS
779SUPPORT_HEADFUL
780SUPPORT_HEADLESS
781BDEPS_FTP
782BDEPS_UNZIP
783OS_VERSION_MICRO
784OS_VERSION_MINOR
785OS_VERSION_MAJOR
786PKG_CONFIG
787TIME
788STAT
789HG
790READELF
791OTOOL
792LDD
793ZIP
794UNZIP
795FIND_DELETE
796MAKE
797CHECK_TOOLSDIR_MAKE
798CHECK_TOOLSDIR_GMAKE
799CHECK_MAKE
800CHECK_GMAKE
801PKGHANDLER
802OUTPUT_ROOT
803CONF_NAME
804SPEC
805BUILD_VARIANT_RELEASE
806DEBUG_CLASSFILES
807FASTDEBUG
808VARIANT
809DEBUG_LEVEL
810MACOSX_UNIVERSAL
811JVM_VARIANT_ZEROSHARK
812JVM_VARIANT_ZERO
813JVM_VARIANT_KERNEL
814JVM_VARIANT_MINIMAL1
815JVM_VARIANT_CLIENT
816JVM_VARIANT_SERVER
817JVM_VARIANTS
818JDK_VARIANT
819SET_OPENJDK
820BUILD_LOG_WRAPPER
821BUILD_LOG_PREVIOUS
822BUILD_LOG
823SYS_ROOT
824PATH_SEP
825SRC_ROOT
826DEFINE_CROSS_COMPILE_ARCH
827LP64
828OPENJDK_TARGET_OS_API_DIR
829OPENJDK_TARGET_CPU_JLI_CFLAGS
830OPENJDK_TARGET_CPU_OSARCH
831OPENJDK_TARGET_CPU_ISADIR
832OPENJDK_TARGET_CPU_LIBDIR
833OPENJDK_TARGET_CPU_LEGACY_LIB
834OPENJDK_TARGET_CPU_LEGACY
835REQUIRED_OS_VERSION
836REQUIRED_OS_NAME
837COMPILE_TYPE
838OPENJDK_TARGET_CPU_ENDIAN
839OPENJDK_TARGET_CPU_BITS
840OPENJDK_TARGET_CPU_ARCH
841OPENJDK_TARGET_CPU
842OPENJDK_TARGET_OS_API
843OPENJDK_TARGET_OS
844OPENJDK_BUILD_CPU_ENDIAN
845OPENJDK_BUILD_CPU_BITS
846OPENJDK_BUILD_CPU_ARCH
847OPENJDK_BUILD_CPU
848OPENJDK_BUILD_OS_API
849OPENJDK_BUILD_OS
850OPENJDK_BUILD_AUTOCONF_NAME
851OPENJDK_TARGET_AUTOCONF_NAME
852target_os
853target_vendor
854target_cpu
855target
856host_os
857host_vendor
858host_cpu
859host
860build_os
861build_vendor
862build_cpu
863build
864SETFILE
865DF
866READLINK
867CYGPATH
868NAWK
869SED
870FGREP
871EGREP
872GREP
873AWK
874XARGS
875WHICH
876WC
877UNIQ
878UNAME
879TR
880TOUCH
881TEE
882TAR
883TAIL
884SORT
885SH
886RM
887THEPWDCMD
888PRINTF
889MV
890MKTEMP
891MKDIR
892LS
893LN
894HEAD
895FIND
896FILE
897EXPR
898ECHO
899DIRNAME
900DIFF
901DATE
902CUT
903CPIO
904CP
905COMM
906CMP
907CHMOD
908CAT
909BASH
910BASENAME
911DATE_WHEN_CONFIGURED
912CONFIGURE_COMMAND_LINE
913CUSTOM_MAKE_DIR
914target_alias
915host_alias
916build_alias
917LIBS
918ECHO_T
919ECHO_N
920ECHO_C
921DEFS
922mandir
923localedir
924libdir
925psdir
926pdfdir
927dvidir
928htmldir
929infodir
930docdir
931oldincludedir
932includedir
933localstatedir
934sharedstatedir
935sysconfdir
936datadir
937datarootdir
938libexecdir
939sbindir
940bindir
941program_transform_name
942prefix
943exec_prefix
944PACKAGE_URL
945PACKAGE_BUGREPORT
946PACKAGE_STRING
947PACKAGE_VERSION
948PACKAGE_TARNAME
949PACKAGE_NAME
950PATH_SEPARATOR
951SHELL'
952ac_subst_files=''
953ac_user_opts='
954enable_option_checking
955with_custom_make_dir
956with_target_bits
957with_sys_root
958with_tools_dir
959with_devkit
960enable_openjdk_only
961with_jdk_variant
962with_jvm_variants
963enable_debug
964with_debug_level
965with_conf_name
966with_builddeps_conf
967with_builddeps_server
968with_builddeps_dir
969with_builddeps_group
970enable_headful
971enable_hotspot_test_in_build
972with_cacerts_file
973enable_unlimited_crypto
974with_milestone
975with_build_number
976with_user_release_suffix
977with_boot_jdk
978with_boot_jdk_jvmargs
979with_add_source_root
980with_override_source_root
981with_adds_and_overrides
982with_override_langtools
983with_override_corba
984with_override_jaxp
985with_override_jaxws
986with_override_hotspot
987with_override_jdk
988with_import_hotspot
989with_msvcr_dll
990with_dxsdk
991with_dxsdk_lib
992with_dxsdk_include
993with_extra_cflags
994with_extra_cxxflags
995with_extra_ldflags
996enable_debug_symbols
997enable_zip_debug_info
998enable_macosx_runtime_support
999with_x
1000with_cups
1001with_cups_include
1002with_freetype
1003with_alsa
1004with_alsa_include
1005with_alsa_lib
1006with_zlib
1007with_stdc__lib
1008with_num_cores
1009with_memory_size
1010with_jobs
1011with_sjavac_server_java
1012with_sjavac_server_cores
1013enable_sjavac
1014enable_precompiled_headers
1015enable_ccache
1016with_ccache_dir
1017'
1018      ac_precious_vars='build_alias
1019host_alias
1020target_alias
1021PKG_CONFIG
1022CC
1023CFLAGS
1024LDFLAGS
1025LIBS
1026CPPFLAGS
1027CXX
1028CXXFLAGS
1029CCC
1030OBJC
1031OBJCFLAGS
1032CPP
1033CXXCPP
1034XMKMF
1035FREETYPE2_CFLAGS
1036FREETYPE2_LIBS
1037ALSA_CFLAGS
1038ALSA_LIBS'
1039
1040
1041# Initialize some variables set by options.
1042ac_init_help=
1043ac_init_version=false
1044ac_unrecognized_opts=
1045ac_unrecognized_sep=
1046# The variables have the same names as the options, with
1047# dashes changed to underlines.
1048cache_file=/dev/null
1049exec_prefix=NONE
1050no_create=
1051no_recursion=
1052prefix=NONE
1053program_prefix=NONE
1054program_suffix=NONE
1055program_transform_name=s,x,x,
1056silent=
1057site=
1058srcdir=
1059verbose=
1060x_includes=NONE
1061x_libraries=NONE
1062
1063# Installation directory options.
1064# These are left unexpanded so users can "make install exec_prefix=/foo"
1065# and all the variables that are supposed to be based on exec_prefix
1066# by default will actually change.
1067# Use braces instead of parens because sh, perl, etc. also accept them.
1068# (The list follows the same order as the GNU Coding Standards.)
1069bindir='${exec_prefix}/bin'
1070sbindir='${exec_prefix}/sbin'
1071libexecdir='${exec_prefix}/libexec'
1072datarootdir='${prefix}/share'
1073datadir='${datarootdir}'
1074sysconfdir='${prefix}/etc'
1075sharedstatedir='${prefix}/com'
1076localstatedir='${prefix}/var'
1077includedir='${prefix}/include'
1078oldincludedir='/usr/include'
1079docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1080infodir='${datarootdir}/info'
1081htmldir='${docdir}'
1082dvidir='${docdir}'
1083pdfdir='${docdir}'
1084psdir='${docdir}'
1085libdir='${exec_prefix}/lib'
1086localedir='${datarootdir}/locale'
1087mandir='${datarootdir}/man'
1088
1089ac_prev=
1090ac_dashdash=
1091for ac_option
1092do
1093  # If the previous option needs an argument, assign it.
1094  if test -n "$ac_prev"; then
1095    eval $ac_prev=\$ac_option
1096    ac_prev=
1097    continue
1098  fi
1099
1100  case $ac_option in
1101  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1102  *=)   ac_optarg= ;;
1103  *)    ac_optarg=yes ;;
1104  esac
1105
1106  # Accept the important Cygnus configure options, so we can diagnose typos.
1107
1108  case $ac_dashdash$ac_option in
1109  --)
1110    ac_dashdash=yes ;;
1111
1112  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1113    ac_prev=bindir ;;
1114  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1115    bindir=$ac_optarg ;;
1116
1117  -build | --build | --buil | --bui | --bu)
1118    ac_prev=build_alias ;;
1119  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1120    build_alias=$ac_optarg ;;
1121
1122  -cache-file | --cache-file | --cache-fil | --cache-fi \
1123  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1124    ac_prev=cache_file ;;
1125  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1126  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1127    cache_file=$ac_optarg ;;
1128
1129  --config-cache | -C)
1130    cache_file=config.cache ;;
1131
1132  -datadir | --datadir | --datadi | --datad)
1133    ac_prev=datadir ;;
1134  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1135    datadir=$ac_optarg ;;
1136
1137  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1138  | --dataroo | --dataro | --datar)
1139    ac_prev=datarootdir ;;
1140  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1141  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1142    datarootdir=$ac_optarg ;;
1143
1144  -disable-* | --disable-*)
1145    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1146    # Reject names that are not valid shell variable names.
1147    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1148      as_fn_error $? "invalid feature name: $ac_useropt"
1149    ac_useropt_orig=$ac_useropt
1150    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1151    case $ac_user_opts in
1152      *"
1153"enable_$ac_useropt"
1154"*) ;;
1155      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1156	 ac_unrecognized_sep=', ';;
1157    esac
1158    eval enable_$ac_useropt=no ;;
1159
1160  -docdir | --docdir | --docdi | --doc | --do)
1161    ac_prev=docdir ;;
1162  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1163    docdir=$ac_optarg ;;
1164
1165  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1166    ac_prev=dvidir ;;
1167  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1168    dvidir=$ac_optarg ;;
1169
1170  -enable-* | --enable-*)
1171    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1172    # Reject names that are not valid shell variable names.
1173    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1174      as_fn_error $? "invalid feature name: $ac_useropt"
1175    ac_useropt_orig=$ac_useropt
1176    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1177    case $ac_user_opts in
1178      *"
1179"enable_$ac_useropt"
1180"*) ;;
1181      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1182	 ac_unrecognized_sep=', ';;
1183    esac
1184    eval enable_$ac_useropt=\$ac_optarg ;;
1185
1186  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1187  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1188  | --exec | --exe | --ex)
1189    ac_prev=exec_prefix ;;
1190  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1191  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1192  | --exec=* | --exe=* | --ex=*)
1193    exec_prefix=$ac_optarg ;;
1194
1195  -gas | --gas | --ga | --g)
1196    # Obsolete; use --with-gas.
1197    with_gas=yes ;;
1198
1199  -help | --help | --hel | --he | -h)
1200    ac_init_help=long ;;
1201  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1202    ac_init_help=recursive ;;
1203  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1204    ac_init_help=short ;;
1205
1206  -host | --host | --hos | --ho)
1207    ac_prev=host_alias ;;
1208  -host=* | --host=* | --hos=* | --ho=*)
1209    host_alias=$ac_optarg ;;
1210
1211  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1212    ac_prev=htmldir ;;
1213  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1214  | --ht=*)
1215    htmldir=$ac_optarg ;;
1216
1217  -includedir | --includedir | --includedi | --included | --include \
1218  | --includ | --inclu | --incl | --inc)
1219    ac_prev=includedir ;;
1220  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1221  | --includ=* | --inclu=* | --incl=* | --inc=*)
1222    includedir=$ac_optarg ;;
1223
1224  -infodir | --infodir | --infodi | --infod | --info | --inf)
1225    ac_prev=infodir ;;
1226  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1227    infodir=$ac_optarg ;;
1228
1229  -libdir | --libdir | --libdi | --libd)
1230    ac_prev=libdir ;;
1231  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1232    libdir=$ac_optarg ;;
1233
1234  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1235  | --libexe | --libex | --libe)
1236    ac_prev=libexecdir ;;
1237  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1238  | --libexe=* | --libex=* | --libe=*)
1239    libexecdir=$ac_optarg ;;
1240
1241  -localedir | --localedir | --localedi | --localed | --locale)
1242    ac_prev=localedir ;;
1243  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1244    localedir=$ac_optarg ;;
1245
1246  -localstatedir | --localstatedir | --localstatedi | --localstated \
1247  | --localstate | --localstat | --localsta | --localst | --locals)
1248    ac_prev=localstatedir ;;
1249  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1250  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1251    localstatedir=$ac_optarg ;;
1252
1253  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1254    ac_prev=mandir ;;
1255  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1256    mandir=$ac_optarg ;;
1257
1258  -nfp | --nfp | --nf)
1259    # Obsolete; use --without-fp.
1260    with_fp=no ;;
1261
1262  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1263  | --no-cr | --no-c | -n)
1264    no_create=yes ;;
1265
1266  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1267  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1268    no_recursion=yes ;;
1269
1270  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1271  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1272  | --oldin | --oldi | --old | --ol | --o)
1273    ac_prev=oldincludedir ;;
1274  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1275  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1276  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1277    oldincludedir=$ac_optarg ;;
1278
1279  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1280    ac_prev=prefix ;;
1281  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1282    prefix=$ac_optarg ;;
1283
1284  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1285  | --program-pre | --program-pr | --program-p)
1286    ac_prev=program_prefix ;;
1287  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1288  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1289    program_prefix=$ac_optarg ;;
1290
1291  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1292  | --program-suf | --program-su | --program-s)
1293    ac_prev=program_suffix ;;
1294  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1295  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1296    program_suffix=$ac_optarg ;;
1297
1298  -program-transform-name | --program-transform-name \
1299  | --program-transform-nam | --program-transform-na \
1300  | --program-transform-n | --program-transform- \
1301  | --program-transform | --program-transfor \
1302  | --program-transfo | --program-transf \
1303  | --program-trans | --program-tran \
1304  | --progr-tra | --program-tr | --program-t)
1305    ac_prev=program_transform_name ;;
1306  -program-transform-name=* | --program-transform-name=* \
1307  | --program-transform-nam=* | --program-transform-na=* \
1308  | --program-transform-n=* | --program-transform-=* \
1309  | --program-transform=* | --program-transfor=* \
1310  | --program-transfo=* | --program-transf=* \
1311  | --program-trans=* | --program-tran=* \
1312  | --progr-tra=* | --program-tr=* | --program-t=*)
1313    program_transform_name=$ac_optarg ;;
1314
1315  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1316    ac_prev=pdfdir ;;
1317  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1318    pdfdir=$ac_optarg ;;
1319
1320  -psdir | --psdir | --psdi | --psd | --ps)
1321    ac_prev=psdir ;;
1322  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1323    psdir=$ac_optarg ;;
1324
1325  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1326  | -silent | --silent | --silen | --sile | --sil)
1327    silent=yes ;;
1328
1329  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1330    ac_prev=sbindir ;;
1331  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1332  | --sbi=* | --sb=*)
1333    sbindir=$ac_optarg ;;
1334
1335  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1336  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1337  | --sharedst | --shareds | --shared | --share | --shar \
1338  | --sha | --sh)
1339    ac_prev=sharedstatedir ;;
1340  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1341  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1342  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1343  | --sha=* | --sh=*)
1344    sharedstatedir=$ac_optarg ;;
1345
1346  -site | --site | --sit)
1347    ac_prev=site ;;
1348  -site=* | --site=* | --sit=*)
1349    site=$ac_optarg ;;
1350
1351  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1352    ac_prev=srcdir ;;
1353  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1354    srcdir=$ac_optarg ;;
1355
1356  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1357  | --syscon | --sysco | --sysc | --sys | --sy)
1358    ac_prev=sysconfdir ;;
1359  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1360  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1361    sysconfdir=$ac_optarg ;;
1362
1363  -target | --target | --targe | --targ | --tar | --ta | --t)
1364    ac_prev=target_alias ;;
1365  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1366    target_alias=$ac_optarg ;;
1367
1368  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1369    verbose=yes ;;
1370
1371  -version | --version | --versio | --versi | --vers | -V)
1372    ac_init_version=: ;;
1373
1374  -with-* | --with-*)
1375    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1376    # Reject names that are not valid shell variable names.
1377    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1378      as_fn_error $? "invalid package name: $ac_useropt"
1379    ac_useropt_orig=$ac_useropt
1380    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1381    case $ac_user_opts in
1382      *"
1383"with_$ac_useropt"
1384"*) ;;
1385      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1386	 ac_unrecognized_sep=', ';;
1387    esac
1388    eval with_$ac_useropt=\$ac_optarg ;;
1389
1390  -without-* | --without-*)
1391    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1392    # Reject names that are not valid shell variable names.
1393    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1394      as_fn_error $? "invalid package name: $ac_useropt"
1395    ac_useropt_orig=$ac_useropt
1396    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1397    case $ac_user_opts in
1398      *"
1399"with_$ac_useropt"
1400"*) ;;
1401      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1402	 ac_unrecognized_sep=', ';;
1403    esac
1404    eval with_$ac_useropt=no ;;
1405
1406  --x)
1407    # Obsolete; use --with-x.
1408    with_x=yes ;;
1409
1410  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1411  | --x-incl | --x-inc | --x-in | --x-i)
1412    ac_prev=x_includes ;;
1413  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1414  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1415    x_includes=$ac_optarg ;;
1416
1417  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1418  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1419    ac_prev=x_libraries ;;
1420  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1421  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1422    x_libraries=$ac_optarg ;;
1423
1424  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1425Try \`$0 --help' for more information"
1426    ;;
1427
1428  *=*)
1429    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1430    # Reject names that are not valid shell variable names.
1431    case $ac_envvar in #(
1432      '' | [0-9]* | *[!_$as_cr_alnum]* )
1433      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1434    esac
1435    eval $ac_envvar=\$ac_optarg
1436    export $ac_envvar ;;
1437
1438  *)
1439    # FIXME: should be removed in autoconf 3.0.
1440    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1441    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1442      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1443    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1444    ;;
1445
1446  esac
1447done
1448
1449if test -n "$ac_prev"; then
1450  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1451  as_fn_error $? "missing argument to $ac_option"
1452fi
1453
1454if test -n "$ac_unrecognized_opts"; then
1455  case $enable_option_checking in
1456    no) ;;
1457    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1458    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1459  esac
1460fi
1461
1462# Check all directory arguments for consistency.
1463for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1464		datadir sysconfdir sharedstatedir localstatedir includedir \
1465		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1466		libdir localedir mandir
1467do
1468  eval ac_val=\$$ac_var
1469  # Remove trailing slashes.
1470  case $ac_val in
1471    */ )
1472      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1473      eval $ac_var=\$ac_val;;
1474  esac
1475  # Be sure to have absolute directory names.
1476  case $ac_val in
1477    [\\/$]* | ?:[\\/]* )  continue;;
1478    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1479  esac
1480  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1481done
1482
1483# There might be people who depend on the old broken behavior: `$host'
1484# used to hold the argument of --host etc.
1485# FIXME: To remove some day.
1486build=$build_alias
1487host=$host_alias
1488target=$target_alias
1489
1490# FIXME: To remove some day.
1491if test "x$host_alias" != x; then
1492  if test "x$build_alias" = x; then
1493    cross_compiling=maybe
1494    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1495    If a cross compiler is detected then cross compile mode will be used" >&2
1496  elif test "x$build_alias" != "x$host_alias"; then
1497    cross_compiling=yes
1498  fi
1499fi
1500
1501ac_tool_prefix=
1502test -n "$host_alias" && ac_tool_prefix=$host_alias-
1503
1504test "$silent" = yes && exec 6>/dev/null
1505
1506
1507ac_pwd=`pwd` && test -n "$ac_pwd" &&
1508ac_ls_di=`ls -di .` &&
1509ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1510  as_fn_error $? "working directory cannot be determined"
1511test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1512  as_fn_error $? "pwd does not report name of working directory"
1513
1514
1515# Find the source files, if location was not specified.
1516if test -z "$srcdir"; then
1517  ac_srcdir_defaulted=yes
1518  # Try the directory containing this script, then the parent directory.
1519  ac_confdir=`$as_dirname -- "$as_myself" ||
1520$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1521	 X"$as_myself" : 'X\(//\)[^/]' \| \
1522	 X"$as_myself" : 'X\(//\)$' \| \
1523	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1524$as_echo X"$as_myself" |
1525    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1526	    s//\1/
1527	    q
1528	  }
1529	  /^X\(\/\/\)[^/].*/{
1530	    s//\1/
1531	    q
1532	  }
1533	  /^X\(\/\/\)$/{
1534	    s//\1/
1535	    q
1536	  }
1537	  /^X\(\/\).*/{
1538	    s//\1/
1539	    q
1540	  }
1541	  s/.*/./; q'`
1542  srcdir=$ac_confdir
1543  if test ! -r "$srcdir/$ac_unique_file"; then
1544    srcdir=..
1545  fi
1546else
1547  ac_srcdir_defaulted=no
1548fi
1549if test ! -r "$srcdir/$ac_unique_file"; then
1550  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1551  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1552fi
1553ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1554ac_abs_confdir=`(
1555	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1556	pwd)`
1557# When building in place, set srcdir=.
1558if test "$ac_abs_confdir" = "$ac_pwd"; then
1559  srcdir=.
1560fi
1561# Remove unnecessary trailing slashes from srcdir.
1562# Double slashes in file names in object file debugging info
1563# mess up M-x gdb in Emacs.
1564case $srcdir in
1565*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1566esac
1567for ac_var in $ac_precious_vars; do
1568  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1569  eval ac_env_${ac_var}_value=\$${ac_var}
1570  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1571  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1572done
1573
1574#
1575# Report the --help message.
1576#
1577if test "$ac_init_help" = "long"; then
1578  # Omit some internal or obsolete options to make the list less imposing.
1579  # This message is too long to be a string in the A/UX 3.1 sh.
1580  cat <<_ACEOF
1581\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1582
1583Usage: $0 [OPTION]... [VAR=VALUE]...
1584
1585To assign environment variables (e.g., CC, CFLAGS...), specify them as
1586VAR=VALUE.  See below for descriptions of some of the useful variables.
1587
1588Defaults for the options are specified in brackets.
1589
1590Configuration:
1591  -h, --help              display this help and exit
1592      --help=short        display options specific to this package
1593      --help=recursive    display the short help of all the included packages
1594  -V, --version           display version information and exit
1595  -q, --quiet, --silent   do not print \`checking ...' messages
1596      --cache-file=FILE   cache test results in FILE [disabled]
1597  -C, --config-cache      alias for \`--cache-file=config.cache'
1598  -n, --no-create         do not create output files
1599      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1600
1601Installation directories:
1602  --prefix=PREFIX         install architecture-independent files in PREFIX
1603                          [$ac_default_prefix]
1604  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1605                          [PREFIX]
1606
1607By default, \`make install' will install all the files in
1608\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1609an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1610for instance \`--prefix=\$HOME'.
1611
1612For better control, use the options below.
1613
1614Fine tuning of the installation directories:
1615  --bindir=DIR            user executables [EPREFIX/bin]
1616  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1617  --libexecdir=DIR        program executables [EPREFIX/libexec]
1618  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1619  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1620  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1621  --libdir=DIR            object code libraries [EPREFIX/lib]
1622  --includedir=DIR        C header files [PREFIX/include]
1623  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1624  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1625  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1626  --infodir=DIR           info documentation [DATAROOTDIR/info]
1627  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1628  --mandir=DIR            man documentation [DATAROOTDIR/man]
1629  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1630  --htmldir=DIR           html documentation [DOCDIR]
1631  --dvidir=DIR            dvi documentation [DOCDIR]
1632  --pdfdir=DIR            pdf documentation [DOCDIR]
1633  --psdir=DIR             ps documentation [DOCDIR]
1634_ACEOF
1635
1636  cat <<\_ACEOF
1637
1638X features:
1639  --x-includes=DIR    X include files are in DIR
1640  --x-libraries=DIR   X library files are in DIR
1641
1642System types:
1643  --build=BUILD     configure for building on BUILD [guessed]
1644  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1645  --target=TARGET   configure for building compilers for TARGET [HOST]
1646_ACEOF
1647fi
1648
1649if test -n "$ac_init_help"; then
1650  case $ac_init_help in
1651     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1652   esac
1653  cat <<\_ACEOF
1654
1655Optional Features:
1656  --disable-option-checking  ignore unrecognized --enable/--with options
1657  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1658  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1659  --enable-openjdk-only   suppress building custom source even if present
1660                          [disabled]
1661  --enable-debug          set the debug level to fastdebug (shorthand for
1662                          --with-debug-level=fastdebug) [disabled]
1663  --disable-headful       disable building headful support (graphical UI
1664                          support) [enabled]
1665  --enable-hotspot-test-in-build
1666                          run the Queens test after Hotspot build [disabled]
1667  --enable-unlimited-crypto
1668                          Enable unlimited crypto policy [disabled]
1669  --disable-debug-symbols disable generation of debug symbols [enabled]
1670  --disable-zip-debug-info
1671                          disable zipping of debug-info files [enabled]
1672  --disable-macosx-runtime-support
1673                          disable the use of MacOSX Java runtime support
1674                          framework [enabled]
1675  --enable-sjavac         use sjavac to do fast incremental compiles
1676                          [disabled]
1677  --disable-precompiled-headers
1678                          disable using precompiled headers when compiling C++
1679                          [enabled]
1680  --disable-ccache        disable using ccache to speed up recompilations
1681                          [enabled]
1682
1683Optional Packages:
1684  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1685  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1686  --with-custom-make-dir  use this directory for custom build/make files
1687  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1688                          support it), e.g. --with-target-bits=32 [guessed]
1689  --with-sys-root         pass this sys-root to the compilers and tools (for
1690                          cross-compiling)
1691  --with-tools-dir        search this directory for compilers and tools (for
1692                          cross-compiling)
1693  --with-devkit           use this directory as base for tools-dir and
1694                          sys-root (for cross-compiling)
1695  --with-jdk-variant      JDK variant to build (normal) [normal]
1696  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1697                          client, minimal1, kernel, zero, zeroshark) [server]
1698  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1699                          [release]
1700  --with-conf-name        use this as the name of the configuration [generated
1701                          from important configuration options]
1702  --with-builddeps-conf   use this configuration file for the builddeps
1703  --with-builddeps-server download and use build dependencies from this server
1704                          url
1705  --with-builddeps-dir    store downloaded build dependencies here
1706                          [/localhome/builddeps]
1707  --with-builddeps-group  chgrp the downloaded build dependencies to this
1708                          group
1709  --with-cacerts-file     specify alternative cacerts file
1710  --with-milestone        Set milestone value for build [internal]
1711  --with-build-number     Set build number value for build [b00]
1712  --with-user-release-suffix
1713                          Add a custom string to the version string if build
1714                          number isn't set.[username_builddateb00]
1715  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1716  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1717                          invocations of the Boot JDK, overriding the default
1718                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1719                          -enableassertions"
1720  --with-add-source-root  for each and every source directory, look in this
1721                          additional source root for the same directory; if it
1722                          exists and have files in it, include it in the build
1723  --with-override-source-root
1724                          for each and every source directory, look in this
1725                          override source root for the same directory; if it
1726                          exists, use that directory instead and ignore the
1727                          directory in the original source root
1728  --with-adds-and-overrides
1729                          use the subdirs 'adds' and 'overrides' in the
1730                          specified directory as add-source-root and
1731                          override-source-root
1732  --with-override-langtools
1733                          use this langtools dir for the build
1734  --with-override-corba   use this corba dir for the build
1735  --with-override-jaxp    use this jaxp dir for the build
1736  --with-override-jaxws   use this jaxws dir for the build
1737  --with-override-hotspot use this hotspot dir for the build
1738  --with-override-jdk     use this jdk dir for the build
1739  --with-import-hotspot   import hotspot binaries from this jdk image or
1740                          hotspot build dist dir instead of building from
1741                          source
1742  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1743                          only) [probed]
1744  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1745  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1746                          [probed]
1747  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1748                          [probed]
1749  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1750  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1751  --with-extra-ldflags    extra flags to be used when linking jdk
1752  --with-x                use the X Window System
1753  --with-cups             specify prefix directory for the cups package
1754                          (expecting the headers under PATH/include)
1755  --with-cups-include     specify directory for the cups include files
1756  --with-freetype         specify prefix directory for the freetype2 package
1757                          (expecting the libraries under PATH/lib and the
1758                          headers under PATH/include)
1759  --with-alsa             specify prefix directory for the alsa package
1760                          (expecting the libraries under PATH/lib and the
1761                          headers under PATH/include)
1762  --with-alsa-include     specify directory for the alsa include files
1763  --with-alsa-lib         specify directory for the alsa library
1764  --with-zlib             use zlib from build system or OpenJDK source
1765                          (system, bundled) [bundled]
1766  --with-stdc++lib=<static>,<dynamic>,<default>
1767                          force linking of the C++ runtime on Linux to either
1768                          static or dynamic, default is static with dynamic as
1769                          fallback
1770  --with-num-cores        number of cores in the build system, e.g.
1771                          --with-num-cores=8 [probed]
1772  --with-memory-size      memory (in MB) available in the build system, e.g.
1773                          --with-memory-size=1024 [probed]
1774  --with-jobs             number of parallel jobs to let make run [calculated
1775                          based on cores and memory]
1776  --with-sjavac-server-java
1777                          use this java binary for running the sjavac
1778                          background server [Boot JDK java]
1779  --with-sjavac-server-cores
1780                          use at most this number of concurrent threads on the
1781                          sjavac server [probed]
1782  --with-ccache-dir       where to store ccache files [~/.ccache]
1783
1784Some influential environment variables:
1785  PKG_CONFIG  path to pkg-config utility
1786  CC          C compiler command
1787  CFLAGS      C compiler flags
1788  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1789              nonstandard directory <lib dir>
1790  LIBS        libraries to pass to the linker, e.g. -l<library>
1791  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1792              you have headers in a nonstandard directory <include dir>
1793  CXX         C++ compiler command
1794  CXXFLAGS    C++ compiler flags
1795  OBJC        Objective C compiler command
1796  OBJCFLAGS   Objective C compiler flags
1797  CPP         C preprocessor
1798  CXXCPP      C++ preprocessor
1799  XMKMF       Path to xmkmf, Makefile generator for X Window System
1800  FREETYPE2_CFLAGS
1801              C compiler flags for FREETYPE2, overriding pkg-config
1802  FREETYPE2_LIBS
1803              linker flags for FREETYPE2, overriding pkg-config
1804  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1805  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1806
1807Use these variables to override the choices made by `configure' or to help
1808it to find libraries and programs with nonstandard names/locations.
1809
1810Report bugs to <build-dev@openjdk.java.net>.
1811OpenJDK home page: <http://openjdk.java.net>.
1812_ACEOF
1813ac_status=$?
1814fi
1815
1816if test "$ac_init_help" = "recursive"; then
1817  # If there are subdirs, report their specific --help.
1818  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1819    test -d "$ac_dir" ||
1820      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1821      continue
1822    ac_builddir=.
1823
1824case "$ac_dir" in
1825.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1826*)
1827  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1828  # A ".." for each directory in $ac_dir_suffix.
1829  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1830  case $ac_top_builddir_sub in
1831  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1832  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1833  esac ;;
1834esac
1835ac_abs_top_builddir=$ac_pwd
1836ac_abs_builddir=$ac_pwd$ac_dir_suffix
1837# for backward compatibility:
1838ac_top_builddir=$ac_top_build_prefix
1839
1840case $srcdir in
1841  .)  # We are building in place.
1842    ac_srcdir=.
1843    ac_top_srcdir=$ac_top_builddir_sub
1844    ac_abs_top_srcdir=$ac_pwd ;;
1845  [\\/]* | ?:[\\/]* )  # Absolute name.
1846    ac_srcdir=$srcdir$ac_dir_suffix;
1847    ac_top_srcdir=$srcdir
1848    ac_abs_top_srcdir=$srcdir ;;
1849  *) # Relative name.
1850    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1851    ac_top_srcdir=$ac_top_build_prefix$srcdir
1852    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1853esac
1854ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1855
1856    cd "$ac_dir" || { ac_status=$?; continue; }
1857    # Check for guested configure.
1858    if test -f "$ac_srcdir/configure.gnu"; then
1859      echo &&
1860      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1861    elif test -f "$ac_srcdir/configure"; then
1862      echo &&
1863      $SHELL "$ac_srcdir/configure" --help=recursive
1864    else
1865      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1866    fi || ac_status=$?
1867    cd "$ac_pwd" || { ac_status=$?; break; }
1868  done
1869fi
1870
1871test -n "$ac_init_help" && exit $ac_status
1872if $ac_init_version; then
1873  cat <<\_ACEOF
1874OpenJDK configure jdk8
1875generated by GNU Autoconf 2.67
1876
1877Copyright (C) 2010 Free Software Foundation, Inc.
1878This configure script is free software; the Free Software Foundation
1879gives unlimited permission to copy, distribute and modify it.
1880_ACEOF
1881  exit
1882fi
1883
1884## ------------------------ ##
1885## Autoconf initialization. ##
1886## ------------------------ ##
1887
1888# ac_fn_c_try_compile LINENO
1889# --------------------------
1890# Try to compile conftest.$ac_ext, and return whether this succeeded.
1891ac_fn_c_try_compile ()
1892{
1893  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894  rm -f conftest.$ac_objext
1895  if { { ac_try="$ac_compile"
1896case "(($ac_try" in
1897  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1898  *) ac_try_echo=$ac_try;;
1899esac
1900eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1901$as_echo "$ac_try_echo"; } >&5
1902  (eval "$ac_compile") 2>conftest.err
1903  ac_status=$?
1904  if test -s conftest.err; then
1905    grep -v '^ *+' conftest.err >conftest.er1
1906    cat conftest.er1 >&5
1907    mv -f conftest.er1 conftest.err
1908  fi
1909  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1910  test $ac_status = 0; } && {
1911	 test -z "$ac_c_werror_flag" ||
1912	 test ! -s conftest.err
1913       } && test -s conftest.$ac_objext; then :
1914  ac_retval=0
1915else
1916  $as_echo "$as_me: failed program was:" >&5
1917sed 's/^/| /' conftest.$ac_ext >&5
1918
1919	ac_retval=1
1920fi
1921  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1922  as_fn_set_status $ac_retval
1923
1924} # ac_fn_c_try_compile
1925
1926# ac_fn_cxx_try_compile LINENO
1927# ----------------------------
1928# Try to compile conftest.$ac_ext, and return whether this succeeded.
1929ac_fn_cxx_try_compile ()
1930{
1931  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1932  rm -f conftest.$ac_objext
1933  if { { ac_try="$ac_compile"
1934case "(($ac_try" in
1935  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1936  *) ac_try_echo=$ac_try;;
1937esac
1938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1939$as_echo "$ac_try_echo"; } >&5
1940  (eval "$ac_compile") 2>conftest.err
1941  ac_status=$?
1942  if test -s conftest.err; then
1943    grep -v '^ *+' conftest.err >conftest.er1
1944    cat conftest.er1 >&5
1945    mv -f conftest.er1 conftest.err
1946  fi
1947  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1948  test $ac_status = 0; } && {
1949	 test -z "$ac_cxx_werror_flag" ||
1950	 test ! -s conftest.err
1951       } && test -s conftest.$ac_objext; then :
1952  ac_retval=0
1953else
1954  $as_echo "$as_me: failed program was:" >&5
1955sed 's/^/| /' conftest.$ac_ext >&5
1956
1957	ac_retval=1
1958fi
1959  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1960  as_fn_set_status $ac_retval
1961
1962} # ac_fn_cxx_try_compile
1963
1964# ac_fn_objc_try_compile LINENO
1965# -----------------------------
1966# Try to compile conftest.$ac_ext, and return whether this succeeded.
1967ac_fn_objc_try_compile ()
1968{
1969  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1970  rm -f conftest.$ac_objext
1971  if { { ac_try="$ac_compile"
1972case "(($ac_try" in
1973  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1974  *) ac_try_echo=$ac_try;;
1975esac
1976eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1977$as_echo "$ac_try_echo"; } >&5
1978  (eval "$ac_compile") 2>conftest.err
1979  ac_status=$?
1980  if test -s conftest.err; then
1981    grep -v '^ *+' conftest.err >conftest.er1
1982    cat conftest.er1 >&5
1983    mv -f conftest.er1 conftest.err
1984  fi
1985  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1986  test $ac_status = 0; } && {
1987	 test -z "$ac_objc_werror_flag" ||
1988	 test ! -s conftest.err
1989       } && test -s conftest.$ac_objext; then :
1990  ac_retval=0
1991else
1992  $as_echo "$as_me: failed program was:" >&5
1993sed 's/^/| /' conftest.$ac_ext >&5
1994
1995	ac_retval=1
1996fi
1997  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1998  as_fn_set_status $ac_retval
1999
2000} # ac_fn_objc_try_compile
2001
2002# ac_fn_c_try_cpp LINENO
2003# ----------------------
2004# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2005ac_fn_c_try_cpp ()
2006{
2007  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008  if { { ac_try="$ac_cpp conftest.$ac_ext"
2009case "(($ac_try" in
2010  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2011  *) ac_try_echo=$ac_try;;
2012esac
2013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2014$as_echo "$ac_try_echo"; } >&5
2015  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2016  ac_status=$?
2017  if test -s conftest.err; then
2018    grep -v '^ *+' conftest.err >conftest.er1
2019    cat conftest.er1 >&5
2020    mv -f conftest.er1 conftest.err
2021  fi
2022  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2023  test $ac_status = 0; } > conftest.i && {
2024	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2025	 test ! -s conftest.err
2026       }; then :
2027  ac_retval=0
2028else
2029  $as_echo "$as_me: failed program was:" >&5
2030sed 's/^/| /' conftest.$ac_ext >&5
2031
2032    ac_retval=1
2033fi
2034  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2035  as_fn_set_status $ac_retval
2036
2037} # ac_fn_c_try_cpp
2038
2039# ac_fn_cxx_try_cpp LINENO
2040# ------------------------
2041# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2042ac_fn_cxx_try_cpp ()
2043{
2044  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2045  if { { ac_try="$ac_cpp conftest.$ac_ext"
2046case "(($ac_try" in
2047  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2048  *) ac_try_echo=$ac_try;;
2049esac
2050eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2051$as_echo "$ac_try_echo"; } >&5
2052  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2053  ac_status=$?
2054  if test -s conftest.err; then
2055    grep -v '^ *+' conftest.err >conftest.er1
2056    cat conftest.er1 >&5
2057    mv -f conftest.er1 conftest.err
2058  fi
2059  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2060  test $ac_status = 0; } > conftest.i && {
2061	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2062	 test ! -s conftest.err
2063       }; then :
2064  ac_retval=0
2065else
2066  $as_echo "$as_me: failed program was:" >&5
2067sed 's/^/| /' conftest.$ac_ext >&5
2068
2069    ac_retval=1
2070fi
2071  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2072  as_fn_set_status $ac_retval
2073
2074} # ac_fn_cxx_try_cpp
2075
2076# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2077# ---------------------------------------------------------
2078# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2079# the include files in INCLUDES and setting the cache variable VAR
2080# accordingly.
2081ac_fn_cxx_check_header_mongrel ()
2082{
2083  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2084  if eval "test \"\${$3+set}\"" = set; then :
2085  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2086$as_echo_n "checking for $2... " >&6; }
2087if eval "test \"\${$3+set}\"" = set; then :
2088  $as_echo_n "(cached) " >&6
2089fi
2090eval ac_res=\$$3
2091	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2092$as_echo "$ac_res" >&6; }
2093else
2094  # Is the header compilable?
2095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2096$as_echo_n "checking $2 usability... " >&6; }
2097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h.  */
2099$4
2100#include <$2>
2101_ACEOF
2102if ac_fn_cxx_try_compile "$LINENO"; then :
2103  ac_header_compiler=yes
2104else
2105  ac_header_compiler=no
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2109$as_echo "$ac_header_compiler" >&6; }
2110
2111# Is the header present?
2112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2113$as_echo_n "checking $2 presence... " >&6; }
2114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h.  */
2116#include <$2>
2117_ACEOF
2118if ac_fn_cxx_try_cpp "$LINENO"; then :
2119  ac_header_preproc=yes
2120else
2121  ac_header_preproc=no
2122fi
2123rm -f conftest.err conftest.i conftest.$ac_ext
2124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2125$as_echo "$ac_header_preproc" >&6; }
2126
2127# So?  What about this header?
2128case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2129  yes:no: )
2130    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2131$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2132    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2133$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2134    ;;
2135  no:yes:* )
2136    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2137$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2138    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2139$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2140    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2141$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2142    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2143$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2144    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2145$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2146( $as_echo "## ----------------------------------------- ##
2147## Report this to build-dev@openjdk.java.net ##
2148## ----------------------------------------- ##"
2149     ) | sed "s/^/$as_me: WARNING:     /" >&2
2150    ;;
2151esac
2152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2153$as_echo_n "checking for $2... " >&6; }
2154if eval "test \"\${$3+set}\"" = set; then :
2155  $as_echo_n "(cached) " >&6
2156else
2157  eval "$3=\$ac_header_compiler"
2158fi
2159eval ac_res=\$$3
2160	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2161$as_echo "$ac_res" >&6; }
2162fi
2163  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2164
2165} # ac_fn_cxx_check_header_mongrel
2166
2167# ac_fn_cxx_try_run LINENO
2168# ------------------------
2169# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2170# that executables *can* be run.
2171ac_fn_cxx_try_run ()
2172{
2173  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2174  if { { ac_try="$ac_link"
2175case "(($ac_try" in
2176  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2177  *) ac_try_echo=$ac_try;;
2178esac
2179eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2180$as_echo "$ac_try_echo"; } >&5
2181  (eval "$ac_link") 2>&5
2182  ac_status=$?
2183  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2184  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2185  { { case "(($ac_try" in
2186  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2187  *) ac_try_echo=$ac_try;;
2188esac
2189eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2190$as_echo "$ac_try_echo"; } >&5
2191  (eval "$ac_try") 2>&5
2192  ac_status=$?
2193  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2194  test $ac_status = 0; }; }; then :
2195  ac_retval=0
2196else
2197  $as_echo "$as_me: program exited with status $ac_status" >&5
2198       $as_echo "$as_me: failed program was:" >&5
2199sed 's/^/| /' conftest.$ac_ext >&5
2200
2201       ac_retval=$ac_status
2202fi
2203  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2204  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2205  as_fn_set_status $ac_retval
2206
2207} # ac_fn_cxx_try_run
2208
2209# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2210# ---------------------------------------------------------
2211# Tests whether HEADER exists and can be compiled using the include files in
2212# INCLUDES, setting the cache variable VAR accordingly.
2213ac_fn_cxx_check_header_compile ()
2214{
2215  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2217$as_echo_n "checking for $2... " >&6; }
2218if eval "test \"\${$3+set}\"" = set; then :
2219  $as_echo_n "(cached) " >&6
2220else
2221  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2222/* end confdefs.h.  */
2223$4
2224#include <$2>
2225_ACEOF
2226if ac_fn_cxx_try_compile "$LINENO"; then :
2227  eval "$3=yes"
2228else
2229  eval "$3=no"
2230fi
2231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2232fi
2233eval ac_res=\$$3
2234	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2235$as_echo "$ac_res" >&6; }
2236  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2237
2238} # ac_fn_cxx_check_header_compile
2239
2240# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2241# ----------------------------------------------
2242# Tries to find the compile-time value of EXPR in a program that includes
2243# INCLUDES, setting VAR accordingly. Returns whether the value could be
2244# computed
2245ac_fn_cxx_compute_int ()
2246{
2247  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2248  if test "$cross_compiling" = yes; then
2249    # Depending upon the size, compute the lo and hi bounds.
2250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h.  */
2252$4
2253int
2254main ()
2255{
2256static int test_array [1 - 2 * !(($2) >= 0)];
2257test_array [0] = 0
2258
2259  ;
2260  return 0;
2261}
2262_ACEOF
2263if ac_fn_cxx_try_compile "$LINENO"; then :
2264  ac_lo=0 ac_mid=0
2265  while :; do
2266    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267/* end confdefs.h.  */
2268$4
2269int
2270main ()
2271{
2272static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2273test_array [0] = 0
2274
2275  ;
2276  return 0;
2277}
2278_ACEOF
2279if ac_fn_cxx_try_compile "$LINENO"; then :
2280  ac_hi=$ac_mid; break
2281else
2282  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2283			if test $ac_lo -le $ac_mid; then
2284			  ac_lo= ac_hi=
2285			  break
2286			fi
2287			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290  done
2291else
2292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293/* end confdefs.h.  */
2294$4
2295int
2296main ()
2297{
2298static int test_array [1 - 2 * !(($2) < 0)];
2299test_array [0] = 0
2300
2301  ;
2302  return 0;
2303}
2304_ACEOF
2305if ac_fn_cxx_try_compile "$LINENO"; then :
2306  ac_hi=-1 ac_mid=-1
2307  while :; do
2308    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h.  */
2310$4
2311int
2312main ()
2313{
2314static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2315test_array [0] = 0
2316
2317  ;
2318  return 0;
2319}
2320_ACEOF
2321if ac_fn_cxx_try_compile "$LINENO"; then :
2322  ac_lo=$ac_mid; break
2323else
2324  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2325			if test $ac_mid -le $ac_hi; then
2326			  ac_lo= ac_hi=
2327			  break
2328			fi
2329			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332  done
2333else
2334  ac_lo= ac_hi=
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339# Binary search between lo and hi bounds.
2340while test "x$ac_lo" != "x$ac_hi"; do
2341  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343/* end confdefs.h.  */
2344$4
2345int
2346main ()
2347{
2348static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2349test_array [0] = 0
2350
2351  ;
2352  return 0;
2353}
2354_ACEOF
2355if ac_fn_cxx_try_compile "$LINENO"; then :
2356  ac_hi=$ac_mid
2357else
2358  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361done
2362case $ac_lo in #((
2363?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2364'') ac_retval=1 ;;
2365esac
2366  else
2367    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368/* end confdefs.h.  */
2369$4
2370static long int longval () { return $2; }
2371static unsigned long int ulongval () { return $2; }
2372#include <stdio.h>
2373#include <stdlib.h>
2374int
2375main ()
2376{
2377
2378  FILE *f = fopen ("conftest.val", "w");
2379  if (! f)
2380    return 1;
2381  if (($2) < 0)
2382    {
2383      long int i = longval ();
2384      if (i != ($2))
2385	return 1;
2386      fprintf (f, "%ld", i);
2387    }
2388  else
2389    {
2390      unsigned long int i = ulongval ();
2391      if (i != ($2))
2392	return 1;
2393      fprintf (f, "%lu", i);
2394    }
2395  /* Do not output a trailing newline, as this causes \r\n confusion
2396     on some platforms.  */
2397  return ferror (f) || fclose (f) != 0;
2398
2399  ;
2400  return 0;
2401}
2402_ACEOF
2403if ac_fn_cxx_try_run "$LINENO"; then :
2404  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2405else
2406  ac_retval=1
2407fi
2408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2409  conftest.$ac_objext conftest.beam conftest.$ac_ext
2410rm -f conftest.val
2411
2412  fi
2413  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2414  as_fn_set_status $ac_retval
2415
2416} # ac_fn_cxx_compute_int
2417
2418# ac_fn_cxx_try_link LINENO
2419# -------------------------
2420# Try to link conftest.$ac_ext, and return whether this succeeded.
2421ac_fn_cxx_try_link ()
2422{
2423  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424  rm -f conftest.$ac_objext conftest$ac_exeext
2425  if { { ac_try="$ac_link"
2426case "(($ac_try" in
2427  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2428  *) ac_try_echo=$ac_try;;
2429esac
2430eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2431$as_echo "$ac_try_echo"; } >&5
2432  (eval "$ac_link") 2>conftest.err
2433  ac_status=$?
2434  if test -s conftest.err; then
2435    grep -v '^ *+' conftest.err >conftest.er1
2436    cat conftest.er1 >&5
2437    mv -f conftest.er1 conftest.err
2438  fi
2439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2440  test $ac_status = 0; } && {
2441	 test -z "$ac_cxx_werror_flag" ||
2442	 test ! -s conftest.err
2443       } && test -s conftest$ac_exeext && {
2444	 test "$cross_compiling" = yes ||
2445	 $as_test_x conftest$ac_exeext
2446       }; then :
2447  ac_retval=0
2448else
2449  $as_echo "$as_me: failed program was:" >&5
2450sed 's/^/| /' conftest.$ac_ext >&5
2451
2452	ac_retval=1
2453fi
2454  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2455  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2456  # interfere with the next link command; also delete a directory that is
2457  # left behind by Apple's compiler.  We do this before executing the actions.
2458  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2459  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2460  as_fn_set_status $ac_retval
2461
2462} # ac_fn_cxx_try_link
2463
2464# ac_fn_cxx_check_func LINENO FUNC VAR
2465# ------------------------------------
2466# Tests whether FUNC exists, setting the cache variable VAR accordingly
2467ac_fn_cxx_check_func ()
2468{
2469  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2471$as_echo_n "checking for $2... " >&6; }
2472if eval "test \"\${$3+set}\"" = set; then :
2473  $as_echo_n "(cached) " >&6
2474else
2475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2476/* end confdefs.h.  */
2477/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2478   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2479#define $2 innocuous_$2
2480
2481/* System header to define __stub macros and hopefully few prototypes,
2482    which can conflict with char $2 (); below.
2483    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2484    <limits.h> exists even on freestanding compilers.  */
2485
2486#ifdef __STDC__
2487# include <limits.h>
2488#else
2489# include <assert.h>
2490#endif
2491
2492#undef $2
2493
2494/* Override any GCC internal prototype to avoid an error.
2495   Use char because int might match the return type of a GCC
2496   builtin and then its argument prototype would still apply.  */
2497#ifdef __cplusplus
2498extern "C"
2499#endif
2500char $2 ();
2501/* The GNU C library defines this for functions which it implements
2502    to always fail with ENOSYS.  Some functions are actually named
2503    something starting with __ and the normal name is an alias.  */
2504#if defined __stub_$2 || defined __stub___$2
2505choke me
2506#endif
2507
2508int
2509main ()
2510{
2511return $2 ();
2512  ;
2513  return 0;
2514}
2515_ACEOF
2516if ac_fn_cxx_try_link "$LINENO"; then :
2517  eval "$3=yes"
2518else
2519  eval "$3=no"
2520fi
2521rm -f core conftest.err conftest.$ac_objext \
2522    conftest$ac_exeext conftest.$ac_ext
2523fi
2524eval ac_res=\$$3
2525	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2526$as_echo "$ac_res" >&6; }
2527  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2528
2529} # ac_fn_cxx_check_func
2530
2531# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2532# -------------------------------------------------------
2533# Tests whether HEADER exists and can be compiled using the include files in
2534# INCLUDES, setting the cache variable VAR accordingly.
2535ac_fn_c_check_header_compile ()
2536{
2537  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2539$as_echo_n "checking for $2... " >&6; }
2540if eval "test \"\${$3+set}\"" = set; then :
2541  $as_echo_n "(cached) " >&6
2542else
2543  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2544/* end confdefs.h.  */
2545$4
2546#include <$2>
2547_ACEOF
2548if ac_fn_c_try_compile "$LINENO"; then :
2549  eval "$3=yes"
2550else
2551  eval "$3=no"
2552fi
2553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2554fi
2555eval ac_res=\$$3
2556	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2557$as_echo "$ac_res" >&6; }
2558  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2559
2560} # ac_fn_c_check_header_compile
2561cat >config.log <<_ACEOF
2562This file contains any messages produced by compilers while
2563running configure, to aid debugging if configure makes a mistake.
2564
2565It was created by OpenJDK $as_me jdk8, which was
2566generated by GNU Autoconf 2.67.  Invocation command line was
2567
2568  $ $0 $@
2569
2570_ACEOF
2571exec 5>>config.log
2572{
2573cat <<_ASUNAME
2574## --------- ##
2575## Platform. ##
2576## --------- ##
2577
2578hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2579uname -m = `(uname -m) 2>/dev/null || echo unknown`
2580uname -r = `(uname -r) 2>/dev/null || echo unknown`
2581uname -s = `(uname -s) 2>/dev/null || echo unknown`
2582uname -v = `(uname -v) 2>/dev/null || echo unknown`
2583
2584/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2585/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2586
2587/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2588/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2589/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2590/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2591/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2592/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2593/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2594
2595_ASUNAME
2596
2597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2598for as_dir in $PATH
2599do
2600  IFS=$as_save_IFS
2601  test -z "$as_dir" && as_dir=.
2602    $as_echo "PATH: $as_dir"
2603  done
2604IFS=$as_save_IFS
2605
2606} >&5
2607
2608cat >&5 <<_ACEOF
2609
2610
2611## ----------- ##
2612## Core tests. ##
2613## ----------- ##
2614
2615_ACEOF
2616
2617
2618# Keep a trace of the command line.
2619# Strip out --no-create and --no-recursion so they do not pile up.
2620# Strip out --silent because we don't want to record it for future runs.
2621# Also quote any args containing shell meta-characters.
2622# Make two passes to allow for proper duplicate-argument suppression.
2623ac_configure_args=
2624ac_configure_args0=
2625ac_configure_args1=
2626ac_must_keep_next=false
2627for ac_pass in 1 2
2628do
2629  for ac_arg
2630  do
2631    case $ac_arg in
2632    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2633    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2634    | -silent | --silent | --silen | --sile | --sil)
2635      continue ;;
2636    *\'*)
2637      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2638    esac
2639    case $ac_pass in
2640    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2641    2)
2642      as_fn_append ac_configure_args1 " '$ac_arg'"
2643      if test $ac_must_keep_next = true; then
2644	ac_must_keep_next=false # Got value, back to normal.
2645      else
2646	case $ac_arg in
2647	  *=* | --config-cache | -C | -disable-* | --disable-* \
2648	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2649	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2650	  | -with-* | --with-* | -without-* | --without-* | --x)
2651	    case "$ac_configure_args0 " in
2652	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2653	    esac
2654	    ;;
2655	  -* ) ac_must_keep_next=true ;;
2656	esac
2657      fi
2658      as_fn_append ac_configure_args " '$ac_arg'"
2659      ;;
2660    esac
2661  done
2662done
2663{ ac_configure_args0=; unset ac_configure_args0;}
2664{ ac_configure_args1=; unset ac_configure_args1;}
2665
2666# When interrupted or exit'd, cleanup temporary files, and complete
2667# config.log.  We remove comments because anyway the quotes in there
2668# would cause problems or look ugly.
2669# WARNING: Use '\'' to represent an apostrophe within the trap.
2670# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2671trap 'exit_status=$?
2672  # Save into config.log some information that might help in debugging.
2673  {
2674    echo
2675
2676    $as_echo "## ---------------- ##
2677## Cache variables. ##
2678## ---------------- ##"
2679    echo
2680    # The following way of writing the cache mishandles newlines in values,
2681(
2682  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2683    eval ac_val=\$$ac_var
2684    case $ac_val in #(
2685    *${as_nl}*)
2686      case $ac_var in #(
2687      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2688$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2689      esac
2690      case $ac_var in #(
2691      _ | IFS | as_nl) ;; #(
2692      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2693      *) { eval $ac_var=; unset $ac_var;} ;;
2694      esac ;;
2695    esac
2696  done
2697  (set) 2>&1 |
2698    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2699    *${as_nl}ac_space=\ *)
2700      sed -n \
2701	"s/'\''/'\''\\\\'\'''\''/g;
2702	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2703      ;; #(
2704    *)
2705      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2706      ;;
2707    esac |
2708    sort
2709)
2710    echo
2711
2712    $as_echo "## ----------------- ##
2713## Output variables. ##
2714## ----------------- ##"
2715    echo
2716    for ac_var in $ac_subst_vars
2717    do
2718      eval ac_val=\$$ac_var
2719      case $ac_val in
2720      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2721      esac
2722      $as_echo "$ac_var='\''$ac_val'\''"
2723    done | sort
2724    echo
2725
2726    if test -n "$ac_subst_files"; then
2727      $as_echo "## ------------------- ##
2728## File substitutions. ##
2729## ------------------- ##"
2730      echo
2731      for ac_var in $ac_subst_files
2732      do
2733	eval ac_val=\$$ac_var
2734	case $ac_val in
2735	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2736	esac
2737	$as_echo "$ac_var='\''$ac_val'\''"
2738      done | sort
2739      echo
2740    fi
2741
2742    if test -s confdefs.h; then
2743      $as_echo "## ----------- ##
2744## confdefs.h. ##
2745## ----------- ##"
2746      echo
2747      cat confdefs.h
2748      echo
2749    fi
2750    test "$ac_signal" != 0 &&
2751      $as_echo "$as_me: caught signal $ac_signal"
2752    $as_echo "$as_me: exit $exit_status"
2753  } >&5
2754  rm -f core *.core core.conftest.* &&
2755    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2756    exit $exit_status
2757' 0
2758for ac_signal in 1 2 13 15; do
2759  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2760done
2761ac_signal=0
2762
2763# confdefs.h avoids OS command line length limits that DEFS can exceed.
2764rm -f -r conftest* confdefs.h
2765
2766$as_echo "/* confdefs.h */" > confdefs.h
2767
2768# Predefined preprocessor variables.
2769
2770cat >>confdefs.h <<_ACEOF
2771#define PACKAGE_NAME "$PACKAGE_NAME"
2772_ACEOF
2773
2774cat >>confdefs.h <<_ACEOF
2775#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2776_ACEOF
2777
2778cat >>confdefs.h <<_ACEOF
2779#define PACKAGE_VERSION "$PACKAGE_VERSION"
2780_ACEOF
2781
2782cat >>confdefs.h <<_ACEOF
2783#define PACKAGE_STRING "$PACKAGE_STRING"
2784_ACEOF
2785
2786cat >>confdefs.h <<_ACEOF
2787#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2788_ACEOF
2789
2790cat >>confdefs.h <<_ACEOF
2791#define PACKAGE_URL "$PACKAGE_URL"
2792_ACEOF
2793
2794
2795# Let the site file select an alternate cache file if it wants to.
2796# Prefer an explicitly selected file to automatically selected ones.
2797ac_site_file1=NONE
2798ac_site_file2=NONE
2799if test -n "$CONFIG_SITE"; then
2800  # We do not want a PATH search for config.site.
2801  case $CONFIG_SITE in #((
2802    -*)  ac_site_file1=./$CONFIG_SITE;;
2803    */*) ac_site_file1=$CONFIG_SITE;;
2804    *)   ac_site_file1=./$CONFIG_SITE;;
2805  esac
2806elif test "x$prefix" != xNONE; then
2807  ac_site_file1=$prefix/share/config.site
2808  ac_site_file2=$prefix/etc/config.site
2809else
2810  ac_site_file1=$ac_default_prefix/share/config.site
2811  ac_site_file2=$ac_default_prefix/etc/config.site
2812fi
2813for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2814do
2815  test "x$ac_site_file" = xNONE && continue
2816  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2817    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2818$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2819    sed 's/^/| /' "$ac_site_file" >&5
2820    . "$ac_site_file" \
2821      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2823as_fn_error $? "failed to load site script $ac_site_file
2824See \`config.log' for more details" "$LINENO" 5 ; }
2825  fi
2826done
2827
2828if test -r "$cache_file"; then
2829  # Some versions of bash will fail to source /dev/null (special files
2830  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2831  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2832    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2833$as_echo "$as_me: loading cache $cache_file" >&6;}
2834    case $cache_file in
2835      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2836      *)                      . "./$cache_file";;
2837    esac
2838  fi
2839else
2840  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2841$as_echo "$as_me: creating cache $cache_file" >&6;}
2842  >$cache_file
2843fi
2844
2845# Check that the precious variables saved in the cache have kept the same
2846# value.
2847ac_cache_corrupted=false
2848for ac_var in $ac_precious_vars; do
2849  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2850  eval ac_new_set=\$ac_env_${ac_var}_set
2851  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2852  eval ac_new_val=\$ac_env_${ac_var}_value
2853  case $ac_old_set,$ac_new_set in
2854    set,)
2855      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2856$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2857      ac_cache_corrupted=: ;;
2858    ,set)
2859      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2860$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2861      ac_cache_corrupted=: ;;
2862    ,);;
2863    *)
2864      if test "x$ac_old_val" != "x$ac_new_val"; then
2865	# differences in whitespace do not lead to failure.
2866	ac_old_val_w=`echo x $ac_old_val`
2867	ac_new_val_w=`echo x $ac_new_val`
2868	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2869	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2870$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2871	  ac_cache_corrupted=:
2872	else
2873	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2874$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2875	  eval $ac_var=\$ac_old_val
2876	fi
2877	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2878$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2879	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2880$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2881      fi;;
2882  esac
2883  # Pass precious variables to config.status.
2884  if test "$ac_new_set" = set; then
2885    case $ac_new_val in
2886    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2887    *) ac_arg=$ac_var=$ac_new_val ;;
2888    esac
2889    case " $ac_configure_args " in
2890      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2891      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2892    esac
2893  fi
2894done
2895if $ac_cache_corrupted; then
2896  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2898  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2899$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2900  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2901fi
2902## -------------------- ##
2903## Main body of script. ##
2904## -------------------- ##
2905
2906ac_ext=c
2907ac_cpp='$CPP $CPPFLAGS'
2908ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2909ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2910ac_compiler_gnu=$ac_cv_c_compiler_gnu
2911
2912
2913
2914ac_aux_dir=
2915for ac_dir in build-aux "$srcdir"/build-aux; do
2916  if test -f "$ac_dir/install-sh"; then
2917    ac_aux_dir=$ac_dir
2918    ac_install_sh="$ac_aux_dir/install-sh -c"
2919    break
2920  elif test -f "$ac_dir/install.sh"; then
2921    ac_aux_dir=$ac_dir
2922    ac_install_sh="$ac_aux_dir/install.sh -c"
2923    break
2924  elif test -f "$ac_dir/shtool"; then
2925    ac_aux_dir=$ac_dir
2926    ac_install_sh="$ac_aux_dir/shtool install -c"
2927    break
2928  fi
2929done
2930if test -z "$ac_aux_dir"; then
2931  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2932fi
2933
2934# These three variables are undocumented and unsupported,
2935# and are intended to be withdrawn in a future Autoconf release.
2936# They can cause serious problems if a builder's source tree is in a directory
2937# whose full name contains unusual characters.
2938ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2939ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2940ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2941
2942
2943# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2944
2945#
2946# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2947# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2948#
2949# This code is free software; you can redistribute it and/or modify it
2950# under the terms of the GNU General Public License version 2 only, as
2951# published by the Free Software Foundation.  Oracle designates this
2952# particular file as subject to the "Classpath" exception as provided
2953# by Oracle in the LICENSE file that accompanied this code.
2954#
2955# This code is distributed in the hope that it will be useful, but WITHOUT
2956# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2957# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2958# version 2 for more details (a copy is included in the LICENSE file that
2959# accompanied this code).
2960#
2961# You should have received a copy of the GNU General Public License version
2962# 2 along with this work; if not, write to the Free Software Foundation,
2963# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2964#
2965# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2966# or visit www.oracle.com if you need additional information or have any
2967# questions.
2968#
2969
2970#
2971# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2972#
2973# This program is free software; you can redistribute it and/or modify
2974# it under the terms of the GNU General Public License as published by
2975# the Free Software Foundation; either version 2 of the License, or
2976# (at your option) any later version.
2977#
2978# This program is distributed in the hope that it will be useful, but
2979# WITHOUT ANY WARRANTY; without even the implied warranty of
2980# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2981# General Public License for more details.
2982#
2983# You should have received a copy of the GNU General Public License
2984# along with this program; if not, write to the Free Software
2985# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2986#
2987# As a special exception to the GNU General Public License, if you
2988# distribute this file as part of a program that contains a
2989# configuration script generated by Autoconf, you may include it under
2990# the same distribution terms that you use for the rest of that program.
2991
2992# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2993# ----------------------------------
2994# PKG_PROG_PKG_CONFIG
2995
2996# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2997#
2998# Check to see whether a particular set of modules exists.  Similar
2999# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3000#
3001#
3002# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3003# this or PKG_CHECK_MODULES is called, or make sure to call
3004# PKG_CHECK_EXISTS manually
3005# --------------------------------------------------------------
3006
3007
3008
3009# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3010# ---------------------------------------------
3011# _PKG_CONFIG
3012
3013# _PKG_SHORT_ERRORS_SUPPORTED
3014# -----------------------------
3015# _PKG_SHORT_ERRORS_SUPPORTED
3016
3017
3018# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3019# [ACTION-IF-NOT-FOUND])
3020#
3021#
3022# Note that if there is a possibility the first call to
3023# PKG_CHECK_MODULES might not happen, you should be sure to include an
3024# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3025#
3026#
3027# --------------------------------------------------------------
3028# PKG_CHECK_MODULES
3029
3030
3031# Include these first...
3032#
3033# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3034# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3035#
3036# This code is free software; you can redistribute it and/or modify it
3037# under the terms of the GNU General Public License version 2 only, as
3038# published by the Free Software Foundation.  Oracle designates this
3039# particular file as subject to the "Classpath" exception as provided
3040# by Oracle in the LICENSE file that accompanied this code.
3041#
3042# This code is distributed in the hope that it will be useful, but WITHOUT
3043# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3044# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3045# version 2 for more details (a copy is included in the LICENSE file that
3046# accompanied this code).
3047#
3048# You should have received a copy of the GNU General Public License version
3049# 2 along with this work; if not, write to the Free Software Foundation,
3050# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3051#
3052# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3053# or visit www.oracle.com if you need additional information or have any
3054# questions.
3055#
3056
3057
3058
3059# This will make sure the given variable points to a full and proper
3060# path. This means:
3061# 1) There will be no spaces in the path. On posix platforms,
3062#    spaces in the path will result in an error. On Windows,
3063#    the path will be rewritten using short-style to be space-free.
3064# 2) The path will be absolute, and it will be in unix-style (on
3065#     cygwin).
3066# $1: The name of the variable to fix
3067
3068
3069# This will make sure the given variable points to a executable
3070# with a full and proper path. This means:
3071# 1) There will be no spaces in the path. On posix platforms,
3072#    spaces in the path will result in an error. On Windows,
3073#    the path will be rewritten using short-style to be space-free.
3074# 2) The path will be absolute, and it will be in unix-style (on
3075#     cygwin).
3076# Any arguments given to the executable is preserved.
3077# If the input variable does not have a directory specification, then
3078# it need to be in the PATH.
3079# $1: The name of the variable to fix
3080
3081
3082
3083
3084
3085
3086# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3087# $1: variable to check
3088# $2: executable name to print in warning (optional)
3089
3090
3091# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3092# Arguments as AC_PATH_PROG:
3093# $1: variable to set
3094# $2: executable name to look for
3095
3096
3097# Setup the most fundamental tools that relies on not much else to set up,
3098# but is used by much of the early bootstrap code.
3099
3100
3101# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3102
3103
3104
3105
3106
3107
3108
3109#%%% Simple tools %%%
3110
3111# Check if we have found a usable version of make
3112# $1: the path to a potential make binary (or empty)
3113# $2: the description on how we found this
3114
3115
3116# Goes looking for a usable version of GNU make.
3117
3118
3119
3120
3121
3122
3123# Check if build directory is on local disk. If not possible to determine,
3124# we prefer to claim it's local.
3125# Argument 1: directory to test
3126# Argument 2: what to do if it is on local disk
3127# Argument 3: what to do otherwise (remote disk or failure)
3128
3129
3130# Check that source files have basic read permissions set. This might
3131# not be the case in cygwin in certain conditions.
3132
3133
3134
3135
3136#
3137# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3138# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3139#
3140# This code is free software; you can redistribute it and/or modify it
3141# under the terms of the GNU General Public License version 2 only, as
3142# published by the Free Software Foundation.  Oracle designates this
3143# particular file as subject to the "Classpath" exception as provided
3144# by Oracle in the LICENSE file that accompanied this code.
3145#
3146# This code is distributed in the hope that it will be useful, but WITHOUT
3147# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3148# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3149# version 2 for more details (a copy is included in the LICENSE file that
3150# accompanied this code).
3151#
3152# You should have received a copy of the GNU General Public License version
3153# 2 along with this work; if not, write to the Free Software Foundation,
3154# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3155#
3156# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3157# or visit www.oracle.com if you need additional information or have any
3158# questions.
3159#
3160
3161
3162
3163
3164
3165# Helper function which possibly converts a path using DOS-style short mode.
3166# If so, the updated path is stored in $new_path.
3167# $1: The path to check
3168
3169
3170# Helper function which possibly converts a path using DOS-style short mode.
3171# If so, the updated path is stored in $new_path.
3172# $1: The path to check
3173
3174
3175# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3176# and could probably be heavily simplified. However, all changes in this
3177# area tend to need lot of testing in different scenarios, and in lack of
3178# proper unit testing, cleaning this up has not been deemed worth the effort
3179# at the moment.
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3190
3191
3192
3193
3194#
3195# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3196# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3197#
3198# This code is free software; you can redistribute it and/or modify it
3199# under the terms of the GNU General Public License version 2 only, as
3200# published by the Free Software Foundation.  Oracle designates this
3201# particular file as subject to the "Classpath" exception as provided
3202# by Oracle in the LICENSE file that accompanied this code.
3203#
3204# This code is distributed in the hope that it will be useful, but WITHOUT
3205# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3206# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3207# version 2 for more details (a copy is included in the LICENSE file that
3208# accompanied this code).
3209#
3210# You should have received a copy of the GNU General Public License version
3211# 2 along with this work; if not, write to the Free Software Foundation,
3212# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3213#
3214# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3215# or visit www.oracle.com if you need additional information or have any
3216# questions.
3217#
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229# ... then the rest
3230#
3231# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3232# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3233#
3234# This code is free software; you can redistribute it and/or modify it
3235# under the terms of the GNU General Public License version 2 only, as
3236# published by the Free Software Foundation.  Oracle designates this
3237# particular file as subject to the "Classpath" exception as provided
3238# by Oracle in the LICENSE file that accompanied this code.
3239#
3240# This code is distributed in the hope that it will be useful, but WITHOUT
3241# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3242# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3243# version 2 for more details (a copy is included in the LICENSE file that
3244# accompanied this code).
3245#
3246# You should have received a copy of the GNU General Public License version
3247# 2 along with this work; if not, write to the Free Software Foundation,
3248# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3249#
3250# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3251# or visit www.oracle.com if you need additional information or have any
3252# questions.
3253#
3254
3255# Execute the check given as argument, and verify the result
3256# If the Boot JDK was previously found, do nothing
3257# $1 A command line (typically autoconf macro) to execute
3258
3259
3260# Test: Is bootjdk explicitely set by command line arguments?
3261
3262
3263# Test: Is bootjdk available from builddeps?
3264
3265
3266# Test: Is $JAVA_HOME set?
3267
3268
3269# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3270
3271
3272# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3273
3274
3275# Look for a jdk in the given path. If there are multiple, try to select the newest.
3276# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3277# $1 = Path to directory containing jdk installations.
3278# $2 = String to append to the found JDK directory to get the proper JDK home
3279
3280
3281# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3282# environmental variable as base for where to look.
3283# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3284
3285
3286# Test: Is there a JDK installed in default, well-known locations?
3287
3288
3289# Check that a command-line tool in the Boot JDK is correct
3290# $1 = name of variable to assign
3291# $2 = name of binary
3292
3293
3294###############################################################################
3295#
3296# We need a Boot JDK to bootstrap the build.
3297#
3298
3299
3300
3301
3302
3303#
3304# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3305# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3306#
3307# This code is free software; you can redistribute it and/or modify it
3308# under the terms of the GNU General Public License version 2 only, as
3309# published by the Free Software Foundation.  Oracle designates this
3310# particular file as subject to the "Classpath" exception as provided
3311# by Oracle in the LICENSE file that accompanied this code.
3312#
3313# This code is distributed in the hope that it will be useful, but WITHOUT
3314# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3315# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3316# version 2 for more details (a copy is included in the LICENSE file that
3317# accompanied this code).
3318#
3319# You should have received a copy of the GNU General Public License version
3320# 2 along with this work; if not, write to the Free Software Foundation,
3321# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3322#
3323# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3324# or visit www.oracle.com if you need additional information or have any
3325# questions.
3326#
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347#
3348# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3349# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3350#
3351# This code is free software; you can redistribute it and/or modify it
3352# under the terms of the GNU General Public License version 2 only, as
3353# published by the Free Software Foundation.  Oracle designates this
3354# particular file as subject to the "Classpath" exception as provided
3355# by Oracle in the LICENSE file that accompanied this code.
3356#
3357# This code is distributed in the hope that it will be useful, but WITHOUT
3358# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3359# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3360# version 2 for more details (a copy is included in the LICENSE file that
3361# accompanied this code).
3362#
3363# You should have received a copy of the GNU General Public License version
3364# 2 along with this work; if not, write to the Free Software Foundation,
3365# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3366#
3367# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3368# or visit www.oracle.com if you need additional information or have any
3369# questions.
3370#
3371
3372
3373
3374
3375
3376cygwin_help() {
3377    case $1 in
3378    unzip)
3379        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3380    zip)
3381        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3382    make)
3383        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3384    * )
3385       break ;;
3386    esac
3387}
3388
3389apt_help() {
3390    case $1 in
3391    devkit)
3392        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3393    openjdk)
3394        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3395    alsa)
3396        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3397    cups)
3398        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3399    freetype2)
3400        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3401    pulse)
3402        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3403    x11)
3404        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3405    ccache)
3406        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3407    * )
3408       break ;;
3409    esac
3410}
3411
3412yum_help() {
3413    case $1 in
3414    devkit)
3415        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3416    openjdk)
3417        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3418    alsa)
3419        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3420    cups)
3421        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3422    freetype2)
3423        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3424    pulse)
3425        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3426    x11)
3427        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3428    ccache)
3429        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3430    * )
3431       break ;;
3432    esac
3433}
3434
3435port_help() {
3436    PKGHANDLER_COMMAND=""
3437}
3438
3439pkgutil_help() {
3440    PKGHANDLER_COMMAND=""
3441}
3442
3443pkgadd_help() {
3444    PKGHANDLER_COMMAND=""
3445}
3446
3447
3448
3449#
3450# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3451# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3452#
3453# This code is free software; you can redistribute it and/or modify it
3454# under the terms of the GNU General Public License version 2 only, as
3455# published by the Free Software Foundation.  Oracle designates this
3456# particular file as subject to the "Classpath" exception as provided
3457# by Oracle in the LICENSE file that accompanied this code.
3458#
3459# This code is distributed in the hope that it will be useful, but WITHOUT
3460# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3461# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3462# version 2 for more details (a copy is included in the LICENSE file that
3463# accompanied this code).
3464#
3465# You should have received a copy of the GNU General Public License version
3466# 2 along with this work; if not, write to the Free Software Foundation,
3467# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3468#
3469# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3470# or visit www.oracle.com if you need additional information or have any
3471# questions.
3472#
3473
3474
3475
3476
3477
3478
3479
3480
3481###############################################################################
3482#
3483# Should we build only OpenJDK even if closed sources are present?
3484#
3485
3486
3487
3488
3489###############################################################################
3490#
3491# Setup version numbers
3492#
3493
3494
3495
3496
3497
3498
3499# Support for customization of the build process. Some build files
3500# will include counterparts from this location, if they exist. This allows
3501# for a degree of customization of the build targets and the rules/recipes
3502# to create them
3503
3504# Check whether --with-custom-make-dir was given.
3505if test "${with_custom_make_dir+set}" = set; then :
3506  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3507fi
3508
3509
3510
3511#
3512# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3513# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3514#
3515# This code is free software; you can redistribute it and/or modify it
3516# under the terms of the GNU General Public License version 2 only, as
3517# published by the Free Software Foundation.  Oracle designates this
3518# particular file as subject to the "Classpath" exception as provided
3519# by Oracle in the LICENSE file that accompanied this code.
3520#
3521# This code is distributed in the hope that it will be useful, but WITHOUT
3522# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3523# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3524# version 2 for more details (a copy is included in the LICENSE file that
3525# accompanied this code).
3526#
3527# You should have received a copy of the GNU General Public License version
3528# 2 along with this work; if not, write to the Free Software Foundation,
3529# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3530#
3531# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3532# or visit www.oracle.com if you need additional information or have any
3533# questions.
3534#
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550#
3551# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
3573#
3574
3575# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3576# Converts autoconf style CPU name to OpenJDK style, into
3577# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3578
3579
3580# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3581# Converts autoconf style OS name to OpenJDK style, into
3582# VAR_OS and VAR_OS_API.
3583
3584
3585# Expects $host_os $host_cpu $build_os and $build_cpu
3586# and $with_target_bits to have been setup!
3587#
3588# Translate the standard triplet(quadruplet) definition
3589# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3590# OPENJDK_BUILD_OS, etc.
3591
3592
3593# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3594# accordingly. Must be done after setting up build and target system, but before
3595# doing anything else with these values.
3596
3597
3598    # Setup the legacy variables, for controlling the old makefiles.
3599    #
3600
3601
3602
3603
3604#%%% Build and target systems %%%
3605
3606
3607
3608
3609# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3610# Add -mX to various FLAGS variables.
3611
3612
3613
3614
3615
3616
3617#
3618# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3619# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3620#
3621# This code is free software; you can redistribute it and/or modify it
3622# under the terms of the GNU General Public License version 2 only, as
3623# published by the Free Software Foundation.  Oracle designates this
3624# particular file as subject to the "Classpath" exception as provided
3625# by Oracle in the LICENSE file that accompanied this code.
3626#
3627# This code is distributed in the hope that it will be useful, but WITHOUT
3628# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3629# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3630# version 2 for more details (a copy is included in the LICENSE file that
3631# accompanied this code).
3632#
3633# You should have received a copy of the GNU General Public License version
3634# 2 along with this work; if not, write to the Free Software Foundation,
3635# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3636#
3637# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3638# or visit www.oracle.com if you need additional information or have any
3639# questions.
3640#
3641
3642
3643
3644
3645
3646
3647
3648
3649#
3650# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3651# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3652#
3653# This code is free software; you can redistribute it and/or modify it
3654# under the terms of the GNU General Public License version 2 only, as
3655# published by the Free Software Foundation.  Oracle designates this
3656# particular file as subject to the "Classpath" exception as provided
3657# by Oracle in the LICENSE file that accompanied this code.
3658#
3659# This code is distributed in the hope that it will be useful, but WITHOUT
3660# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3661# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3662# version 2 for more details (a copy is included in the LICENSE file that
3663# accompanied this code).
3664#
3665# You should have received a copy of the GNU General Public License version
3666# 2 along with this work; if not, write to the Free Software Foundation,
3667# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3668#
3669# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3670# or visit www.oracle.com if you need additional information or have any
3671# questions.
3672#
3673
3674# $1 = compiler to test (CC or CXX)
3675# $2 = human readable name of compiler (C or C++)
3676
3677
3678
3679
3680
3681# $1 = compiler to test (CC or CXX)
3682# $2 = human readable name of compiler (C or C++)
3683# $3 = list of compiler names to search for
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696#
3697# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3698# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3699#
3700# This code is free software; you can redistribute it and/or modify it
3701# under the terms of the GNU General Public License version 2 only, as
3702# published by the Free Software Foundation.  Oracle designates this
3703# particular file as subject to the "Classpath" exception as provided
3704# by Oracle in the LICENSE file that accompanied this code.
3705#
3706# This code is distributed in the hope that it will be useful, but WITHOUT
3707# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3708# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3709# version 2 for more details (a copy is included in the LICENSE file that
3710# accompanied this code).
3711#
3712# You should have received a copy of the GNU General Public License version
3713# 2 along with this work; if not, write to the Free Software Foundation,
3714# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3715#
3716# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3717# or visit www.oracle.com if you need additional information or have any
3718# questions.
3719#
3720
3721
3722
3723
3724
3725
3726
3727# Check if the VS env variables were setup prior to running configure.
3728# If not, then find vcvarsall.bat and run it automatically, and integrate
3729# the set env variables into the spec file.
3730
3731
3732
3733# Setup the DXSDK paths
3734
3735
3736
3737
3738
3739
3740# This line needs to be here, verbatim, after all includes and the dummy hook
3741# definitions. It is replaced with custom functionality when building
3742# custom sources.
3743#CUSTOM_AUTOCONF_INCLUDE
3744
3745# Do not change or remove the following line, it is needed for consistency checks:
3746DATE_WHEN_GENERATED=1362563419
3747
3748###############################################################################
3749#
3750# Initialization / Boot-strapping
3751#
3752# The bootstrapping process needs to solve the "chicken or the egg" problem,
3753# thus it jumps back and forth, each time gaining something needed later on.
3754#
3755###############################################################################
3756
3757# Basic initialization that must happen first of all
3758
3759# Save the original command line. This is passed to us by the wrapper configure script.
3760
3761DATE_WHEN_CONFIGURED=`LANG=C date`
3762
3763{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3764$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3766$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3767
3768
3769
3770# Start with tools that do not need have cross compilation support
3771# and can be expected to be found in the default PATH. These tools are
3772# used by configure. Nor are these tools expected to be found in the
3773# devkit from the builddeps server either, since they are
3774# needed to download the devkit.
3775
3776# First are all the simple required tools.
3777
3778    for ac_prog in basename
3779do
3780  # Extract the first word of "$ac_prog", so it can be a program name with args.
3781set dummy $ac_prog; ac_word=$2
3782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3783$as_echo_n "checking for $ac_word... " >&6; }
3784if test "${ac_cv_path_BASENAME+set}" = set; then :
3785  $as_echo_n "(cached) " >&6
3786else
3787  case $BASENAME in
3788  [\\/]* | ?:[\\/]*)
3789  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3790  ;;
3791  *)
3792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3793for as_dir in $PATH
3794do
3795  IFS=$as_save_IFS
3796  test -z "$as_dir" && as_dir=.
3797    for ac_exec_ext in '' $ac_executable_extensions; do
3798  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3799    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3801    break 2
3802  fi
3803done
3804  done
3805IFS=$as_save_IFS
3806
3807  ;;
3808esac
3809fi
3810BASENAME=$ac_cv_path_BASENAME
3811if test -n "$BASENAME"; then
3812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3813$as_echo "$BASENAME" >&6; }
3814else
3815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3816$as_echo "no" >&6; }
3817fi
3818
3819
3820  test -n "$BASENAME" && break
3821done
3822
3823
3824    if test "x$BASENAME" = x; then
3825        if test "xbasename" = x; then
3826          PROG_NAME=basename
3827        else
3828          PROG_NAME=basename
3829        fi
3830        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3831$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3832        as_fn_error $? "Cannot continue" "$LINENO" 5
3833    fi
3834
3835
3836
3837    for ac_prog in bash
3838do
3839  # Extract the first word of "$ac_prog", so it can be a program name with args.
3840set dummy $ac_prog; ac_word=$2
3841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3842$as_echo_n "checking for $ac_word... " >&6; }
3843if test "${ac_cv_path_BASH+set}" = set; then :
3844  $as_echo_n "(cached) " >&6
3845else
3846  case $BASH in
3847  [\\/]* | ?:[\\/]*)
3848  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3849  ;;
3850  *)
3851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3852for as_dir in $PATH
3853do
3854  IFS=$as_save_IFS
3855  test -z "$as_dir" && as_dir=.
3856    for ac_exec_ext in '' $ac_executable_extensions; do
3857  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3858    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3860    break 2
3861  fi
3862done
3863  done
3864IFS=$as_save_IFS
3865
3866  ;;
3867esac
3868fi
3869BASH=$ac_cv_path_BASH
3870if test -n "$BASH"; then
3871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3872$as_echo "$BASH" >&6; }
3873else
3874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3875$as_echo "no" >&6; }
3876fi
3877
3878
3879  test -n "$BASH" && break
3880done
3881
3882
3883    if test "x$BASH" = x; then
3884        if test "xbash" = x; then
3885          PROG_NAME=bash
3886        else
3887          PROG_NAME=bash
3888        fi
3889        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3890$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3891        as_fn_error $? "Cannot continue" "$LINENO" 5
3892    fi
3893
3894
3895
3896    for ac_prog in cat
3897do
3898  # Extract the first word of "$ac_prog", so it can be a program name with args.
3899set dummy $ac_prog; ac_word=$2
3900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3901$as_echo_n "checking for $ac_word... " >&6; }
3902if test "${ac_cv_path_CAT+set}" = set; then :
3903  $as_echo_n "(cached) " >&6
3904else
3905  case $CAT in
3906  [\\/]* | ?:[\\/]*)
3907  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3908  ;;
3909  *)
3910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3911for as_dir in $PATH
3912do
3913  IFS=$as_save_IFS
3914  test -z "$as_dir" && as_dir=.
3915    for ac_exec_ext in '' $ac_executable_extensions; do
3916  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3917    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3919    break 2
3920  fi
3921done
3922  done
3923IFS=$as_save_IFS
3924
3925  ;;
3926esac
3927fi
3928CAT=$ac_cv_path_CAT
3929if test -n "$CAT"; then
3930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3931$as_echo "$CAT" >&6; }
3932else
3933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3934$as_echo "no" >&6; }
3935fi
3936
3937
3938  test -n "$CAT" && break
3939done
3940
3941
3942    if test "x$CAT" = x; then
3943        if test "xcat" = x; then
3944          PROG_NAME=cat
3945        else
3946          PROG_NAME=cat
3947        fi
3948        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3949$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3950        as_fn_error $? "Cannot continue" "$LINENO" 5
3951    fi
3952
3953
3954
3955    for ac_prog in chmod
3956do
3957  # Extract the first word of "$ac_prog", so it can be a program name with args.
3958set dummy $ac_prog; ac_word=$2
3959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3960$as_echo_n "checking for $ac_word... " >&6; }
3961if test "${ac_cv_path_CHMOD+set}" = set; then :
3962  $as_echo_n "(cached) " >&6
3963else
3964  case $CHMOD in
3965  [\\/]* | ?:[\\/]*)
3966  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3967  ;;
3968  *)
3969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3970for as_dir in $PATH
3971do
3972  IFS=$as_save_IFS
3973  test -z "$as_dir" && as_dir=.
3974    for ac_exec_ext in '' $ac_executable_extensions; do
3975  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3976    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3978    break 2
3979  fi
3980done
3981  done
3982IFS=$as_save_IFS
3983
3984  ;;
3985esac
3986fi
3987CHMOD=$ac_cv_path_CHMOD
3988if test -n "$CHMOD"; then
3989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3990$as_echo "$CHMOD" >&6; }
3991else
3992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3993$as_echo "no" >&6; }
3994fi
3995
3996
3997  test -n "$CHMOD" && break
3998done
3999
4000
4001    if test "x$CHMOD" = x; then
4002        if test "xchmod" = x; then
4003          PROG_NAME=chmod
4004        else
4005          PROG_NAME=chmod
4006        fi
4007        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4008$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4009        as_fn_error $? "Cannot continue" "$LINENO" 5
4010    fi
4011
4012
4013
4014    for ac_prog in cmp
4015do
4016  # Extract the first word of "$ac_prog", so it can be a program name with args.
4017set dummy $ac_prog; ac_word=$2
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4019$as_echo_n "checking for $ac_word... " >&6; }
4020if test "${ac_cv_path_CMP+set}" = set; then :
4021  $as_echo_n "(cached) " >&6
4022else
4023  case $CMP in
4024  [\\/]* | ?:[\\/]*)
4025  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4026  ;;
4027  *)
4028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4029for as_dir in $PATH
4030do
4031  IFS=$as_save_IFS
4032  test -z "$as_dir" && as_dir=.
4033    for ac_exec_ext in '' $ac_executable_extensions; do
4034  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4035    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4037    break 2
4038  fi
4039done
4040  done
4041IFS=$as_save_IFS
4042
4043  ;;
4044esac
4045fi
4046CMP=$ac_cv_path_CMP
4047if test -n "$CMP"; then
4048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4049$as_echo "$CMP" >&6; }
4050else
4051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4052$as_echo "no" >&6; }
4053fi
4054
4055
4056  test -n "$CMP" && break
4057done
4058
4059
4060    if test "x$CMP" = x; then
4061        if test "xcmp" = x; then
4062          PROG_NAME=cmp
4063        else
4064          PROG_NAME=cmp
4065        fi
4066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4067$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4068        as_fn_error $? "Cannot continue" "$LINENO" 5
4069    fi
4070
4071
4072
4073    for ac_prog in comm
4074do
4075  # Extract the first word of "$ac_prog", so it can be a program name with args.
4076set dummy $ac_prog; ac_word=$2
4077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4078$as_echo_n "checking for $ac_word... " >&6; }
4079if test "${ac_cv_path_COMM+set}" = set; then :
4080  $as_echo_n "(cached) " >&6
4081else
4082  case $COMM in
4083  [\\/]* | ?:[\\/]*)
4084  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4085  ;;
4086  *)
4087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4088for as_dir in $PATH
4089do
4090  IFS=$as_save_IFS
4091  test -z "$as_dir" && as_dir=.
4092    for ac_exec_ext in '' $ac_executable_extensions; do
4093  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4094    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4096    break 2
4097  fi
4098done
4099  done
4100IFS=$as_save_IFS
4101
4102  ;;
4103esac
4104fi
4105COMM=$ac_cv_path_COMM
4106if test -n "$COMM"; then
4107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4108$as_echo "$COMM" >&6; }
4109else
4110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4111$as_echo "no" >&6; }
4112fi
4113
4114
4115  test -n "$COMM" && break
4116done
4117
4118
4119    if test "x$COMM" = x; then
4120        if test "xcomm" = x; then
4121          PROG_NAME=comm
4122        else
4123          PROG_NAME=comm
4124        fi
4125        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4126$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4127        as_fn_error $? "Cannot continue" "$LINENO" 5
4128    fi
4129
4130
4131
4132    for ac_prog in cp
4133do
4134  # Extract the first word of "$ac_prog", so it can be a program name with args.
4135set dummy $ac_prog; ac_word=$2
4136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4137$as_echo_n "checking for $ac_word... " >&6; }
4138if test "${ac_cv_path_CP+set}" = set; then :
4139  $as_echo_n "(cached) " >&6
4140else
4141  case $CP in
4142  [\\/]* | ?:[\\/]*)
4143  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4144  ;;
4145  *)
4146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4147for as_dir in $PATH
4148do
4149  IFS=$as_save_IFS
4150  test -z "$as_dir" && as_dir=.
4151    for ac_exec_ext in '' $ac_executable_extensions; do
4152  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4153    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4155    break 2
4156  fi
4157done
4158  done
4159IFS=$as_save_IFS
4160
4161  ;;
4162esac
4163fi
4164CP=$ac_cv_path_CP
4165if test -n "$CP"; then
4166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4167$as_echo "$CP" >&6; }
4168else
4169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4170$as_echo "no" >&6; }
4171fi
4172
4173
4174  test -n "$CP" && break
4175done
4176
4177
4178    if test "x$CP" = x; then
4179        if test "xcp" = x; then
4180          PROG_NAME=cp
4181        else
4182          PROG_NAME=cp
4183        fi
4184        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4185$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4186        as_fn_error $? "Cannot continue" "$LINENO" 5
4187    fi
4188
4189
4190
4191    for ac_prog in cpio
4192do
4193  # Extract the first word of "$ac_prog", so it can be a program name with args.
4194set dummy $ac_prog; ac_word=$2
4195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4196$as_echo_n "checking for $ac_word... " >&6; }
4197if test "${ac_cv_path_CPIO+set}" = set; then :
4198  $as_echo_n "(cached) " >&6
4199else
4200  case $CPIO in
4201  [\\/]* | ?:[\\/]*)
4202  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4203  ;;
4204  *)
4205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4206for as_dir in $PATH
4207do
4208  IFS=$as_save_IFS
4209  test -z "$as_dir" && as_dir=.
4210    for ac_exec_ext in '' $ac_executable_extensions; do
4211  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4212    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4214    break 2
4215  fi
4216done
4217  done
4218IFS=$as_save_IFS
4219
4220  ;;
4221esac
4222fi
4223CPIO=$ac_cv_path_CPIO
4224if test -n "$CPIO"; then
4225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4226$as_echo "$CPIO" >&6; }
4227else
4228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4229$as_echo "no" >&6; }
4230fi
4231
4232
4233  test -n "$CPIO" && break
4234done
4235
4236
4237    if test "x$CPIO" = x; then
4238        if test "xcpio" = x; then
4239          PROG_NAME=cpio
4240        else
4241          PROG_NAME=cpio
4242        fi
4243        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4244$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4245        as_fn_error $? "Cannot continue" "$LINENO" 5
4246    fi
4247
4248
4249
4250    for ac_prog in cut
4251do
4252  # Extract the first word of "$ac_prog", so it can be a program name with args.
4253set dummy $ac_prog; ac_word=$2
4254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4255$as_echo_n "checking for $ac_word... " >&6; }
4256if test "${ac_cv_path_CUT+set}" = set; then :
4257  $as_echo_n "(cached) " >&6
4258else
4259  case $CUT in
4260  [\\/]* | ?:[\\/]*)
4261  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4262  ;;
4263  *)
4264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4265for as_dir in $PATH
4266do
4267  IFS=$as_save_IFS
4268  test -z "$as_dir" && as_dir=.
4269    for ac_exec_ext in '' $ac_executable_extensions; do
4270  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4271    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4273    break 2
4274  fi
4275done
4276  done
4277IFS=$as_save_IFS
4278
4279  ;;
4280esac
4281fi
4282CUT=$ac_cv_path_CUT
4283if test -n "$CUT"; then
4284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4285$as_echo "$CUT" >&6; }
4286else
4287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4288$as_echo "no" >&6; }
4289fi
4290
4291
4292  test -n "$CUT" && break
4293done
4294
4295
4296    if test "x$CUT" = x; then
4297        if test "xcut" = x; then
4298          PROG_NAME=cut
4299        else
4300          PROG_NAME=cut
4301        fi
4302        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4303$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4304        as_fn_error $? "Cannot continue" "$LINENO" 5
4305    fi
4306
4307
4308
4309    for ac_prog in date
4310do
4311  # Extract the first word of "$ac_prog", so it can be a program name with args.
4312set dummy $ac_prog; ac_word=$2
4313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4314$as_echo_n "checking for $ac_word... " >&6; }
4315if test "${ac_cv_path_DATE+set}" = set; then :
4316  $as_echo_n "(cached) " >&6
4317else
4318  case $DATE in
4319  [\\/]* | ?:[\\/]*)
4320  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4321  ;;
4322  *)
4323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4324for as_dir in $PATH
4325do
4326  IFS=$as_save_IFS
4327  test -z "$as_dir" && as_dir=.
4328    for ac_exec_ext in '' $ac_executable_extensions; do
4329  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4330    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4332    break 2
4333  fi
4334done
4335  done
4336IFS=$as_save_IFS
4337
4338  ;;
4339esac
4340fi
4341DATE=$ac_cv_path_DATE
4342if test -n "$DATE"; then
4343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4344$as_echo "$DATE" >&6; }
4345else
4346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4347$as_echo "no" >&6; }
4348fi
4349
4350
4351  test -n "$DATE" && break
4352done
4353
4354
4355    if test "x$DATE" = x; then
4356        if test "xdate" = x; then
4357          PROG_NAME=date
4358        else
4359          PROG_NAME=date
4360        fi
4361        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4362$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4363        as_fn_error $? "Cannot continue" "$LINENO" 5
4364    fi
4365
4366
4367
4368    for ac_prog in gdiff diff
4369do
4370  # Extract the first word of "$ac_prog", so it can be a program name with args.
4371set dummy $ac_prog; ac_word=$2
4372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4373$as_echo_n "checking for $ac_word... " >&6; }
4374if test "${ac_cv_path_DIFF+set}" = set; then :
4375  $as_echo_n "(cached) " >&6
4376else
4377  case $DIFF in
4378  [\\/]* | ?:[\\/]*)
4379  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4380  ;;
4381  *)
4382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4383for as_dir in $PATH
4384do
4385  IFS=$as_save_IFS
4386  test -z "$as_dir" && as_dir=.
4387    for ac_exec_ext in '' $ac_executable_extensions; do
4388  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4389    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4391    break 2
4392  fi
4393done
4394  done
4395IFS=$as_save_IFS
4396
4397  ;;
4398esac
4399fi
4400DIFF=$ac_cv_path_DIFF
4401if test -n "$DIFF"; then
4402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4403$as_echo "$DIFF" >&6; }
4404else
4405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4406$as_echo "no" >&6; }
4407fi
4408
4409
4410  test -n "$DIFF" && break
4411done
4412
4413
4414    if test "x$DIFF" = x; then
4415        if test "xgdiff diff" = x; then
4416          PROG_NAME=diff
4417        else
4418          PROG_NAME=gdiff diff
4419        fi
4420        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4421$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4422        as_fn_error $? "Cannot continue" "$LINENO" 5
4423    fi
4424
4425
4426
4427    for ac_prog in dirname
4428do
4429  # Extract the first word of "$ac_prog", so it can be a program name with args.
4430set dummy $ac_prog; ac_word=$2
4431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432$as_echo_n "checking for $ac_word... " >&6; }
4433if test "${ac_cv_path_DIRNAME+set}" = set; then :
4434  $as_echo_n "(cached) " >&6
4435else
4436  case $DIRNAME in
4437  [\\/]* | ?:[\\/]*)
4438  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4439  ;;
4440  *)
4441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442for as_dir in $PATH
4443do
4444  IFS=$as_save_IFS
4445  test -z "$as_dir" && as_dir=.
4446    for ac_exec_ext in '' $ac_executable_extensions; do
4447  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4448    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4450    break 2
4451  fi
4452done
4453  done
4454IFS=$as_save_IFS
4455
4456  ;;
4457esac
4458fi
4459DIRNAME=$ac_cv_path_DIRNAME
4460if test -n "$DIRNAME"; then
4461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4462$as_echo "$DIRNAME" >&6; }
4463else
4464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465$as_echo "no" >&6; }
4466fi
4467
4468
4469  test -n "$DIRNAME" && break
4470done
4471
4472
4473    if test "x$DIRNAME" = x; then
4474        if test "xdirname" = x; then
4475          PROG_NAME=dirname
4476        else
4477          PROG_NAME=dirname
4478        fi
4479        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4480$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4481        as_fn_error $? "Cannot continue" "$LINENO" 5
4482    fi
4483
4484
4485
4486    for ac_prog in echo
4487do
4488  # Extract the first word of "$ac_prog", so it can be a program name with args.
4489set dummy $ac_prog; ac_word=$2
4490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4491$as_echo_n "checking for $ac_word... " >&6; }
4492if test "${ac_cv_path_ECHO+set}" = set; then :
4493  $as_echo_n "(cached) " >&6
4494else
4495  case $ECHO in
4496  [\\/]* | ?:[\\/]*)
4497  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4498  ;;
4499  *)
4500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4501for as_dir in $PATH
4502do
4503  IFS=$as_save_IFS
4504  test -z "$as_dir" && as_dir=.
4505    for ac_exec_ext in '' $ac_executable_extensions; do
4506  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4507    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4509    break 2
4510  fi
4511done
4512  done
4513IFS=$as_save_IFS
4514
4515  ;;
4516esac
4517fi
4518ECHO=$ac_cv_path_ECHO
4519if test -n "$ECHO"; then
4520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4521$as_echo "$ECHO" >&6; }
4522else
4523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4524$as_echo "no" >&6; }
4525fi
4526
4527
4528  test -n "$ECHO" && break
4529done
4530
4531
4532    if test "x$ECHO" = x; then
4533        if test "xecho" = x; then
4534          PROG_NAME=echo
4535        else
4536          PROG_NAME=echo
4537        fi
4538        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4539$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4540        as_fn_error $? "Cannot continue" "$LINENO" 5
4541    fi
4542
4543
4544
4545    for ac_prog in expr
4546do
4547  # Extract the first word of "$ac_prog", so it can be a program name with args.
4548set dummy $ac_prog; ac_word=$2
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4550$as_echo_n "checking for $ac_word... " >&6; }
4551if test "${ac_cv_path_EXPR+set}" = set; then :
4552  $as_echo_n "(cached) " >&6
4553else
4554  case $EXPR in
4555  [\\/]* | ?:[\\/]*)
4556  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4557  ;;
4558  *)
4559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4560for as_dir in $PATH
4561do
4562  IFS=$as_save_IFS
4563  test -z "$as_dir" && as_dir=.
4564    for ac_exec_ext in '' $ac_executable_extensions; do
4565  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4566    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4568    break 2
4569  fi
4570done
4571  done
4572IFS=$as_save_IFS
4573
4574  ;;
4575esac
4576fi
4577EXPR=$ac_cv_path_EXPR
4578if test -n "$EXPR"; then
4579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4580$as_echo "$EXPR" >&6; }
4581else
4582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4583$as_echo "no" >&6; }
4584fi
4585
4586
4587  test -n "$EXPR" && break
4588done
4589
4590
4591    if test "x$EXPR" = x; then
4592        if test "xexpr" = x; then
4593          PROG_NAME=expr
4594        else
4595          PROG_NAME=expr
4596        fi
4597        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4598$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4599        as_fn_error $? "Cannot continue" "$LINENO" 5
4600    fi
4601
4602
4603
4604    for ac_prog in file
4605do
4606  # Extract the first word of "$ac_prog", so it can be a program name with args.
4607set dummy $ac_prog; ac_word=$2
4608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4609$as_echo_n "checking for $ac_word... " >&6; }
4610if test "${ac_cv_path_FILE+set}" = set; then :
4611  $as_echo_n "(cached) " >&6
4612else
4613  case $FILE in
4614  [\\/]* | ?:[\\/]*)
4615  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4616  ;;
4617  *)
4618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4619for as_dir in $PATH
4620do
4621  IFS=$as_save_IFS
4622  test -z "$as_dir" && as_dir=.
4623    for ac_exec_ext in '' $ac_executable_extensions; do
4624  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4625    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4627    break 2
4628  fi
4629done
4630  done
4631IFS=$as_save_IFS
4632
4633  ;;
4634esac
4635fi
4636FILE=$ac_cv_path_FILE
4637if test -n "$FILE"; then
4638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4639$as_echo "$FILE" >&6; }
4640else
4641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4642$as_echo "no" >&6; }
4643fi
4644
4645
4646  test -n "$FILE" && break
4647done
4648
4649
4650    if test "x$FILE" = x; then
4651        if test "xfile" = x; then
4652          PROG_NAME=file
4653        else
4654          PROG_NAME=file
4655        fi
4656        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4657$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4658        as_fn_error $? "Cannot continue" "$LINENO" 5
4659    fi
4660
4661
4662
4663    for ac_prog in find
4664do
4665  # Extract the first word of "$ac_prog", so it can be a program name with args.
4666set dummy $ac_prog; ac_word=$2
4667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4668$as_echo_n "checking for $ac_word... " >&6; }
4669if test "${ac_cv_path_FIND+set}" = set; then :
4670  $as_echo_n "(cached) " >&6
4671else
4672  case $FIND in
4673  [\\/]* | ?:[\\/]*)
4674  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4675  ;;
4676  *)
4677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4678for as_dir in $PATH
4679do
4680  IFS=$as_save_IFS
4681  test -z "$as_dir" && as_dir=.
4682    for ac_exec_ext in '' $ac_executable_extensions; do
4683  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4684    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4686    break 2
4687  fi
4688done
4689  done
4690IFS=$as_save_IFS
4691
4692  ;;
4693esac
4694fi
4695FIND=$ac_cv_path_FIND
4696if test -n "$FIND"; then
4697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4698$as_echo "$FIND" >&6; }
4699else
4700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701$as_echo "no" >&6; }
4702fi
4703
4704
4705  test -n "$FIND" && break
4706done
4707
4708
4709    if test "x$FIND" = x; then
4710        if test "xfind" = x; then
4711          PROG_NAME=find
4712        else
4713          PROG_NAME=find
4714        fi
4715        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4716$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4717        as_fn_error $? "Cannot continue" "$LINENO" 5
4718    fi
4719
4720
4721
4722    for ac_prog in head
4723do
4724  # Extract the first word of "$ac_prog", so it can be a program name with args.
4725set dummy $ac_prog; ac_word=$2
4726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4727$as_echo_n "checking for $ac_word... " >&6; }
4728if test "${ac_cv_path_HEAD+set}" = set; then :
4729  $as_echo_n "(cached) " >&6
4730else
4731  case $HEAD in
4732  [\\/]* | ?:[\\/]*)
4733  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4734  ;;
4735  *)
4736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4737for as_dir in $PATH
4738do
4739  IFS=$as_save_IFS
4740  test -z "$as_dir" && as_dir=.
4741    for ac_exec_ext in '' $ac_executable_extensions; do
4742  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4743    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4745    break 2
4746  fi
4747done
4748  done
4749IFS=$as_save_IFS
4750
4751  ;;
4752esac
4753fi
4754HEAD=$ac_cv_path_HEAD
4755if test -n "$HEAD"; then
4756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4757$as_echo "$HEAD" >&6; }
4758else
4759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4760$as_echo "no" >&6; }
4761fi
4762
4763
4764  test -n "$HEAD" && break
4765done
4766
4767
4768    if test "x$HEAD" = x; then
4769        if test "xhead" = x; then
4770          PROG_NAME=head
4771        else
4772          PROG_NAME=head
4773        fi
4774        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4775$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4776        as_fn_error $? "Cannot continue" "$LINENO" 5
4777    fi
4778
4779
4780
4781    for ac_prog in ln
4782do
4783  # Extract the first word of "$ac_prog", so it can be a program name with args.
4784set dummy $ac_prog; ac_word=$2
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4786$as_echo_n "checking for $ac_word... " >&6; }
4787if test "${ac_cv_path_LN+set}" = set; then :
4788  $as_echo_n "(cached) " >&6
4789else
4790  case $LN in
4791  [\\/]* | ?:[\\/]*)
4792  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4793  ;;
4794  *)
4795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4796for as_dir in $PATH
4797do
4798  IFS=$as_save_IFS
4799  test -z "$as_dir" && as_dir=.
4800    for ac_exec_ext in '' $ac_executable_extensions; do
4801  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4802    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4804    break 2
4805  fi
4806done
4807  done
4808IFS=$as_save_IFS
4809
4810  ;;
4811esac
4812fi
4813LN=$ac_cv_path_LN
4814if test -n "$LN"; then
4815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4816$as_echo "$LN" >&6; }
4817else
4818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4819$as_echo "no" >&6; }
4820fi
4821
4822
4823  test -n "$LN" && break
4824done
4825
4826
4827    if test "x$LN" = x; then
4828        if test "xln" = x; then
4829          PROG_NAME=ln
4830        else
4831          PROG_NAME=ln
4832        fi
4833        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4834$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4835        as_fn_error $? "Cannot continue" "$LINENO" 5
4836    fi
4837
4838
4839
4840    for ac_prog in ls
4841do
4842  # Extract the first word of "$ac_prog", so it can be a program name with args.
4843set dummy $ac_prog; ac_word=$2
4844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4845$as_echo_n "checking for $ac_word... " >&6; }
4846if test "${ac_cv_path_LS+set}" = set; then :
4847  $as_echo_n "(cached) " >&6
4848else
4849  case $LS in
4850  [\\/]* | ?:[\\/]*)
4851  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4852  ;;
4853  *)
4854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4855for as_dir in $PATH
4856do
4857  IFS=$as_save_IFS
4858  test -z "$as_dir" && as_dir=.
4859    for ac_exec_ext in '' $ac_executable_extensions; do
4860  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4861    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4863    break 2
4864  fi
4865done
4866  done
4867IFS=$as_save_IFS
4868
4869  ;;
4870esac
4871fi
4872LS=$ac_cv_path_LS
4873if test -n "$LS"; then
4874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4875$as_echo "$LS" >&6; }
4876else
4877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4878$as_echo "no" >&6; }
4879fi
4880
4881
4882  test -n "$LS" && break
4883done
4884
4885
4886    if test "x$LS" = x; then
4887        if test "xls" = x; then
4888          PROG_NAME=ls
4889        else
4890          PROG_NAME=ls
4891        fi
4892        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4893$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4894        as_fn_error $? "Cannot continue" "$LINENO" 5
4895    fi
4896
4897
4898
4899    for ac_prog in mkdir
4900do
4901  # Extract the first word of "$ac_prog", so it can be a program name with args.
4902set dummy $ac_prog; ac_word=$2
4903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4904$as_echo_n "checking for $ac_word... " >&6; }
4905if test "${ac_cv_path_MKDIR+set}" = set; then :
4906  $as_echo_n "(cached) " >&6
4907else
4908  case $MKDIR in
4909  [\\/]* | ?:[\\/]*)
4910  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4911  ;;
4912  *)
4913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914for as_dir in $PATH
4915do
4916  IFS=$as_save_IFS
4917  test -z "$as_dir" && as_dir=.
4918    for ac_exec_ext in '' $ac_executable_extensions; do
4919  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4920    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922    break 2
4923  fi
4924done
4925  done
4926IFS=$as_save_IFS
4927
4928  ;;
4929esac
4930fi
4931MKDIR=$ac_cv_path_MKDIR
4932if test -n "$MKDIR"; then
4933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4934$as_echo "$MKDIR" >&6; }
4935else
4936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4937$as_echo "no" >&6; }
4938fi
4939
4940
4941  test -n "$MKDIR" && break
4942done
4943
4944
4945    if test "x$MKDIR" = x; then
4946        if test "xmkdir" = x; then
4947          PROG_NAME=mkdir
4948        else
4949          PROG_NAME=mkdir
4950        fi
4951        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4952$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4953        as_fn_error $? "Cannot continue" "$LINENO" 5
4954    fi
4955
4956
4957
4958    for ac_prog in mktemp
4959do
4960  # Extract the first word of "$ac_prog", so it can be a program name with args.
4961set dummy $ac_prog; ac_word=$2
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963$as_echo_n "checking for $ac_word... " >&6; }
4964if test "${ac_cv_path_MKTEMP+set}" = set; then :
4965  $as_echo_n "(cached) " >&6
4966else
4967  case $MKTEMP in
4968  [\\/]* | ?:[\\/]*)
4969  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4970  ;;
4971  *)
4972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in $PATH
4974do
4975  IFS=$as_save_IFS
4976  test -z "$as_dir" && as_dir=.
4977    for ac_exec_ext in '' $ac_executable_extensions; do
4978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4979    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4981    break 2
4982  fi
4983done
4984  done
4985IFS=$as_save_IFS
4986
4987  ;;
4988esac
4989fi
4990MKTEMP=$ac_cv_path_MKTEMP
4991if test -n "$MKTEMP"; then
4992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4993$as_echo "$MKTEMP" >&6; }
4994else
4995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4996$as_echo "no" >&6; }
4997fi
4998
4999
5000  test -n "$MKTEMP" && break
5001done
5002
5003
5004    if test "x$MKTEMP" = x; then
5005        if test "xmktemp" = x; then
5006          PROG_NAME=mktemp
5007        else
5008          PROG_NAME=mktemp
5009        fi
5010        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5011$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5012        as_fn_error $? "Cannot continue" "$LINENO" 5
5013    fi
5014
5015
5016
5017    for ac_prog in mv
5018do
5019  # Extract the first word of "$ac_prog", so it can be a program name with args.
5020set dummy $ac_prog; ac_word=$2
5021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022$as_echo_n "checking for $ac_word... " >&6; }
5023if test "${ac_cv_path_MV+set}" = set; then :
5024  $as_echo_n "(cached) " >&6
5025else
5026  case $MV in
5027  [\\/]* | ?:[\\/]*)
5028  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5029  ;;
5030  *)
5031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5032for as_dir in $PATH
5033do
5034  IFS=$as_save_IFS
5035  test -z "$as_dir" && as_dir=.
5036    for ac_exec_ext in '' $ac_executable_extensions; do
5037  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5038    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5040    break 2
5041  fi
5042done
5043  done
5044IFS=$as_save_IFS
5045
5046  ;;
5047esac
5048fi
5049MV=$ac_cv_path_MV
5050if test -n "$MV"; then
5051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5052$as_echo "$MV" >&6; }
5053else
5054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5055$as_echo "no" >&6; }
5056fi
5057
5058
5059  test -n "$MV" && break
5060done
5061
5062
5063    if test "x$MV" = x; then
5064        if test "xmv" = x; then
5065          PROG_NAME=mv
5066        else
5067          PROG_NAME=mv
5068        fi
5069        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5070$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5071        as_fn_error $? "Cannot continue" "$LINENO" 5
5072    fi
5073
5074
5075
5076    for ac_prog in printf
5077do
5078  # Extract the first word of "$ac_prog", so it can be a program name with args.
5079set dummy $ac_prog; ac_word=$2
5080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5081$as_echo_n "checking for $ac_word... " >&6; }
5082if test "${ac_cv_path_PRINTF+set}" = set; then :
5083  $as_echo_n "(cached) " >&6
5084else
5085  case $PRINTF in
5086  [\\/]* | ?:[\\/]*)
5087  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5088  ;;
5089  *)
5090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5091for as_dir in $PATH
5092do
5093  IFS=$as_save_IFS
5094  test -z "$as_dir" && as_dir=.
5095    for ac_exec_ext in '' $ac_executable_extensions; do
5096  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5097    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5099    break 2
5100  fi
5101done
5102  done
5103IFS=$as_save_IFS
5104
5105  ;;
5106esac
5107fi
5108PRINTF=$ac_cv_path_PRINTF
5109if test -n "$PRINTF"; then
5110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5111$as_echo "$PRINTF" >&6; }
5112else
5113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5114$as_echo "no" >&6; }
5115fi
5116
5117
5118  test -n "$PRINTF" && break
5119done
5120
5121
5122    if test "x$PRINTF" = x; then
5123        if test "xprintf" = x; then
5124          PROG_NAME=printf
5125        else
5126          PROG_NAME=printf
5127        fi
5128        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5129$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5130        as_fn_error $? "Cannot continue" "$LINENO" 5
5131    fi
5132
5133
5134
5135    for ac_prog in pwd
5136do
5137  # Extract the first word of "$ac_prog", so it can be a program name with args.
5138set dummy $ac_prog; ac_word=$2
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5140$as_echo_n "checking for $ac_word... " >&6; }
5141if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5142  $as_echo_n "(cached) " >&6
5143else
5144  case $THEPWDCMD in
5145  [\\/]* | ?:[\\/]*)
5146  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5147  ;;
5148  *)
5149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5150for as_dir in $PATH
5151do
5152  IFS=$as_save_IFS
5153  test -z "$as_dir" && as_dir=.
5154    for ac_exec_ext in '' $ac_executable_extensions; do
5155  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5156    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5158    break 2
5159  fi
5160done
5161  done
5162IFS=$as_save_IFS
5163
5164  ;;
5165esac
5166fi
5167THEPWDCMD=$ac_cv_path_THEPWDCMD
5168if test -n "$THEPWDCMD"; then
5169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5170$as_echo "$THEPWDCMD" >&6; }
5171else
5172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173$as_echo "no" >&6; }
5174fi
5175
5176
5177  test -n "$THEPWDCMD" && break
5178done
5179
5180
5181    if test "x$THEPWDCMD" = x; then
5182        if test "xpwd" = x; then
5183          PROG_NAME=thepwdcmd
5184        else
5185          PROG_NAME=pwd
5186        fi
5187        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5188$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5189        as_fn_error $? "Cannot continue" "$LINENO" 5
5190    fi
5191
5192
5193
5194    for ac_prog in rm
5195do
5196  # Extract the first word of "$ac_prog", so it can be a program name with args.
5197set dummy $ac_prog; ac_word=$2
5198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5199$as_echo_n "checking for $ac_word... " >&6; }
5200if test "${ac_cv_path_RM+set}" = set; then :
5201  $as_echo_n "(cached) " >&6
5202else
5203  case $RM in
5204  [\\/]* | ?:[\\/]*)
5205  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5206  ;;
5207  *)
5208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5209for as_dir in $PATH
5210do
5211  IFS=$as_save_IFS
5212  test -z "$as_dir" && as_dir=.
5213    for ac_exec_ext in '' $ac_executable_extensions; do
5214  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5215    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5217    break 2
5218  fi
5219done
5220  done
5221IFS=$as_save_IFS
5222
5223  ;;
5224esac
5225fi
5226RM=$ac_cv_path_RM
5227if test -n "$RM"; then
5228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5229$as_echo "$RM" >&6; }
5230else
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5232$as_echo "no" >&6; }
5233fi
5234
5235
5236  test -n "$RM" && break
5237done
5238
5239
5240    if test "x$RM" = x; then
5241        if test "xrm" = x; then
5242          PROG_NAME=rm
5243        else
5244          PROG_NAME=rm
5245        fi
5246        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5247$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5248        as_fn_error $? "Cannot continue" "$LINENO" 5
5249    fi
5250
5251
5252
5253    for ac_prog in sh
5254do
5255  # Extract the first word of "$ac_prog", so it can be a program name with args.
5256set dummy $ac_prog; ac_word=$2
5257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5258$as_echo_n "checking for $ac_word... " >&6; }
5259if test "${ac_cv_path_SH+set}" = set; then :
5260  $as_echo_n "(cached) " >&6
5261else
5262  case $SH in
5263  [\\/]* | ?:[\\/]*)
5264  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5265  ;;
5266  *)
5267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5268for as_dir in $PATH
5269do
5270  IFS=$as_save_IFS
5271  test -z "$as_dir" && as_dir=.
5272    for ac_exec_ext in '' $ac_executable_extensions; do
5273  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5274    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5276    break 2
5277  fi
5278done
5279  done
5280IFS=$as_save_IFS
5281
5282  ;;
5283esac
5284fi
5285SH=$ac_cv_path_SH
5286if test -n "$SH"; then
5287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5288$as_echo "$SH" >&6; }
5289else
5290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5291$as_echo "no" >&6; }
5292fi
5293
5294
5295  test -n "$SH" && break
5296done
5297
5298
5299    if test "x$SH" = x; then
5300        if test "xsh" = x; then
5301          PROG_NAME=sh
5302        else
5303          PROG_NAME=sh
5304        fi
5305        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5306$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5307        as_fn_error $? "Cannot continue" "$LINENO" 5
5308    fi
5309
5310
5311
5312    for ac_prog in sort
5313do
5314  # Extract the first word of "$ac_prog", so it can be a program name with args.
5315set dummy $ac_prog; ac_word=$2
5316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5317$as_echo_n "checking for $ac_word... " >&6; }
5318if test "${ac_cv_path_SORT+set}" = set; then :
5319  $as_echo_n "(cached) " >&6
5320else
5321  case $SORT in
5322  [\\/]* | ?:[\\/]*)
5323  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5324  ;;
5325  *)
5326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5327for as_dir in $PATH
5328do
5329  IFS=$as_save_IFS
5330  test -z "$as_dir" && as_dir=.
5331    for ac_exec_ext in '' $ac_executable_extensions; do
5332  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5333    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5335    break 2
5336  fi
5337done
5338  done
5339IFS=$as_save_IFS
5340
5341  ;;
5342esac
5343fi
5344SORT=$ac_cv_path_SORT
5345if test -n "$SORT"; then
5346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5347$as_echo "$SORT" >&6; }
5348else
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351fi
5352
5353
5354  test -n "$SORT" && break
5355done
5356
5357
5358    if test "x$SORT" = x; then
5359        if test "xsort" = x; then
5360          PROG_NAME=sort
5361        else
5362          PROG_NAME=sort
5363        fi
5364        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5365$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5366        as_fn_error $? "Cannot continue" "$LINENO" 5
5367    fi
5368
5369
5370
5371    for ac_prog in tail
5372do
5373  # Extract the first word of "$ac_prog", so it can be a program name with args.
5374set dummy $ac_prog; ac_word=$2
5375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5376$as_echo_n "checking for $ac_word... " >&6; }
5377if test "${ac_cv_path_TAIL+set}" = set; then :
5378  $as_echo_n "(cached) " >&6
5379else
5380  case $TAIL in
5381  [\\/]* | ?:[\\/]*)
5382  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5383  ;;
5384  *)
5385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5386for as_dir in $PATH
5387do
5388  IFS=$as_save_IFS
5389  test -z "$as_dir" && as_dir=.
5390    for ac_exec_ext in '' $ac_executable_extensions; do
5391  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5392    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5394    break 2
5395  fi
5396done
5397  done
5398IFS=$as_save_IFS
5399
5400  ;;
5401esac
5402fi
5403TAIL=$ac_cv_path_TAIL
5404if test -n "$TAIL"; then
5405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5406$as_echo "$TAIL" >&6; }
5407else
5408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5409$as_echo "no" >&6; }
5410fi
5411
5412
5413  test -n "$TAIL" && break
5414done
5415
5416
5417    if test "x$TAIL" = x; then
5418        if test "xtail" = x; then
5419          PROG_NAME=tail
5420        else
5421          PROG_NAME=tail
5422        fi
5423        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5424$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5425        as_fn_error $? "Cannot continue" "$LINENO" 5
5426    fi
5427
5428
5429
5430    for ac_prog in tar
5431do
5432  # Extract the first word of "$ac_prog", so it can be a program name with args.
5433set dummy $ac_prog; ac_word=$2
5434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5435$as_echo_n "checking for $ac_word... " >&6; }
5436if test "${ac_cv_path_TAR+set}" = set; then :
5437  $as_echo_n "(cached) " >&6
5438else
5439  case $TAR in
5440  [\\/]* | ?:[\\/]*)
5441  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5442  ;;
5443  *)
5444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5445for as_dir in $PATH
5446do
5447  IFS=$as_save_IFS
5448  test -z "$as_dir" && as_dir=.
5449    for ac_exec_ext in '' $ac_executable_extensions; do
5450  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5451    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5453    break 2
5454  fi
5455done
5456  done
5457IFS=$as_save_IFS
5458
5459  ;;
5460esac
5461fi
5462TAR=$ac_cv_path_TAR
5463if test -n "$TAR"; then
5464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5465$as_echo "$TAR" >&6; }
5466else
5467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5468$as_echo "no" >&6; }
5469fi
5470
5471
5472  test -n "$TAR" && break
5473done
5474
5475
5476    if test "x$TAR" = x; then
5477        if test "xtar" = x; then
5478          PROG_NAME=tar
5479        else
5480          PROG_NAME=tar
5481        fi
5482        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5483$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5484        as_fn_error $? "Cannot continue" "$LINENO" 5
5485    fi
5486
5487
5488
5489    for ac_prog in tee
5490do
5491  # Extract the first word of "$ac_prog", so it can be a program name with args.
5492set dummy $ac_prog; ac_word=$2
5493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5494$as_echo_n "checking for $ac_word... " >&6; }
5495if test "${ac_cv_path_TEE+set}" = set; then :
5496  $as_echo_n "(cached) " >&6
5497else
5498  case $TEE in
5499  [\\/]* | ?:[\\/]*)
5500  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5501  ;;
5502  *)
5503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5504for as_dir in $PATH
5505do
5506  IFS=$as_save_IFS
5507  test -z "$as_dir" && as_dir=.
5508    for ac_exec_ext in '' $ac_executable_extensions; do
5509  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5510    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5512    break 2
5513  fi
5514done
5515  done
5516IFS=$as_save_IFS
5517
5518  ;;
5519esac
5520fi
5521TEE=$ac_cv_path_TEE
5522if test -n "$TEE"; then
5523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5524$as_echo "$TEE" >&6; }
5525else
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5527$as_echo "no" >&6; }
5528fi
5529
5530
5531  test -n "$TEE" && break
5532done
5533
5534
5535    if test "x$TEE" = x; then
5536        if test "xtee" = x; then
5537          PROG_NAME=tee
5538        else
5539          PROG_NAME=tee
5540        fi
5541        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5542$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5543        as_fn_error $? "Cannot continue" "$LINENO" 5
5544    fi
5545
5546
5547
5548    for ac_prog in touch
5549do
5550  # Extract the first word of "$ac_prog", so it can be a program name with args.
5551set dummy $ac_prog; ac_word=$2
5552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5553$as_echo_n "checking for $ac_word... " >&6; }
5554if test "${ac_cv_path_TOUCH+set}" = set; then :
5555  $as_echo_n "(cached) " >&6
5556else
5557  case $TOUCH in
5558  [\\/]* | ?:[\\/]*)
5559  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5560  ;;
5561  *)
5562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5563for as_dir in $PATH
5564do
5565  IFS=$as_save_IFS
5566  test -z "$as_dir" && as_dir=.
5567    for ac_exec_ext in '' $ac_executable_extensions; do
5568  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5569    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5571    break 2
5572  fi
5573done
5574  done
5575IFS=$as_save_IFS
5576
5577  ;;
5578esac
5579fi
5580TOUCH=$ac_cv_path_TOUCH
5581if test -n "$TOUCH"; then
5582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5583$as_echo "$TOUCH" >&6; }
5584else
5585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5586$as_echo "no" >&6; }
5587fi
5588
5589
5590  test -n "$TOUCH" && break
5591done
5592
5593
5594    if test "x$TOUCH" = x; then
5595        if test "xtouch" = x; then
5596          PROG_NAME=touch
5597        else
5598          PROG_NAME=touch
5599        fi
5600        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5601$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5602        as_fn_error $? "Cannot continue" "$LINENO" 5
5603    fi
5604
5605
5606
5607    for ac_prog in tr
5608do
5609  # Extract the first word of "$ac_prog", so it can be a program name with args.
5610set dummy $ac_prog; ac_word=$2
5611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5612$as_echo_n "checking for $ac_word... " >&6; }
5613if test "${ac_cv_path_TR+set}" = set; then :
5614  $as_echo_n "(cached) " >&6
5615else
5616  case $TR in
5617  [\\/]* | ?:[\\/]*)
5618  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5619  ;;
5620  *)
5621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5622for as_dir in $PATH
5623do
5624  IFS=$as_save_IFS
5625  test -z "$as_dir" && as_dir=.
5626    for ac_exec_ext in '' $ac_executable_extensions; do
5627  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5628    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5630    break 2
5631  fi
5632done
5633  done
5634IFS=$as_save_IFS
5635
5636  ;;
5637esac
5638fi
5639TR=$ac_cv_path_TR
5640if test -n "$TR"; then
5641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5642$as_echo "$TR" >&6; }
5643else
5644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5645$as_echo "no" >&6; }
5646fi
5647
5648
5649  test -n "$TR" && break
5650done
5651
5652
5653    if test "x$TR" = x; then
5654        if test "xtr" = x; then
5655          PROG_NAME=tr
5656        else
5657          PROG_NAME=tr
5658        fi
5659        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5660$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5661        as_fn_error $? "Cannot continue" "$LINENO" 5
5662    fi
5663
5664
5665
5666    for ac_prog in uname
5667do
5668  # Extract the first word of "$ac_prog", so it can be a program name with args.
5669set dummy $ac_prog; ac_word=$2
5670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5671$as_echo_n "checking for $ac_word... " >&6; }
5672if test "${ac_cv_path_UNAME+set}" = set; then :
5673  $as_echo_n "(cached) " >&6
5674else
5675  case $UNAME in
5676  [\\/]* | ?:[\\/]*)
5677  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5678  ;;
5679  *)
5680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5681for as_dir in $PATH
5682do
5683  IFS=$as_save_IFS
5684  test -z "$as_dir" && as_dir=.
5685    for ac_exec_ext in '' $ac_executable_extensions; do
5686  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5687    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5689    break 2
5690  fi
5691done
5692  done
5693IFS=$as_save_IFS
5694
5695  ;;
5696esac
5697fi
5698UNAME=$ac_cv_path_UNAME
5699if test -n "$UNAME"; then
5700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5701$as_echo "$UNAME" >&6; }
5702else
5703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5704$as_echo "no" >&6; }
5705fi
5706
5707
5708  test -n "$UNAME" && break
5709done
5710
5711
5712    if test "x$UNAME" = x; then
5713        if test "xuname" = x; then
5714          PROG_NAME=uname
5715        else
5716          PROG_NAME=uname
5717        fi
5718        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5719$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5720        as_fn_error $? "Cannot continue" "$LINENO" 5
5721    fi
5722
5723
5724
5725    for ac_prog in uniq
5726do
5727  # Extract the first word of "$ac_prog", so it can be a program name with args.
5728set dummy $ac_prog; ac_word=$2
5729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5730$as_echo_n "checking for $ac_word... " >&6; }
5731if test "${ac_cv_path_UNIQ+set}" = set; then :
5732  $as_echo_n "(cached) " >&6
5733else
5734  case $UNIQ in
5735  [\\/]* | ?:[\\/]*)
5736  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5737  ;;
5738  *)
5739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5740for as_dir in $PATH
5741do
5742  IFS=$as_save_IFS
5743  test -z "$as_dir" && as_dir=.
5744    for ac_exec_ext in '' $ac_executable_extensions; do
5745  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5746    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5748    break 2
5749  fi
5750done
5751  done
5752IFS=$as_save_IFS
5753
5754  ;;
5755esac
5756fi
5757UNIQ=$ac_cv_path_UNIQ
5758if test -n "$UNIQ"; then
5759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5760$as_echo "$UNIQ" >&6; }
5761else
5762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5763$as_echo "no" >&6; }
5764fi
5765
5766
5767  test -n "$UNIQ" && break
5768done
5769
5770
5771    if test "x$UNIQ" = x; then
5772        if test "xuniq" = x; then
5773          PROG_NAME=uniq
5774        else
5775          PROG_NAME=uniq
5776        fi
5777        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5778$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5779        as_fn_error $? "Cannot continue" "$LINENO" 5
5780    fi
5781
5782
5783
5784    for ac_prog in wc
5785do
5786  # Extract the first word of "$ac_prog", so it can be a program name with args.
5787set dummy $ac_prog; ac_word=$2
5788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5789$as_echo_n "checking for $ac_word... " >&6; }
5790if test "${ac_cv_path_WC+set}" = set; then :
5791  $as_echo_n "(cached) " >&6
5792else
5793  case $WC in
5794  [\\/]* | ?:[\\/]*)
5795  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5796  ;;
5797  *)
5798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5799for as_dir in $PATH
5800do
5801  IFS=$as_save_IFS
5802  test -z "$as_dir" && as_dir=.
5803    for ac_exec_ext in '' $ac_executable_extensions; do
5804  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5805    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5807    break 2
5808  fi
5809done
5810  done
5811IFS=$as_save_IFS
5812
5813  ;;
5814esac
5815fi
5816WC=$ac_cv_path_WC
5817if test -n "$WC"; then
5818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5819$as_echo "$WC" >&6; }
5820else
5821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5822$as_echo "no" >&6; }
5823fi
5824
5825
5826  test -n "$WC" && break
5827done
5828
5829
5830    if test "x$WC" = x; then
5831        if test "xwc" = x; then
5832          PROG_NAME=wc
5833        else
5834          PROG_NAME=wc
5835        fi
5836        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5837$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5838        as_fn_error $? "Cannot continue" "$LINENO" 5
5839    fi
5840
5841
5842
5843    for ac_prog in which
5844do
5845  # Extract the first word of "$ac_prog", so it can be a program name with args.
5846set dummy $ac_prog; ac_word=$2
5847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5848$as_echo_n "checking for $ac_word... " >&6; }
5849if test "${ac_cv_path_WHICH+set}" = set; then :
5850  $as_echo_n "(cached) " >&6
5851else
5852  case $WHICH in
5853  [\\/]* | ?:[\\/]*)
5854  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5855  ;;
5856  *)
5857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5858for as_dir in $PATH
5859do
5860  IFS=$as_save_IFS
5861  test -z "$as_dir" && as_dir=.
5862    for ac_exec_ext in '' $ac_executable_extensions; do
5863  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5864    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5866    break 2
5867  fi
5868done
5869  done
5870IFS=$as_save_IFS
5871
5872  ;;
5873esac
5874fi
5875WHICH=$ac_cv_path_WHICH
5876if test -n "$WHICH"; then
5877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5878$as_echo "$WHICH" >&6; }
5879else
5880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5881$as_echo "no" >&6; }
5882fi
5883
5884
5885  test -n "$WHICH" && break
5886done
5887
5888
5889    if test "x$WHICH" = x; then
5890        if test "xwhich" = x; then
5891          PROG_NAME=which
5892        else
5893          PROG_NAME=which
5894        fi
5895        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5896$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5897        as_fn_error $? "Cannot continue" "$LINENO" 5
5898    fi
5899
5900
5901
5902    for ac_prog in xargs
5903do
5904  # Extract the first word of "$ac_prog", so it can be a program name with args.
5905set dummy $ac_prog; ac_word=$2
5906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5907$as_echo_n "checking for $ac_word... " >&6; }
5908if test "${ac_cv_path_XARGS+set}" = set; then :
5909  $as_echo_n "(cached) " >&6
5910else
5911  case $XARGS in
5912  [\\/]* | ?:[\\/]*)
5913  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5914  ;;
5915  *)
5916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5917for as_dir in $PATH
5918do
5919  IFS=$as_save_IFS
5920  test -z "$as_dir" && as_dir=.
5921    for ac_exec_ext in '' $ac_executable_extensions; do
5922  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5923    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5925    break 2
5926  fi
5927done
5928  done
5929IFS=$as_save_IFS
5930
5931  ;;
5932esac
5933fi
5934XARGS=$ac_cv_path_XARGS
5935if test -n "$XARGS"; then
5936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5937$as_echo "$XARGS" >&6; }
5938else
5939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5940$as_echo "no" >&6; }
5941fi
5942
5943
5944  test -n "$XARGS" && break
5945done
5946
5947
5948    if test "x$XARGS" = x; then
5949        if test "xxargs" = x; then
5950          PROG_NAME=xargs
5951        else
5952          PROG_NAME=xargs
5953        fi
5954        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5955$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5956        as_fn_error $? "Cannot continue" "$LINENO" 5
5957    fi
5958
5959
5960
5961# Then required tools that require some special treatment.
5962for ac_prog in gawk mawk nawk awk
5963do
5964  # Extract the first word of "$ac_prog", so it can be a program name with args.
5965set dummy $ac_prog; ac_word=$2
5966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5967$as_echo_n "checking for $ac_word... " >&6; }
5968if test "${ac_cv_prog_AWK+set}" = set; then :
5969  $as_echo_n "(cached) " >&6
5970else
5971  if test -n "$AWK"; then
5972  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5973else
5974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5975for as_dir in $PATH
5976do
5977  IFS=$as_save_IFS
5978  test -z "$as_dir" && as_dir=.
5979    for ac_exec_ext in '' $ac_executable_extensions; do
5980  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5981    ac_cv_prog_AWK="$ac_prog"
5982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5983    break 2
5984  fi
5985done
5986  done
5987IFS=$as_save_IFS
5988
5989fi
5990fi
5991AWK=$ac_cv_prog_AWK
5992if test -n "$AWK"; then
5993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5994$as_echo "$AWK" >&6; }
5995else
5996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5997$as_echo "no" >&6; }
5998fi
5999
6000
6001  test -n "$AWK" && break
6002done
6003
6004
6005    if test "x$AWK" = x; then
6006        if test "x" = x; then
6007          PROG_NAME=awk
6008        else
6009          PROG_NAME=
6010        fi
6011        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6012$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6013        as_fn_error $? "Cannot continue" "$LINENO" 5
6014    fi
6015
6016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6017$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6018if test "${ac_cv_path_GREP+set}" = set; then :
6019  $as_echo_n "(cached) " >&6
6020else
6021  if test -z "$GREP"; then
6022  ac_path_GREP_found=false
6023  # Loop through the user's path and test for each of PROGNAME-LIST
6024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6025for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6026do
6027  IFS=$as_save_IFS
6028  test -z "$as_dir" && as_dir=.
6029    for ac_prog in grep ggrep; do
6030    for ac_exec_ext in '' $ac_executable_extensions; do
6031      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6032      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6033# Check for GNU ac_path_GREP and select it if it is found.
6034  # Check for GNU $ac_path_GREP
6035case `"$ac_path_GREP" --version 2>&1` in
6036*GNU*)
6037  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6038*)
6039  ac_count=0
6040  $as_echo_n 0123456789 >"conftest.in"
6041  while :
6042  do
6043    cat "conftest.in" "conftest.in" >"conftest.tmp"
6044    mv "conftest.tmp" "conftest.in"
6045    cp "conftest.in" "conftest.nl"
6046    $as_echo 'GREP' >> "conftest.nl"
6047    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6048    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6049    as_fn_arith $ac_count + 1 && ac_count=$as_val
6050    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6051      # Best one so far, save it but keep looking for a better one
6052      ac_cv_path_GREP="$ac_path_GREP"
6053      ac_path_GREP_max=$ac_count
6054    fi
6055    # 10*(2^10) chars as input seems more than enough
6056    test $ac_count -gt 10 && break
6057  done
6058  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6059esac
6060
6061      $ac_path_GREP_found && break 3
6062    done
6063  done
6064  done
6065IFS=$as_save_IFS
6066  if test -z "$ac_cv_path_GREP"; then
6067    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6068  fi
6069else
6070  ac_cv_path_GREP=$GREP
6071fi
6072
6073fi
6074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6075$as_echo "$ac_cv_path_GREP" >&6; }
6076 GREP="$ac_cv_path_GREP"
6077
6078
6079
6080    if test "x$GREP" = x; then
6081        if test "x" = x; then
6082          PROG_NAME=grep
6083        else
6084          PROG_NAME=
6085        fi
6086        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6087$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6088        as_fn_error $? "Cannot continue" "$LINENO" 5
6089    fi
6090
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6092$as_echo_n "checking for egrep... " >&6; }
6093if test "${ac_cv_path_EGREP+set}" = set; then :
6094  $as_echo_n "(cached) " >&6
6095else
6096  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6097   then ac_cv_path_EGREP="$GREP -E"
6098   else
6099     if test -z "$EGREP"; then
6100  ac_path_EGREP_found=false
6101  # Loop through the user's path and test for each of PROGNAME-LIST
6102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6103for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6104do
6105  IFS=$as_save_IFS
6106  test -z "$as_dir" && as_dir=.
6107    for ac_prog in egrep; do
6108    for ac_exec_ext in '' $ac_executable_extensions; do
6109      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6110      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6111# Check for GNU ac_path_EGREP and select it if it is found.
6112  # Check for GNU $ac_path_EGREP
6113case `"$ac_path_EGREP" --version 2>&1` in
6114*GNU*)
6115  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6116*)
6117  ac_count=0
6118  $as_echo_n 0123456789 >"conftest.in"
6119  while :
6120  do
6121    cat "conftest.in" "conftest.in" >"conftest.tmp"
6122    mv "conftest.tmp" "conftest.in"
6123    cp "conftest.in" "conftest.nl"
6124    $as_echo 'EGREP' >> "conftest.nl"
6125    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6126    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6127    as_fn_arith $ac_count + 1 && ac_count=$as_val
6128    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6129      # Best one so far, save it but keep looking for a better one
6130      ac_cv_path_EGREP="$ac_path_EGREP"
6131      ac_path_EGREP_max=$ac_count
6132    fi
6133    # 10*(2^10) chars as input seems more than enough
6134    test $ac_count -gt 10 && break
6135  done
6136  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6137esac
6138
6139      $ac_path_EGREP_found && break 3
6140    done
6141  done
6142  done
6143IFS=$as_save_IFS
6144  if test -z "$ac_cv_path_EGREP"; then
6145    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6146  fi
6147else
6148  ac_cv_path_EGREP=$EGREP
6149fi
6150
6151   fi
6152fi
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6154$as_echo "$ac_cv_path_EGREP" >&6; }
6155 EGREP="$ac_cv_path_EGREP"
6156
6157
6158
6159    if test "x$EGREP" = x; then
6160        if test "x" = x; then
6161          PROG_NAME=egrep
6162        else
6163          PROG_NAME=
6164        fi
6165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6166$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6167        as_fn_error $? "Cannot continue" "$LINENO" 5
6168    fi
6169
6170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6171$as_echo_n "checking for fgrep... " >&6; }
6172if test "${ac_cv_path_FGREP+set}" = set; then :
6173  $as_echo_n "(cached) " >&6
6174else
6175  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6176   then ac_cv_path_FGREP="$GREP -F"
6177   else
6178     if test -z "$FGREP"; then
6179  ac_path_FGREP_found=false
6180  # Loop through the user's path and test for each of PROGNAME-LIST
6181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6182for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6183do
6184  IFS=$as_save_IFS
6185  test -z "$as_dir" && as_dir=.
6186    for ac_prog in fgrep; do
6187    for ac_exec_ext in '' $ac_executable_extensions; do
6188      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6189      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6190# Check for GNU ac_path_FGREP and select it if it is found.
6191  # Check for GNU $ac_path_FGREP
6192case `"$ac_path_FGREP" --version 2>&1` in
6193*GNU*)
6194  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6195*)
6196  ac_count=0
6197  $as_echo_n 0123456789 >"conftest.in"
6198  while :
6199  do
6200    cat "conftest.in" "conftest.in" >"conftest.tmp"
6201    mv "conftest.tmp" "conftest.in"
6202    cp "conftest.in" "conftest.nl"
6203    $as_echo 'FGREP' >> "conftest.nl"
6204    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6205    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6206    as_fn_arith $ac_count + 1 && ac_count=$as_val
6207    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6208      # Best one so far, save it but keep looking for a better one
6209      ac_cv_path_FGREP="$ac_path_FGREP"
6210      ac_path_FGREP_max=$ac_count
6211    fi
6212    # 10*(2^10) chars as input seems more than enough
6213    test $ac_count -gt 10 && break
6214  done
6215  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6216esac
6217
6218      $ac_path_FGREP_found && break 3
6219    done
6220  done
6221  done
6222IFS=$as_save_IFS
6223  if test -z "$ac_cv_path_FGREP"; then
6224    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6225  fi
6226else
6227  ac_cv_path_FGREP=$FGREP
6228fi
6229
6230   fi
6231fi
6232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6233$as_echo "$ac_cv_path_FGREP" >&6; }
6234 FGREP="$ac_cv_path_FGREP"
6235
6236
6237
6238    if test "x$FGREP" = x; then
6239        if test "x" = x; then
6240          PROG_NAME=fgrep
6241        else
6242          PROG_NAME=
6243        fi
6244        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6245$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6246        as_fn_error $? "Cannot continue" "$LINENO" 5
6247    fi
6248
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6250$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6251if test "${ac_cv_path_SED+set}" = set; then :
6252  $as_echo_n "(cached) " >&6
6253else
6254            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6255     for ac_i in 1 2 3 4 5 6 7; do
6256       ac_script="$ac_script$as_nl$ac_script"
6257     done
6258     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6259     { ac_script=; unset ac_script;}
6260     if test -z "$SED"; then
6261  ac_path_SED_found=false
6262  # Loop through the user's path and test for each of PROGNAME-LIST
6263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6264for as_dir in $PATH
6265do
6266  IFS=$as_save_IFS
6267  test -z "$as_dir" && as_dir=.
6268    for ac_prog in sed gsed; do
6269    for ac_exec_ext in '' $ac_executable_extensions; do
6270      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6271      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6272# Check for GNU ac_path_SED and select it if it is found.
6273  # Check for GNU $ac_path_SED
6274case `"$ac_path_SED" --version 2>&1` in
6275*GNU*)
6276  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6277*)
6278  ac_count=0
6279  $as_echo_n 0123456789 >"conftest.in"
6280  while :
6281  do
6282    cat "conftest.in" "conftest.in" >"conftest.tmp"
6283    mv "conftest.tmp" "conftest.in"
6284    cp "conftest.in" "conftest.nl"
6285    $as_echo '' >> "conftest.nl"
6286    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6287    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6288    as_fn_arith $ac_count + 1 && ac_count=$as_val
6289    if test $ac_count -gt ${ac_path_SED_max-0}; then
6290      # Best one so far, save it but keep looking for a better one
6291      ac_cv_path_SED="$ac_path_SED"
6292      ac_path_SED_max=$ac_count
6293    fi
6294    # 10*(2^10) chars as input seems more than enough
6295    test $ac_count -gt 10 && break
6296  done
6297  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6298esac
6299
6300      $ac_path_SED_found && break 3
6301    done
6302  done
6303  done
6304IFS=$as_save_IFS
6305  if test -z "$ac_cv_path_SED"; then
6306    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6307  fi
6308else
6309  ac_cv_path_SED=$SED
6310fi
6311
6312fi
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6314$as_echo "$ac_cv_path_SED" >&6; }
6315 SED="$ac_cv_path_SED"
6316  rm -f conftest.sed
6317
6318
6319    if test "x$SED" = x; then
6320        if test "x" = x; then
6321          PROG_NAME=sed
6322        else
6323          PROG_NAME=
6324        fi
6325        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6326$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6327        as_fn_error $? "Cannot continue" "$LINENO" 5
6328    fi
6329
6330
6331for ac_prog in nawk gawk awk
6332do
6333  # Extract the first word of "$ac_prog", so it can be a program name with args.
6334set dummy $ac_prog; ac_word=$2
6335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6336$as_echo_n "checking for $ac_word... " >&6; }
6337if test "${ac_cv_path_NAWK+set}" = set; then :
6338  $as_echo_n "(cached) " >&6
6339else
6340  case $NAWK in
6341  [\\/]* | ?:[\\/]*)
6342  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6343  ;;
6344  *)
6345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6346for as_dir in $PATH
6347do
6348  IFS=$as_save_IFS
6349  test -z "$as_dir" && as_dir=.
6350    for ac_exec_ext in '' $ac_executable_extensions; do
6351  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6352    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6354    break 2
6355  fi
6356done
6357  done
6358IFS=$as_save_IFS
6359
6360  ;;
6361esac
6362fi
6363NAWK=$ac_cv_path_NAWK
6364if test -n "$NAWK"; then
6365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6366$as_echo "$NAWK" >&6; }
6367else
6368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369$as_echo "no" >&6; }
6370fi
6371
6372
6373  test -n "$NAWK" && break
6374done
6375
6376
6377    if test "x$NAWK" = x; then
6378        if test "x" = x; then
6379          PROG_NAME=nawk
6380        else
6381          PROG_NAME=
6382        fi
6383        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6384$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6385        as_fn_error $? "Cannot continue" "$LINENO" 5
6386    fi
6387
6388
6389# Always force rm.
6390RM="$RM -f"
6391
6392# These are not required on all platforms
6393# Extract the first word of "cygpath", so it can be a program name with args.
6394set dummy cygpath; ac_word=$2
6395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6396$as_echo_n "checking for $ac_word... " >&6; }
6397if test "${ac_cv_path_CYGPATH+set}" = set; then :
6398  $as_echo_n "(cached) " >&6
6399else
6400  case $CYGPATH in
6401  [\\/]* | ?:[\\/]*)
6402  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6403  ;;
6404  *)
6405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6406for as_dir in $PATH
6407do
6408  IFS=$as_save_IFS
6409  test -z "$as_dir" && as_dir=.
6410    for ac_exec_ext in '' $ac_executable_extensions; do
6411  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6412    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6414    break 2
6415  fi
6416done
6417  done
6418IFS=$as_save_IFS
6419
6420  ;;
6421esac
6422fi
6423CYGPATH=$ac_cv_path_CYGPATH
6424if test -n "$CYGPATH"; then
6425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6426$as_echo "$CYGPATH" >&6; }
6427else
6428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; }
6430fi
6431
6432
6433# Extract the first word of "readlink", so it can be a program name with args.
6434set dummy readlink; ac_word=$2
6435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6436$as_echo_n "checking for $ac_word... " >&6; }
6437if test "${ac_cv_path_READLINK+set}" = set; then :
6438  $as_echo_n "(cached) " >&6
6439else
6440  case $READLINK in
6441  [\\/]* | ?:[\\/]*)
6442  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6443  ;;
6444  *)
6445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6446for as_dir in $PATH
6447do
6448  IFS=$as_save_IFS
6449  test -z "$as_dir" && as_dir=.
6450    for ac_exec_ext in '' $ac_executable_extensions; do
6451  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6452    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6454    break 2
6455  fi
6456done
6457  done
6458IFS=$as_save_IFS
6459
6460  ;;
6461esac
6462fi
6463READLINK=$ac_cv_path_READLINK
6464if test -n "$READLINK"; then
6465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6466$as_echo "$READLINK" >&6; }
6467else
6468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6469$as_echo "no" >&6; }
6470fi
6471
6472
6473# Extract the first word of "df", so it can be a program name with args.
6474set dummy df; ac_word=$2
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6476$as_echo_n "checking for $ac_word... " >&6; }
6477if test "${ac_cv_path_DF+set}" = set; then :
6478  $as_echo_n "(cached) " >&6
6479else
6480  case $DF in
6481  [\\/]* | ?:[\\/]*)
6482  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6483  ;;
6484  *)
6485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6486for as_dir in $PATH
6487do
6488  IFS=$as_save_IFS
6489  test -z "$as_dir" && as_dir=.
6490    for ac_exec_ext in '' $ac_executable_extensions; do
6491  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6492    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6494    break 2
6495  fi
6496done
6497  done
6498IFS=$as_save_IFS
6499
6500  ;;
6501esac
6502fi
6503DF=$ac_cv_path_DF
6504if test -n "$DF"; then
6505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6506$as_echo "$DF" >&6; }
6507else
6508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509$as_echo "no" >&6; }
6510fi
6511
6512
6513# Extract the first word of "SetFile", so it can be a program name with args.
6514set dummy SetFile; ac_word=$2
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516$as_echo_n "checking for $ac_word... " >&6; }
6517if test "${ac_cv_path_SETFILE+set}" = set; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  case $SETFILE in
6521  [\\/]* | ?:[\\/]*)
6522  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6523  ;;
6524  *)
6525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in $PATH
6527do
6528  IFS=$as_save_IFS
6529  test -z "$as_dir" && as_dir=.
6530    for ac_exec_ext in '' $ac_executable_extensions; do
6531  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6532    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534    break 2
6535  fi
6536done
6537  done
6538IFS=$as_save_IFS
6539
6540  ;;
6541esac
6542fi
6543SETFILE=$ac_cv_path_SETFILE
6544if test -n "$SETFILE"; then
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6546$as_echo "$SETFILE" >&6; }
6547else
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
6550fi
6551
6552
6553
6554
6555# Now we can determine OpenJDK build and target platforms. This is required to
6556# have early on.
6557# Make sure we can run config.sub.
6558$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6559  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6560
6561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6562$as_echo_n "checking build system type... " >&6; }
6563if test "${ac_cv_build+set}" = set; then :
6564  $as_echo_n "(cached) " >&6
6565else
6566  ac_build_alias=$build_alias
6567test "x$ac_build_alias" = x &&
6568  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6569test "x$ac_build_alias" = x &&
6570  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6571ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6572  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6573
6574fi
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6576$as_echo "$ac_cv_build" >&6; }
6577case $ac_cv_build in
6578*-*-*) ;;
6579*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6580esac
6581build=$ac_cv_build
6582ac_save_IFS=$IFS; IFS='-'
6583set x $ac_cv_build
6584shift
6585build_cpu=$1
6586build_vendor=$2
6587shift; shift
6588# Remember, the first character of IFS is used to create $*,
6589# except with old shells:
6590build_os=$*
6591IFS=$ac_save_IFS
6592case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6593
6594
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6596$as_echo_n "checking host system type... " >&6; }
6597if test "${ac_cv_host+set}" = set; then :
6598  $as_echo_n "(cached) " >&6
6599else
6600  if test "x$host_alias" = x; then
6601  ac_cv_host=$ac_cv_build
6602else
6603  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6604    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6605fi
6606
6607fi
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6609$as_echo "$ac_cv_host" >&6; }
6610case $ac_cv_host in
6611*-*-*) ;;
6612*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6613esac
6614host=$ac_cv_host
6615ac_save_IFS=$IFS; IFS='-'
6616set x $ac_cv_host
6617shift
6618host_cpu=$1
6619host_vendor=$2
6620shift; shift
6621# Remember, the first character of IFS is used to create $*,
6622# except with old shells:
6623host_os=$*
6624IFS=$ac_save_IFS
6625case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6626
6627
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6629$as_echo_n "checking target system type... " >&6; }
6630if test "${ac_cv_target+set}" = set; then :
6631  $as_echo_n "(cached) " >&6
6632else
6633  if test "x$target_alias" = x; then
6634  ac_cv_target=$ac_cv_host
6635else
6636  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6637    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6638fi
6639
6640fi
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6642$as_echo "$ac_cv_target" >&6; }
6643case $ac_cv_target in
6644*-*-*) ;;
6645*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6646esac
6647target=$ac_cv_target
6648ac_save_IFS=$IFS; IFS='-'
6649set x $ac_cv_target
6650shift
6651target_cpu=$1
6652target_vendor=$2
6653shift; shift
6654# Remember, the first character of IFS is used to create $*,
6655# except with old shells:
6656target_os=$*
6657IFS=$ac_save_IFS
6658case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6659
6660
6661# The aliases save the names the user supplied, while $host etc.
6662# will get canonicalized.
6663test -n "$target_alias" &&
6664  test "$program_prefix$program_suffix$program_transform_name" = \
6665    NONENONEs,x,x, &&
6666  program_prefix=${target_alias}-
6667
6668# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6669# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6670# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6671# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6672# to use the configure naming style.
6673
6674
6675
6676
6677
6678    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6679    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6680    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6681    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6682    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6683    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6684
6685
6686
6687    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6688
6689  case "$build_os" in
6690    *linux*)
6691      VAR_OS=linux
6692      VAR_OS_API=posix
6693      VAR_OS_ENV=linux
6694      ;;
6695    *solaris*)
6696      VAR_OS=solaris
6697      VAR_OS_API=posix
6698      VAR_OS_ENV=solaris
6699      ;;
6700    *darwin*)
6701      VAR_OS=macosx
6702      VAR_OS_API=posix
6703      VAR_OS_ENV=macosx
6704      ;;
6705    *bsd*)
6706      VAR_OS=bsd
6707      VAR_OS_API=posix
6708      VAR_OS_ENV=bsd
6709      ;;
6710    *cygwin*)
6711      VAR_OS=windows
6712      VAR_OS_API=winapi
6713      VAR_OS_ENV=windows.cygwin
6714      ;;
6715    *mingw*)
6716      VAR_OS=windows
6717      VAR_OS_API=winapi
6718      VAR_OS_ENV=windows.msys
6719      ;;
6720    *)
6721      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6722      ;;
6723  esac
6724
6725
6726  # First argument is the cpu name from the trip/quad
6727  case "$build_cpu" in
6728    x86_64)
6729      VAR_CPU=x86_64
6730      VAR_CPU_ARCH=x86
6731      VAR_CPU_BITS=64
6732      VAR_CPU_ENDIAN=little
6733      ;;
6734    i?86)
6735      VAR_CPU=x86
6736      VAR_CPU_ARCH=x86
6737      VAR_CPU_BITS=32
6738      VAR_CPU_ENDIAN=little
6739      ;;
6740    arm*)
6741      VAR_CPU=arm
6742      VAR_CPU_ARCH=arm
6743      VAR_CPU_BITS=32
6744      VAR_CPU_ENDIAN=little
6745      ;;
6746    powerpc)
6747      VAR_CPU=ppc
6748      VAR_CPU_ARCH=ppc
6749      VAR_CPU_BITS=32
6750      VAR_CPU_ENDIAN=big
6751       ;;
6752    powerpc64)
6753      VAR_CPU=ppc64
6754      VAR_CPU_ARCH=ppc
6755      VAR_CPU_BITS=64
6756      VAR_CPU_ENDIAN=big
6757       ;;
6758    sparc)
6759      VAR_CPU=sparc
6760      VAR_CPU_ARCH=sparc
6761      VAR_CPU_BITS=32
6762      VAR_CPU_ENDIAN=big
6763       ;;
6764    sparcv9)
6765      VAR_CPU=sparcv9
6766      VAR_CPU_ARCH=sparc
6767      VAR_CPU_BITS=64
6768      VAR_CPU_ENDIAN=big
6769       ;;
6770    *)
6771      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6772      ;;
6773  esac
6774
6775    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6776    OPENJDK_BUILD_OS="$VAR_OS"
6777    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6778    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6779    OPENJDK_BUILD_CPU="$VAR_CPU"
6780    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6781    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6782    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6783
6784
6785
6786
6787
6788
6789
6790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6791$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6793$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6794
6795    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6796
6797  case "$host_os" in
6798    *linux*)
6799      VAR_OS=linux
6800      VAR_OS_API=posix
6801      VAR_OS_ENV=linux
6802      ;;
6803    *solaris*)
6804      VAR_OS=solaris
6805      VAR_OS_API=posix
6806      VAR_OS_ENV=solaris
6807      ;;
6808    *darwin*)
6809      VAR_OS=macosx
6810      VAR_OS_API=posix
6811      VAR_OS_ENV=macosx
6812      ;;
6813    *bsd*)
6814      VAR_OS=bsd
6815      VAR_OS_API=posix
6816      VAR_OS_ENV=bsd
6817      ;;
6818    *cygwin*)
6819      VAR_OS=windows
6820      VAR_OS_API=winapi
6821      VAR_OS_ENV=windows.cygwin
6822      ;;
6823    *mingw*)
6824      VAR_OS=windows
6825      VAR_OS_API=winapi
6826      VAR_OS_ENV=windows.msys
6827      ;;
6828    *)
6829      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6830      ;;
6831  esac
6832
6833
6834  # First argument is the cpu name from the trip/quad
6835  case "$host_cpu" in
6836    x86_64)
6837      VAR_CPU=x86_64
6838      VAR_CPU_ARCH=x86
6839      VAR_CPU_BITS=64
6840      VAR_CPU_ENDIAN=little
6841      ;;
6842    i?86)
6843      VAR_CPU=x86
6844      VAR_CPU_ARCH=x86
6845      VAR_CPU_BITS=32
6846      VAR_CPU_ENDIAN=little
6847      ;;
6848    arm*)
6849      VAR_CPU=arm
6850      VAR_CPU_ARCH=arm
6851      VAR_CPU_BITS=32
6852      VAR_CPU_ENDIAN=little
6853      ;;
6854    powerpc)
6855      VAR_CPU=ppc
6856      VAR_CPU_ARCH=ppc
6857      VAR_CPU_BITS=32
6858      VAR_CPU_ENDIAN=big
6859       ;;
6860    powerpc64)
6861      VAR_CPU=ppc64
6862      VAR_CPU_ARCH=ppc
6863      VAR_CPU_BITS=64
6864      VAR_CPU_ENDIAN=big
6865       ;;
6866    sparc)
6867      VAR_CPU=sparc
6868      VAR_CPU_ARCH=sparc
6869      VAR_CPU_BITS=32
6870      VAR_CPU_ENDIAN=big
6871       ;;
6872    sparcv9)
6873      VAR_CPU=sparcv9
6874      VAR_CPU_ARCH=sparc
6875      VAR_CPU_BITS=64
6876      VAR_CPU_ENDIAN=big
6877       ;;
6878    *)
6879      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6880      ;;
6881  esac
6882
6883    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6884    OPENJDK_TARGET_OS="$VAR_OS"
6885    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6886    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6887    OPENJDK_TARGET_CPU="$VAR_CPU"
6888    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6889    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6890    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6891
6892
6893
6894
6895
6896
6897
6898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6899$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6901$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6902
6903
6904
6905# Check whether --with-target-bits was given.
6906if test "${with_target_bits+set}" = set; then :
6907  withval=$with_target_bits;
6908fi
6909
6910
6911  # We have three types of compiles:
6912  # native  == normal compilation, target system == build system
6913  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6914  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6915  #
6916  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6917    # We're doing a proper cross-compilation
6918    COMPILE_TYPE="cross"
6919  else
6920    COMPILE_TYPE="native"
6921  fi
6922
6923  if test "x$with_target_bits" != x; then
6924    if test "x$COMPILE_TYPE" = "xcross"; then
6925      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6926    fi
6927
6928    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6929      # A reduced build is requested
6930      COMPILE_TYPE="reduced"
6931      OPENJDK_TARGET_CPU_BITS=32
6932      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6933        OPENJDK_TARGET_CPU=x86
6934      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6935        OPENJDK_TARGET_CPU=sparc
6936      else
6937        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6938      fi
6939    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6940      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
6941    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6942      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6943$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6944    else
6945      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6946    fi
6947  fi
6948
6949
6950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6951$as_echo_n "checking compilation type... " >&6; }
6952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6953$as_echo "$COMPILE_TYPE" >&6; }
6954
6955
6956    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6957       REQUIRED_OS_NAME=SunOS
6958       REQUIRED_OS_VERSION=5.10
6959    fi
6960    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6961       REQUIRED_OS_NAME=Linux
6962       REQUIRED_OS_VERSION=2.6
6963    fi
6964    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6965        REQUIRED_OS_NAME=Windows
6966        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6967            REQUIRED_OS_VERSION=5.2
6968        else
6969            REQUIRED_OS_VERSION=5.1
6970        fi
6971    fi
6972    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6973        REQUIRED_OS_NAME=Darwin
6974        REQUIRED_OS_VERSION=11.2
6975    fi
6976
6977
6978
6979
6980
6981    # Also store the legacy naming of the cpu.
6982    # Ie i586 and amd64 instead of x86 and x86_64
6983    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6984    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6985      OPENJDK_TARGET_CPU_LEGACY="i586"
6986    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6987      # On all platforms except MacOSX replace x86_64 with amd64.
6988      OPENJDK_TARGET_CPU_LEGACY="amd64"
6989    fi
6990
6991
6992    # And the second legacy naming of the cpu.
6993    # Ie i386 and amd64 instead of x86 and x86_64.
6994    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6995    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6996      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6997    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6998      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6999    fi
7000
7001
7002    # This is the name of the cpu (but using i386 and amd64 instead of
7003    # x86 and x86_64, respectively), preceeded by a /, to be used when
7004    # locating libraries. On macosx, it's empty, though.
7005    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7006    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7007        OPENJDK_TARGET_CPU_LIBDIR=""
7008    fi
7009
7010
7011    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7012    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7013    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7014    OPENJDK_TARGET_CPU_ISADIR=""
7015    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7016      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7017          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7018      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7019          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7020      fi
7021    fi
7022
7023
7024    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7025    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7026    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7027      # On linux only, we replace x86 with i386.
7028      OPENJDK_TARGET_CPU_OSARCH="i386"
7029    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7030      # On all platforms except macosx, we replace x86_64 with amd64.
7031      OPENJDK_TARGET_CPU_OSARCH="amd64"
7032    fi
7033
7034
7035    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7036    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7037      OPENJDK_TARGET_CPU_JLI="i386"
7038    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7039      # On all platforms except macosx, we replace x86_64 with amd64.
7040      OPENJDK_TARGET_CPU_JLI="amd64"
7041    fi
7042    # Now setup the -D flags for building libjli.
7043    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7044    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7045      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7046        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7047      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7048        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7049      fi
7050    fi
7051
7052
7053    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7054    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7055        OPENJDK_TARGET_OS_API_DIR="solaris"
7056    fi
7057    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7058        OPENJDK_TARGET_OS_API_DIR="windows"
7059    fi
7060
7061
7062    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7063        A_LP64="LP64:="
7064        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7065        # unpack200.exe
7066        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7067            ADD_LP64="-D_LP64=1"
7068        fi
7069    fi
7070    LP64=$A_LP64
7071
7072
7073    if test "x$COMPILE_TYPE" = "xcross"; then
7074      # FIXME: ... or should this include reduced builds..?
7075      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7076    else
7077      DEFINE_CROSS_COMPILE_ARCH=""
7078    fi
7079
7080
7081
7082
7083# Continue setting up basic stuff. Most remaining code require fundamental tools.
7084
7085# Locate the directory of this script.
7086SCRIPT="$0"
7087
7088    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7089        # Follow a chain of symbolic links. Use readlink
7090        # where it exists, else fall back to horribly
7091        # complicated shell code.
7092        if test "x$READLINK_TESTED" != yes; then
7093            # On MacOSX there is a readlink tool with a different
7094            # purpose than the GNU readlink tool. Check the found readlink.
7095            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7096            if test "x$ISGNU" = x; then
7097                 # A readlink that we do not know how to use.
7098                 # Are there other non-GNU readlinks out there?
7099                 READLINK_TESTED=yes
7100                 READLINK=
7101            fi
7102        fi
7103
7104        if test "x$READLINK" != x; then
7105            SCRIPT=`$READLINK -f $SCRIPT`
7106        else
7107            # Save the current directory for restoring afterwards
7108            STARTDIR=$PWD
7109            COUNTER=0
7110            sym_link_dir=`$DIRNAME $SCRIPT`
7111            sym_link_file=`$BASENAME $SCRIPT`
7112            # Use the system pwd and not the shell builtin to resolve directory symlinks
7113            cd $sym_link_dir
7114            cd `$THEPWDCMD`
7115            sym_link_dir=`$THEPWDCMD`
7116            # Resolve file symlinks
7117            while test $COUNTER -lt 20; do
7118                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7119                if test "x$ISLINK" == x; then
7120                    # This is not a symbolic link! We are done!
7121                    break
7122                fi
7123                # Again resolve directory symlinks since the target of the just found
7124                # link could be in a different directory
7125                cd `$DIRNAME $ISLINK`
7126                sym_link_dir=`$THEPWDCMD`
7127                sym_link_file=`$BASENAME $ISLINK`
7128                let COUNTER=COUNTER+1
7129            done
7130            cd $STARTDIR
7131            SCRIPT=$sym_link_dir/$sym_link_file
7132        fi
7133    fi
7134
7135AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7136
7137# Where is the source? It is located two levels above the configure script.
7138CURDIR="$PWD"
7139cd "$AUTOCONF_DIR/../.."
7140SRC_ROOT="`$THEPWDCMD`"
7141
7142if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7143  PATH_SEP=";"
7144
7145  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7146  if test $SRC_ROOT_LENGTH -gt 100; then
7147      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7148  fi
7149
7150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7152$as_echo_n "checking cygwin release... " >&6; }
7153    CYGWIN_VERSION=`$UNAME -r`
7154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7155$as_echo "$CYGWIN_VERSION" >&6; }
7156    WINDOWS_ENV_VENDOR='cygwin'
7157    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7158
7159    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7160    if test "x$CYGWIN_VERSION_OK" = x; then
7161      { $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
7162$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;}
7163      as_fn_error $? "Cannot continue" "$LINENO" 5
7164    fi
7165    if test "x$CYGPATH" = x; then
7166        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7167    fi
7168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7169$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7170    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7171    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7172    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7173    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7175$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7176    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7177    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7178    if test "x$test_cygdrive_prefix" = x; then
7179        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7180    fi
7181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7183$as_echo_n "checking msys release... " >&6; }
7184    MSYS_VERSION=`$UNAME -r`
7185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7186$as_echo "$MSYS_VERSION" >&6; }
7187
7188    WINDOWS_ENV_VENDOR='msys'
7189    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7190
7191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7192$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7193    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7194    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7195
7196  windows_path="$MSYS_ROOT_PATH"
7197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7198    unix_path=`$CYGPATH -u "$windows_path"`
7199    MSYS_ROOT_PATH="$unix_path"
7200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7202    MSYS_ROOT_PATH="$unix_path"
7203  fi
7204
7205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7206$as_echo "$MSYS_ROOT_PATH" >&6; }
7207    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7208  else
7209    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7210  fi
7211
7212  # Test if windows or unix (cygwin/msys) find is first in path.
7213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7214$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7215  FIND_BINARY_OUTPUT=`find --version 2>&1`
7216  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7218$as_echo "unix style" >&6; }
7219  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7221$as_echo "Windows" >&6; }
7222    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7223$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7224    { $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
7225$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7226    as_fn_error $? "Cannot continue" "$LINENO" 5
7227  else
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7229$as_echo "unknown" >&6; }
7230    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7231$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7232  fi
7233
7234else
7235  PATH_SEP=":"
7236fi
7237
7238
7239
7240cd "$CURDIR"
7241
7242
7243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7244
7245  # Input might be given as Windows format, start by converting to
7246  # unix format.
7247  path="$SRC_ROOT"
7248  new_path=`$CYGPATH -u "$path"`
7249
7250  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7251  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7252  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7253  # "foo.exe" is OK but "foo" is an error.
7254  #
7255  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7256  # It is also a way to make sure we got the proper file name for the real test later on.
7257  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7258  if test "x$test_shortpath" = x; then
7259    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7260$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7261    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7262  fi
7263
7264  # Call helper function which possibly converts this using DOS-style short mode.
7265  # If so, the updated path is stored in $new_path.
7266
7267  input_path="$new_path"
7268  # Check if we need to convert this using DOS-style short mode. If the path
7269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7270  # take no chances and rewrite it.
7271  # Note: m4 eats our [], so we need to use [ and ] instead.
7272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7273  if test "x$has_forbidden_chars" != x; then
7274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7278      # Going to short mode and back again did indeed matter. Since short mode is
7279      # case insensitive, let's make it lowercase to improve readability.
7280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7281      # Now convert it back to Unix-stile (cygpath)
7282      input_path=`$CYGPATH -u "$shortmode_path"`
7283      new_path="$input_path"
7284    fi
7285  fi
7286
7287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7288  if test "x$test_cygdrive_prefix" = x; then
7289    # As a simple fix, exclude /usr/bin since it's not a real path.
7290    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7292      # a path prefixed by /cygdrive for fixpath to work.
7293      new_path="$CYGWIN_ROOT_PATH$input_path"
7294    fi
7295  fi
7296
7297
7298  if test "x$path" != "x$new_path"; then
7299    SRC_ROOT="$new_path"
7300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7301$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7302  fi
7303
7304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7305
7306  path="$SRC_ROOT"
7307  has_colon=`$ECHO $path | $GREP ^.:`
7308  new_path="$path"
7309  if test "x$has_colon" = x; then
7310    # Not in mixed or Windows style, start by that.
7311    new_path=`cmd //c echo $path`
7312  fi
7313
7314
7315  input_path="$new_path"
7316  # Check if we need to convert this using DOS-style short mode. If the path
7317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7318  # take no chances and rewrite it.
7319  # Note: m4 eats our [], so we need to use [ and ] instead.
7320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7321  if test "x$has_forbidden_chars" != x; then
7322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7324  fi
7325
7326
7327  windows_path="$new_path"
7328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7329    unix_path=`$CYGPATH -u "$windows_path"`
7330    new_path="$unix_path"
7331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7333    new_path="$unix_path"
7334  fi
7335
7336  if test "x$path" != "x$new_path"; then
7337    SRC_ROOT="$new_path"
7338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7339$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7340  fi
7341
7342  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7343  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7344
7345  else
7346    # We're on a posix platform. Hooray! :)
7347    path="$SRC_ROOT"
7348
7349    if test ! -f "$path" && test ! -d "$path"; then
7350      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7351    fi
7352
7353    has_space=`$ECHO "$path" | $GREP " "`
7354    if test "x$has_space" != x; then
7355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7356$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7357      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7358    fi
7359  fi
7360
7361
7362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7363
7364  # Input might be given as Windows format, start by converting to
7365  # unix format.
7366  path="$CURDIR"
7367  new_path=`$CYGPATH -u "$path"`
7368
7369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7372  # "foo.exe" is OK but "foo" is an error.
7373  #
7374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7375  # It is also a way to make sure we got the proper file name for the real test later on.
7376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7377  if test "x$test_shortpath" = x; then
7378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7379$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7380    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7381  fi
7382
7383  # Call helper function which possibly converts this using DOS-style short mode.
7384  # If so, the updated path is stored in $new_path.
7385
7386  input_path="$new_path"
7387  # Check if we need to convert this using DOS-style short mode. If the path
7388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7389  # take no chances and rewrite it.
7390  # Note: m4 eats our [], so we need to use [ and ] instead.
7391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7392  if test "x$has_forbidden_chars" != x; then
7393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7397      # Going to short mode and back again did indeed matter. Since short mode is
7398      # case insensitive, let's make it lowercase to improve readability.
7399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7400      # Now convert it back to Unix-stile (cygpath)
7401      input_path=`$CYGPATH -u "$shortmode_path"`
7402      new_path="$input_path"
7403    fi
7404  fi
7405
7406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7407  if test "x$test_cygdrive_prefix" = x; then
7408    # As a simple fix, exclude /usr/bin since it's not a real path.
7409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7411      # a path prefixed by /cygdrive for fixpath to work.
7412      new_path="$CYGWIN_ROOT_PATH$input_path"
7413    fi
7414  fi
7415
7416
7417  if test "x$path" != "x$new_path"; then
7418    CURDIR="$new_path"
7419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7420$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7421  fi
7422
7423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7424
7425  path="$CURDIR"
7426  has_colon=`$ECHO $path | $GREP ^.:`
7427  new_path="$path"
7428  if test "x$has_colon" = x; then
7429    # Not in mixed or Windows style, start by that.
7430    new_path=`cmd //c echo $path`
7431  fi
7432
7433
7434  input_path="$new_path"
7435  # Check if we need to convert this using DOS-style short mode. If the path
7436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7437  # take no chances and rewrite it.
7438  # Note: m4 eats our [], so we need to use [ and ] instead.
7439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7440  if test "x$has_forbidden_chars" != x; then
7441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7443  fi
7444
7445
7446  windows_path="$new_path"
7447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7448    unix_path=`$CYGPATH -u "$windows_path"`
7449    new_path="$unix_path"
7450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7452    new_path="$unix_path"
7453  fi
7454
7455  if test "x$path" != "x$new_path"; then
7456    CURDIR="$new_path"
7457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7458$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7459  fi
7460
7461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7463
7464  else
7465    # We're on a posix platform. Hooray! :)
7466    path="$CURDIR"
7467
7468    if test ! -f "$path" && test ! -d "$path"; then
7469      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7470    fi
7471
7472    has_space=`$ECHO "$path" | $GREP " "`
7473    if test "x$has_space" != x; then
7474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7475$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7477    fi
7478  fi
7479
7480
7481if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7482    # Add extra search paths on solaris for utilities like ar and as etc...
7483    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7484fi
7485
7486# You can force the sys-root if the sys-root encoded into the cross compiler tools
7487# is not correct.
7488
7489# Check whether --with-sys-root was given.
7490if test "${with_sys_root+set}" = set; then :
7491  withval=$with_sys_root;
7492fi
7493
7494
7495if test "x$with_sys_root" != x; then
7496  SYS_ROOT=$with_sys_root
7497else
7498  SYS_ROOT=/
7499fi
7500
7501
7502
7503# Check whether --with-tools-dir was given.
7504if test "${with_tools_dir+set}" = set; then :
7505  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7506fi
7507
7508
7509
7510# Check whether --with-devkit was given.
7511if test "${with_devkit+set}" = set; then :
7512  withval=$with_devkit;
7513    if test "x$with_sys_root" != x; then
7514      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7515    fi
7516    if test "x$with_tools_dir" != x; then
7517      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7518    fi
7519    TOOLS_DIR=$with_devkit/bin
7520    SYS_ROOT=$with_devkit/$host_alias/libc
7521
7522fi
7523
7524
7525
7526
7527# Setup default logging of stdout and stderr to build.log in the output root.
7528BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7529BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7530BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7531
7532
7533
7534
7535
7536# Check if it's a pure open build or if custom sources are to be used.
7537
7538  # Check whether --enable-openjdk-only was given.
7539if test "${enable_openjdk_only+set}" = set; then :
7540  enableval=$enable_openjdk_only;
7541else
7542  enable_openjdk_only="no"
7543fi
7544
7545
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7547$as_echo_n "checking for presence of closed sources... " >&6; }
7548  if test -d "$SRC_ROOT/jdk/src/closed"; then
7549    CLOSED_SOURCE_PRESENT=yes
7550  else
7551    CLOSED_SOURCE_PRESENT=no
7552  fi
7553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7554$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7555
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7557$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7558  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7560$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7561
7562  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7563    OPENJDK=true
7564    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7565      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7566$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7567    fi
7568  else
7569    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7570      OPENJDK=true
7571    else
7572      OPENJDK=false
7573    fi
7574  fi
7575
7576  if test "x$OPENJDK" = "xtrue"; then
7577    SET_OPENJDK="OPENJDK=true"
7578  fi
7579
7580
7581
7582
7583# These are needed to be able to create a configuration name (and thus the output directory)
7584
7585###############################################################################
7586#
7587# Check which variant of the JDK that we want to build.
7588# Currently we have:
7589#    normal:   standard edition
7590# but the custom make system may add other variants
7591#
7592# Effectively the JDK variant gives a name to a specific set of
7593# modules to compile into the JDK. In the future, these modules
7594# might even be Jigsaw modules.
7595#
7596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7597$as_echo_n "checking which variant of the JDK to build... " >&6; }
7598
7599# Check whether --with-jdk-variant was given.
7600if test "${with_jdk_variant+set}" = set; then :
7601  withval=$with_jdk_variant;
7602fi
7603
7604
7605if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7606    JDK_VARIANT="normal"
7607else
7608    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7609fi
7610
7611
7612
7613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7614$as_echo "$JDK_VARIANT" >&6; }
7615
7616
7617
7618###############################################################################
7619#
7620# Check which variants of the JVM that we want to build.
7621# Currently we have:
7622#    server: normal interpreter and a tiered C1/C2 compiler
7623#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7624#    minimal1: reduced form of client with optional VM services and features stripped out
7625#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7626#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7627#    zero: no machine code interpreter, no compiler
7628#    zeroshark: zero interpreter and shark/llvm compiler backend
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7630$as_echo_n "checking which variants of the JVM to build... " >&6; }
7631
7632# Check whether --with-jvm-variants was given.
7633if test "${with_jvm_variants+set}" = set; then :
7634  withval=$with_jvm_variants;
7635fi
7636
7637
7638if test "x$with_jvm_variants" = x; then
7639     with_jvm_variants="server"
7640fi
7641
7642JVM_VARIANTS=",$with_jvm_variants,"
7643TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7644
7645if test "x$TEST_VARIANTS" != "x,"; then
7646   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7647fi
7648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7649$as_echo "$with_jvm_variants" >&6; }
7650
7651JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7652JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7653JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7654JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7655JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7656JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7657
7658if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7659    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7660        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7661    fi
7662fi
7663if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7664    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7665        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7666    fi
7667fi
7668if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7669    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7670        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7671    fi
7672fi
7673
7674# Replace the commas with AND for use in the build directory name.
7675ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7676COUNT_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/'`
7677if test "x$COUNT_VARIANTS" != "x,1"; then
7678    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7679else
7680    BUILDING_MULTIPLE_JVM_VARIANTS=no
7681fi
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7692   MACOSX_UNIVERSAL="true"
7693fi
7694
7695
7696
7697
7698
7699###############################################################################
7700#
7701# Set the debug level
7702#    release: no debug information, all optimizations, no asserts.
7703#    fastdebug: debug information (-g), all optimizations, all asserts
7704#    slowdebug: debug information (-g), no optimizations, all asserts
7705#
7706DEBUG_LEVEL="release"
7707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7708$as_echo_n "checking which debug level to use... " >&6; }
7709# Check whether --enable-debug was given.
7710if test "${enable_debug+set}" = set; then :
7711  enableval=$enable_debug;
7712        ENABLE_DEBUG="${enableval}"
7713        DEBUG_LEVEL="fastdebug"
7714
7715else
7716  ENABLE_DEBUG="no"
7717fi
7718
7719
7720
7721# Check whether --with-debug-level was given.
7722if test "${with_debug_level+set}" = set; then :
7723  withval=$with_debug_level;
7724        DEBUG_LEVEL="${withval}"
7725        if test "x$ENABLE_DEBUG" = xyes; then
7726			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7727        fi
7728
7729fi
7730
7731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7732$as_echo "$DEBUG_LEVEL" >&6; }
7733
7734if test "x$DEBUG_LEVEL" != xrelease && \
7735   test "x$DEBUG_LEVEL" != xfastdebug && \
7736   test "x$DEBUG_LEVEL" != xslowdebug; then
7737   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7738fi
7739
7740
7741###############################################################################
7742#
7743# Setup legacy vars/targets and new vars to deal with different debug levels.
7744#
7745
7746case $DEBUG_LEVEL in
7747      release )
7748          VARIANT="OPT"
7749          FASTDEBUG="false"
7750          DEBUG_CLASSFILES="false"
7751          BUILD_VARIANT_RELEASE=""
7752          HOTSPOT_DEBUG_LEVEL="product"
7753          HOTSPOT_EXPORT="product"
7754           ;;
7755      fastdebug )
7756          VARIANT="DBG"
7757          FASTDEBUG="true"
7758          DEBUG_CLASSFILES="true"
7759          BUILD_VARIANT_RELEASE="-fastdebug"
7760          HOTSPOT_DEBUG_LEVEL="fastdebug"
7761          HOTSPOT_EXPORT="fastdebug"
7762           ;;
7763      slowdebug )
7764          VARIANT="DBG"
7765          FASTDEBUG="false"
7766          DEBUG_CLASSFILES="true"
7767          BUILD_VARIANT_RELEASE="-debug"
7768          HOTSPOT_DEBUG_LEVEL="jvmg"
7769          HOTSPOT_EXPORT="debug"
7770           ;;
7771esac
7772
7773#####
7774# Generate the legacy makefile targets for hotspot.
7775# The hotspot api for selecting the build artifacts, really, needs to be improved.
7776# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7777# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7778# But until then ...
7779HOTSPOT_TARGET=""
7780
7781if test "x$JVM_VARIANT_SERVER" = xtrue; then
7782    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7783fi
7784
7785if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7786    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7787fi
7788
7789if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7790    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7791fi
7792
7793if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7794    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7795fi
7796
7797if test "x$JVM_VARIANT_ZERO" = xtrue; then
7798    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7799fi
7800
7801if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7802    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7803fi
7804
7805HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7806
7807# On Macosx universal binaries are produced, but they only contain
7808# 64 bit intel. This invalidates control of which jvms are built
7809# from configure, but only server is valid anyway. Fix this
7810# when hotspot makefiles are rewritten.
7811if test "x$MACOSX_UNIVERSAL" = xtrue; then
7812    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7813fi
7814
7815#####
7816
7817
7818
7819
7820
7821
7822
7823
7824# With basic setup done, call the custom early hook.
7825
7826
7827# To properly create a configuration name, we need to have the OpenJDK target
7828# and options (variants and debug level) parsed.
7829
7830
7831
7832# Check whether --with-conf-name was given.
7833if test "${with_conf_name+set}" = set; then :
7834  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7835fi
7836
7837
7838# Test from where we are running configure, in or outside of src root.
7839# To enable comparison of directories, CURDIR needs to be symlink free
7840# just like SRC_ROOT already is
7841NOSYM_CURDIR="$CURDIR"
7842
7843    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7844        # Follow a chain of symbolic links. Use readlink
7845        # where it exists, else fall back to horribly
7846        # complicated shell code.
7847        if test "x$READLINK_TESTED" != yes; then
7848            # On MacOSX there is a readlink tool with a different
7849            # purpose than the GNU readlink tool. Check the found readlink.
7850            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7851            if test "x$ISGNU" = x; then
7852                 # A readlink that we do not know how to use.
7853                 # Are there other non-GNU readlinks out there?
7854                 READLINK_TESTED=yes
7855                 READLINK=
7856            fi
7857        fi
7858
7859        if test "x$READLINK" != x; then
7860            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7861        else
7862            # Save the current directory for restoring afterwards
7863            STARTDIR=$PWD
7864            COUNTER=0
7865            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7866            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7867            # Use the system pwd and not the shell builtin to resolve directory symlinks
7868            cd $sym_link_dir
7869            cd `$THEPWDCMD`
7870            sym_link_dir=`$THEPWDCMD`
7871            # Resolve file symlinks
7872            while test $COUNTER -lt 20; do
7873                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7874                if test "x$ISLINK" == x; then
7875                    # This is not a symbolic link! We are done!
7876                    break
7877                fi
7878                # Again resolve directory symlinks since the target of the just found
7879                # link could be in a different directory
7880                cd `$DIRNAME $ISLINK`
7881                sym_link_dir=`$THEPWDCMD`
7882                sym_link_file=`$BASENAME $ISLINK`
7883                let COUNTER=COUNTER+1
7884            done
7885            cd $STARTDIR
7886            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7887        fi
7888    fi
7889
7890if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7891        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7892        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7893    # We are running configure from the src root.
7894    # Create a default ./build/target-variant-debuglevel output root.
7895    if test "x${CONF_NAME}" = x; then
7896        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7897    fi
7898    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7899    $MKDIR -p "$OUTPUT_ROOT"
7900    if test ! -d "$OUTPUT_ROOT"; then
7901        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7902    fi
7903else
7904    # We are running configure from outside of the src dir.
7905    # Then use the current directory as output dir!
7906    # If configuration is situated in normal build directory, just use the build
7907    # directory name as configuration name, otherwise use the complete path.
7908    if test "x${CONF_NAME}" = x; then
7909        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7910    fi
7911    OUTPUT_ROOT="$CURDIR"
7912
7913    # WARNING: This might be a bad thing to do. You need to be sure you want to
7914    # have a configuration in this directory. Do some sanity checks!
7915
7916    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7917      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7918      # other files
7919      files_present=`$LS $OUTPUT_ROOT`
7920      # Configure has already touched config.log and confdefs.h in the current dir when this check
7921      # is performed.
7922      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7923                                             | $TR -d '\n'`
7924      if test "x$filtered_files" != x; then
7925        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7926$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7927        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7928$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7930$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7932$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7933        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7934$as_echo "$as_me: seriously mess up just about everything." >&6;}
7935        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7936$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7937        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7938$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7939        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7940      fi
7941    fi
7942fi
7943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7944$as_echo_n "checking what configuration name to use... " >&6; }
7945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7946$as_echo "$CONF_NAME" >&6; }
7947
7948
7949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7950
7951  # Input might be given as Windows format, start by converting to
7952  # unix format.
7953  path="$OUTPUT_ROOT"
7954  new_path=`$CYGPATH -u "$path"`
7955
7956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7959  # "foo.exe" is OK but "foo" is an error.
7960  #
7961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7962  # It is also a way to make sure we got the proper file name for the real test later on.
7963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7964  if test "x$test_shortpath" = x; then
7965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7966$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7967    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7968  fi
7969
7970  # Call helper function which possibly converts this using DOS-style short mode.
7971  # If so, the updated path is stored in $new_path.
7972
7973  input_path="$new_path"
7974  # Check if we need to convert this using DOS-style short mode. If the path
7975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7976  # take no chances and rewrite it.
7977  # Note: m4 eats our [], so we need to use [ and ] instead.
7978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7979  if test "x$has_forbidden_chars" != x; then
7980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7984      # Going to short mode and back again did indeed matter. Since short mode is
7985      # case insensitive, let's make it lowercase to improve readability.
7986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7987      # Now convert it back to Unix-stile (cygpath)
7988      input_path=`$CYGPATH -u "$shortmode_path"`
7989      new_path="$input_path"
7990    fi
7991  fi
7992
7993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7994  if test "x$test_cygdrive_prefix" = x; then
7995    # As a simple fix, exclude /usr/bin since it's not a real path.
7996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7998      # a path prefixed by /cygdrive for fixpath to work.
7999      new_path="$CYGWIN_ROOT_PATH$input_path"
8000    fi
8001  fi
8002
8003
8004  if test "x$path" != "x$new_path"; then
8005    OUTPUT_ROOT="$new_path"
8006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8007$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8008  fi
8009
8010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8011
8012  path="$OUTPUT_ROOT"
8013  has_colon=`$ECHO $path | $GREP ^.:`
8014  new_path="$path"
8015  if test "x$has_colon" = x; then
8016    # Not in mixed or Windows style, start by that.
8017    new_path=`cmd //c echo $path`
8018  fi
8019
8020
8021  input_path="$new_path"
8022  # Check if we need to convert this using DOS-style short mode. If the path
8023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8024  # take no chances and rewrite it.
8025  # Note: m4 eats our [], so we need to use [ and ] instead.
8026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8027  if test "x$has_forbidden_chars" != x; then
8028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8030  fi
8031
8032
8033  windows_path="$new_path"
8034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8035    unix_path=`$CYGPATH -u "$windows_path"`
8036    new_path="$unix_path"
8037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8039    new_path="$unix_path"
8040  fi
8041
8042  if test "x$path" != "x$new_path"; then
8043    OUTPUT_ROOT="$new_path"
8044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8045$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8046  fi
8047
8048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8050
8051  else
8052    # We're on a posix platform. Hooray! :)
8053    path="$OUTPUT_ROOT"
8054
8055    if test ! -f "$path" && test ! -d "$path"; then
8056      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8057    fi
8058
8059    has_space=`$ECHO "$path" | $GREP " "`
8060    if test "x$has_space" != x; then
8061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8062$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8063      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8064    fi
8065  fi
8066
8067
8068SPEC=$OUTPUT_ROOT/spec.gmk
8069
8070CONF_NAME=$CONF_NAME
8071
8072OUTPUT_ROOT=$OUTPUT_ROOT
8073
8074
8075# Most of the probed defines are put into config.h
8076ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8077
8078# The spec.gmk file contains all variables for the make system.
8079ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8080
8081# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8082ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8083
8084# The bootcycle-spec.gmk file contains support for boot cycle builds.
8085ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8086
8087# The compare.sh is used to compare the build output to other builds.
8088ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8089
8090# Spec.sh is currently used by compare-objects.sh
8091ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8092
8093# The generated Makefile knows where the spec.gmk is and where the source is.
8094# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8095# which will look for generated configurations
8096ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8097
8098
8099# Save the arguments given to us
8100echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8101
8102
8103# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8104
8105    for ac_prog in apt-get yum port pkgutil pkgadd
8106do
8107  # Extract the first word of "$ac_prog", so it can be a program name with args.
8108set dummy $ac_prog; ac_word=$2
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8110$as_echo_n "checking for $ac_word... " >&6; }
8111if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8112  $as_echo_n "(cached) " >&6
8113else
8114  if test -n "$PKGHANDLER"; then
8115  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8116else
8117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8118for as_dir in $PATH
8119do
8120  IFS=$as_save_IFS
8121  test -z "$as_dir" && as_dir=.
8122    for ac_exec_ext in '' $ac_executable_extensions; do
8123  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8124    ac_cv_prog_PKGHANDLER="$ac_prog"
8125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8126    break 2
8127  fi
8128done
8129  done
8130IFS=$as_save_IFS
8131
8132fi
8133fi
8134PKGHANDLER=$ac_cv_prog_PKGHANDLER
8135if test -n "$PKGHANDLER"; then
8136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8137$as_echo "$PKGHANDLER" >&6; }
8138else
8139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8140$as_echo "no" >&6; }
8141fi
8142
8143
8144  test -n "$PKGHANDLER" && break
8145done
8146
8147
8148
8149# Setup tools that requires more complex handling, or that is not needed by the configure script.
8150
8151
8152  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8153  if test "x$MAKE" != x; then
8154    # User has supplied a make, test it.
8155    if test ! -f "$MAKE"; then
8156      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8157    fi
8158
8159  MAKE_CANDIDATE=""$MAKE""
8160  DESCRIPTION="user supplied MAKE=$MAKE"
8161  if test "x$MAKE_CANDIDATE" != x; then
8162    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8163$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8164    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8165    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8166    if test "x$IS_GNU_MAKE" = x; then
8167      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8168$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8169    else
8170      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8171      if test "x$IS_MODERN_MAKE" = x; then
8172        { $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
8173$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;}
8174      else
8175        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8176          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8177            MAKE_EXPECTED_ENV='cygwin'
8178          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8179            MAKE_EXPECTED_ENV='msys'
8180          else
8181            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8182          fi
8183          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8184          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8185        else
8186          # Not relevant for non-Windows
8187          IS_MAKE_CORRECT_ENV=true
8188        fi
8189        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8190          { $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
8191$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;}
8192        else
8193          FOUND_MAKE=$MAKE_CANDIDATE
8194
8195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8196
8197  # First separate the path from the arguments. This will split at the first
8198  # space.
8199  complete="$FOUND_MAKE"
8200  path="${complete%% *}"
8201  tmp="$complete EOL"
8202  arguments="${tmp#* }"
8203
8204  # Input might be given as Windows format, start by converting to
8205  # unix format.
8206  new_path=`$CYGPATH -u "$path"`
8207
8208  # Now try to locate executable using which
8209  new_path=`$WHICH "$new_path" 2> /dev/null`
8210  # bat and cmd files are not always considered executable in cygwin causing which
8211  # to not find them
8212  if test "x$new_path" = x \
8213           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8214           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8215    new_path=`$CYGPATH -u "$path"`
8216  fi
8217  if test "x$new_path" = x; then
8218    # Oops. Which didn't find the executable.
8219    # The splitting of arguments from the executable at a space might have been incorrect,
8220    # since paths with space are more likely in Windows. Give it another try with the whole
8221    # argument.
8222    path="$complete"
8223    arguments="EOL"
8224    new_path=`$CYGPATH -u "$path"`
8225    new_path=`$WHICH "$new_path" 2> /dev/null`
8226    # bat and cmd files are not always considered executable in cygwin causing which
8227    # to not find them
8228    if test "x$new_path" = x \
8229             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8230             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8231      new_path=`$CYGPATH -u "$path"`
8232    fi
8233    if test "x$new_path" = x; then
8234      # It's still not found. Now this is an unrecoverable error.
8235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8236$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8237      has_space=`$ECHO "$complete" | $GREP " "`
8238      if test "x$has_space" != x; then
8239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8241      fi
8242      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8243    fi
8244  fi
8245
8246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8249  # "foo.exe" is OK but "foo" is an error.
8250  #
8251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8252  # It is also a way to make sure we got the proper file name for the real test later on.
8253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8254  if test "x$test_shortpath" = x; then
8255    # Short path failed, file does not exist as specified.
8256    # Try adding .exe or .cmd
8257    if test -f "${new_path}.exe"; then
8258       input_to_shortpath="${new_path}.exe"
8259    elif test -f "${new_path}.cmd"; then
8260       input_to_shortpath="${new_path}.cmd"
8261    else
8262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8263$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8264      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8265$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8266      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8267    fi
8268  else
8269    input_to_shortpath="$new_path"
8270  fi
8271
8272  # Call helper function which possibly converts this using DOS-style short mode.
8273  # If so, the updated path is stored in $new_path.
8274  new_path="$input_to_shortpath"
8275
8276  input_path="$input_to_shortpath"
8277  # Check if we need to convert this using DOS-style short mode. If the path
8278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8279  # take no chances and rewrite it.
8280  # Note: m4 eats our [], so we need to use [ and ] instead.
8281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8282  if test "x$has_forbidden_chars" != x; then
8283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8287      # Going to short mode and back again did indeed matter. Since short mode is
8288      # case insensitive, let's make it lowercase to improve readability.
8289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8290      # Now convert it back to Unix-stile (cygpath)
8291      input_path=`$CYGPATH -u "$shortmode_path"`
8292      new_path="$input_path"
8293    fi
8294  fi
8295
8296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8297  if test "x$test_cygdrive_prefix" = x; then
8298    # As a simple fix, exclude /usr/bin since it's not a real path.
8299    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8301      # a path prefixed by /cygdrive for fixpath to work.
8302      new_path="$CYGWIN_ROOT_PATH$input_path"
8303    fi
8304  fi
8305
8306  # remove trailing .exe if any
8307  new_path="${new_path/%.exe/}"
8308
8309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8310
8311  # First separate the path from the arguments. This will split at the first
8312  # space.
8313  complete="$FOUND_MAKE"
8314  path="${complete%% *}"
8315  tmp="$complete EOL"
8316  arguments="${tmp#* }"
8317
8318  # Input might be given as Windows format, start by converting to
8319  # unix format.
8320  new_path="$path"
8321
8322  windows_path="$new_path"
8323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8324    unix_path=`$CYGPATH -u "$windows_path"`
8325    new_path="$unix_path"
8326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8328    new_path="$unix_path"
8329  fi
8330
8331
8332  # Now try to locate executable using which
8333  new_path=`$WHICH "$new_path" 2> /dev/null`
8334
8335  if test "x$new_path" = x; then
8336    # Oops. Which didn't find the executable.
8337    # The splitting of arguments from the executable at a space might have been incorrect,
8338    # since paths with space are more likely in Windows. Give it another try with the whole
8339    # argument.
8340    path="$complete"
8341    arguments="EOL"
8342    new_path="$path"
8343
8344  windows_path="$new_path"
8345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8346    unix_path=`$CYGPATH -u "$windows_path"`
8347    new_path="$unix_path"
8348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8350    new_path="$unix_path"
8351  fi
8352
8353
8354    new_path=`$WHICH "$new_path" 2> /dev/null`
8355
8356    if test "x$new_path" = x; then
8357      # It's still not found. Now this is an unrecoverable error.
8358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8359$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8360      has_space=`$ECHO "$complete" | $GREP " "`
8361      if test "x$has_space" != x; then
8362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8364      fi
8365      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8366    fi
8367  fi
8368
8369  # Now new_path has a complete unix path to the binary
8370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8371    # Keep paths in /bin as-is, but remove trailing .exe if any
8372    new_path="${new_path/%.exe/}"
8373    # Do not save /bin paths to all_fixpath_prefixes!
8374  else
8375    # Not in mixed or Windows style, start by that.
8376    new_path=`cmd //c echo $new_path`
8377
8378  input_path="$new_path"
8379  # Check if we need to convert this using DOS-style short mode. If the path
8380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8381  # take no chances and rewrite it.
8382  # Note: m4 eats our [], so we need to use [ and ] instead.
8383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8384  if test "x$has_forbidden_chars" != x; then
8385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8387  fi
8388
8389    # Output is in $new_path
8390
8391  windows_path="$new_path"
8392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8393    unix_path=`$CYGPATH -u "$windows_path"`
8394    new_path="$unix_path"
8395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8397    new_path="$unix_path"
8398  fi
8399
8400    # remove trailing .exe if any
8401    new_path="${new_path/%.exe/}"
8402
8403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8405  fi
8406
8407  else
8408    # We're on a posix platform. Hooray! :)
8409    # First separate the path from the arguments. This will split at the first
8410    # space.
8411    complete="$FOUND_MAKE"
8412    path="${complete%% *}"
8413    tmp="$complete EOL"
8414    arguments="${tmp#* }"
8415
8416    # Cannot rely on the command "which" here since it doesn't always work.
8417    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8418    if test -z "$is_absolute_path"; then
8419      # Path to executable is not absolute. Find it.
8420      IFS_save="$IFS"
8421      IFS=:
8422      for p in $PATH; do
8423        if test -f "$p/$path" && test -x "$p/$path"; then
8424          new_path="$p/$path"
8425          break
8426        fi
8427      done
8428      IFS="$IFS_save"
8429    else
8430      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8431$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8432      new_path="$path"
8433    fi
8434
8435    if test "x$new_path" = x; then
8436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8437$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8438        has_space=`$ECHO "$complete" | $GREP " "`
8439        if test "x$has_space" != x; then
8440          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8441$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8442        fi
8443        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8444      fi
8445  fi
8446
8447      # Now join together the path and the arguments once again
8448      if test "x$arguments" != xEOL; then
8449        new_complete="$new_path ${arguments% *}"
8450      else
8451        new_complete="$new_path"
8452      fi
8453
8454  if test "x$complete" != "x$new_complete"; then
8455      FOUND_MAKE="$new_complete"
8456      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8457$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8458    fi
8459
8460        fi
8461      fi
8462    fi
8463  fi
8464
8465    if test "x$FOUND_MAKE" = x; then
8466      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8467    fi
8468  else
8469    # Try our hardest to locate a correct version of GNU make
8470    for ac_prog in gmake
8471do
8472  # Extract the first word of "$ac_prog", so it can be a program name with args.
8473set dummy $ac_prog; ac_word=$2
8474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8475$as_echo_n "checking for $ac_word... " >&6; }
8476if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8477  $as_echo_n "(cached) " >&6
8478else
8479  case $CHECK_GMAKE in
8480  [\\/]* | ?:[\\/]*)
8481  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8482  ;;
8483  *)
8484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8485for as_dir in $PATH
8486do
8487  IFS=$as_save_IFS
8488  test -z "$as_dir" && as_dir=.
8489    for ac_exec_ext in '' $ac_executable_extensions; do
8490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8491    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8493    break 2
8494  fi
8495done
8496  done
8497IFS=$as_save_IFS
8498
8499  ;;
8500esac
8501fi
8502CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8503if test -n "$CHECK_GMAKE"; then
8504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8505$as_echo "$CHECK_GMAKE" >&6; }
8506else
8507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8508$as_echo "no" >&6; }
8509fi
8510
8511
8512  test -n "$CHECK_GMAKE" && break
8513done
8514
8515
8516  MAKE_CANDIDATE=""$CHECK_GMAKE""
8517  DESCRIPTION="gmake in PATH"
8518  if test "x$MAKE_CANDIDATE" != x; then
8519    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8520$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8521    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8522    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8523    if test "x$IS_GNU_MAKE" = x; then
8524      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8525$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8526    else
8527      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8528      if test "x$IS_MODERN_MAKE" = x; then
8529        { $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
8530$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;}
8531      else
8532        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8533          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8534            MAKE_EXPECTED_ENV='cygwin'
8535          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8536            MAKE_EXPECTED_ENV='msys'
8537          else
8538            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8539          fi
8540          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8541          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8542        else
8543          # Not relevant for non-Windows
8544          IS_MAKE_CORRECT_ENV=true
8545        fi
8546        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8547          { $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
8548$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;}
8549        else
8550          FOUND_MAKE=$MAKE_CANDIDATE
8551
8552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8553
8554  # First separate the path from the arguments. This will split at the first
8555  # space.
8556  complete="$FOUND_MAKE"
8557  path="${complete%% *}"
8558  tmp="$complete EOL"
8559  arguments="${tmp#* }"
8560
8561  # Input might be given as Windows format, start by converting to
8562  # unix format.
8563  new_path=`$CYGPATH -u "$path"`
8564
8565  # Now try to locate executable using which
8566  new_path=`$WHICH "$new_path" 2> /dev/null`
8567  # bat and cmd files are not always considered executable in cygwin causing which
8568  # to not find them
8569  if test "x$new_path" = x \
8570           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8571           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8572    new_path=`$CYGPATH -u "$path"`
8573  fi
8574  if test "x$new_path" = x; then
8575    # Oops. Which didn't find the executable.
8576    # The splitting of arguments from the executable at a space might have been incorrect,
8577    # since paths with space are more likely in Windows. Give it another try with the whole
8578    # argument.
8579    path="$complete"
8580    arguments="EOL"
8581    new_path=`$CYGPATH -u "$path"`
8582    new_path=`$WHICH "$new_path" 2> /dev/null`
8583    # bat and cmd files are not always considered executable in cygwin causing which
8584    # to not find them
8585    if test "x$new_path" = x \
8586             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8587             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8588      new_path=`$CYGPATH -u "$path"`
8589    fi
8590    if test "x$new_path" = x; then
8591      # It's still not found. Now this is an unrecoverable error.
8592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8593$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8594      has_space=`$ECHO "$complete" | $GREP " "`
8595      if test "x$has_space" != x; then
8596        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8597$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8598      fi
8599      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8600    fi
8601  fi
8602
8603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8606  # "foo.exe" is OK but "foo" is an error.
8607  #
8608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8609  # It is also a way to make sure we got the proper file name for the real test later on.
8610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8611  if test "x$test_shortpath" = x; then
8612    # Short path failed, file does not exist as specified.
8613    # Try adding .exe or .cmd
8614    if test -f "${new_path}.exe"; then
8615       input_to_shortpath="${new_path}.exe"
8616    elif test -f "${new_path}.cmd"; then
8617       input_to_shortpath="${new_path}.cmd"
8618    else
8619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8620$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8621      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8622$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8623      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8624    fi
8625  else
8626    input_to_shortpath="$new_path"
8627  fi
8628
8629  # Call helper function which possibly converts this using DOS-style short mode.
8630  # If so, the updated path is stored in $new_path.
8631  new_path="$input_to_shortpath"
8632
8633  input_path="$input_to_shortpath"
8634  # Check if we need to convert this using DOS-style short mode. If the path
8635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8636  # take no chances and rewrite it.
8637  # Note: m4 eats our [], so we need to use [ and ] instead.
8638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8639  if test "x$has_forbidden_chars" != x; then
8640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8644      # Going to short mode and back again did indeed matter. Since short mode is
8645      # case insensitive, let's make it lowercase to improve readability.
8646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8647      # Now convert it back to Unix-stile (cygpath)
8648      input_path=`$CYGPATH -u "$shortmode_path"`
8649      new_path="$input_path"
8650    fi
8651  fi
8652
8653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8654  if test "x$test_cygdrive_prefix" = x; then
8655    # As a simple fix, exclude /usr/bin since it's not a real path.
8656    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8658      # a path prefixed by /cygdrive for fixpath to work.
8659      new_path="$CYGWIN_ROOT_PATH$input_path"
8660    fi
8661  fi
8662
8663  # remove trailing .exe if any
8664  new_path="${new_path/%.exe/}"
8665
8666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8667
8668  # First separate the path from the arguments. This will split at the first
8669  # space.
8670  complete="$FOUND_MAKE"
8671  path="${complete%% *}"
8672  tmp="$complete EOL"
8673  arguments="${tmp#* }"
8674
8675  # Input might be given as Windows format, start by converting to
8676  # unix format.
8677  new_path="$path"
8678
8679  windows_path="$new_path"
8680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8681    unix_path=`$CYGPATH -u "$windows_path"`
8682    new_path="$unix_path"
8683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8685    new_path="$unix_path"
8686  fi
8687
8688
8689  # Now try to locate executable using which
8690  new_path=`$WHICH "$new_path" 2> /dev/null`
8691
8692  if test "x$new_path" = x; then
8693    # Oops. Which didn't find the executable.
8694    # The splitting of arguments from the executable at a space might have been incorrect,
8695    # since paths with space are more likely in Windows. Give it another try with the whole
8696    # argument.
8697    path="$complete"
8698    arguments="EOL"
8699    new_path="$path"
8700
8701  windows_path="$new_path"
8702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8703    unix_path=`$CYGPATH -u "$windows_path"`
8704    new_path="$unix_path"
8705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8707    new_path="$unix_path"
8708  fi
8709
8710
8711    new_path=`$WHICH "$new_path" 2> /dev/null`
8712
8713    if test "x$new_path" = x; then
8714      # It's still not found. Now this is an unrecoverable error.
8715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8716$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8717      has_space=`$ECHO "$complete" | $GREP " "`
8718      if test "x$has_space" != x; then
8719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8721      fi
8722      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8723    fi
8724  fi
8725
8726  # Now new_path has a complete unix path to the binary
8727  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8728    # Keep paths in /bin as-is, but remove trailing .exe if any
8729    new_path="${new_path/%.exe/}"
8730    # Do not save /bin paths to all_fixpath_prefixes!
8731  else
8732    # Not in mixed or Windows style, start by that.
8733    new_path=`cmd //c echo $new_path`
8734
8735  input_path="$new_path"
8736  # Check if we need to convert this using DOS-style short mode. If the path
8737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8738  # take no chances and rewrite it.
8739  # Note: m4 eats our [], so we need to use [ and ] instead.
8740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8741  if test "x$has_forbidden_chars" != x; then
8742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8744  fi
8745
8746    # Output is in $new_path
8747
8748  windows_path="$new_path"
8749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8750    unix_path=`$CYGPATH -u "$windows_path"`
8751    new_path="$unix_path"
8752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8754    new_path="$unix_path"
8755  fi
8756
8757    # remove trailing .exe if any
8758    new_path="${new_path/%.exe/}"
8759
8760    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8761    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8762  fi
8763
8764  else
8765    # We're on a posix platform. Hooray! :)
8766    # First separate the path from the arguments. This will split at the first
8767    # space.
8768    complete="$FOUND_MAKE"
8769    path="${complete%% *}"
8770    tmp="$complete EOL"
8771    arguments="${tmp#* }"
8772
8773    # Cannot rely on the command "which" here since it doesn't always work.
8774    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8775    if test -z "$is_absolute_path"; then
8776      # Path to executable is not absolute. Find it.
8777      IFS_save="$IFS"
8778      IFS=:
8779      for p in $PATH; do
8780        if test -f "$p/$path" && test -x "$p/$path"; then
8781          new_path="$p/$path"
8782          break
8783        fi
8784      done
8785      IFS="$IFS_save"
8786    else
8787      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8788$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8789      new_path="$path"
8790    fi
8791
8792    if test "x$new_path" = x; then
8793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8794$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8795        has_space=`$ECHO "$complete" | $GREP " "`
8796        if test "x$has_space" != x; then
8797          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8798$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8799        fi
8800        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8801      fi
8802  fi
8803
8804      # Now join together the path and the arguments once again
8805      if test "x$arguments" != xEOL; then
8806        new_complete="$new_path ${arguments% *}"
8807      else
8808        new_complete="$new_path"
8809      fi
8810
8811  if test "x$complete" != "x$new_complete"; then
8812      FOUND_MAKE="$new_complete"
8813      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8814$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8815    fi
8816
8817        fi
8818      fi
8819    fi
8820  fi
8821
8822
8823    if test "x$FOUND_MAKE" = x; then
8824      for ac_prog in make
8825do
8826  # Extract the first word of "$ac_prog", so it can be a program name with args.
8827set dummy $ac_prog; ac_word=$2
8828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8829$as_echo_n "checking for $ac_word... " >&6; }
8830if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8831  $as_echo_n "(cached) " >&6
8832else
8833  case $CHECK_MAKE in
8834  [\\/]* | ?:[\\/]*)
8835  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8836  ;;
8837  *)
8838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8839for as_dir in $PATH
8840do
8841  IFS=$as_save_IFS
8842  test -z "$as_dir" && as_dir=.
8843    for ac_exec_ext in '' $ac_executable_extensions; do
8844  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8845    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8847    break 2
8848  fi
8849done
8850  done
8851IFS=$as_save_IFS
8852
8853  ;;
8854esac
8855fi
8856CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8857if test -n "$CHECK_MAKE"; then
8858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8859$as_echo "$CHECK_MAKE" >&6; }
8860else
8861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8862$as_echo "no" >&6; }
8863fi
8864
8865
8866  test -n "$CHECK_MAKE" && break
8867done
8868
8869
8870  MAKE_CANDIDATE=""$CHECK_MAKE""
8871  DESCRIPTION="make in PATH"
8872  if test "x$MAKE_CANDIDATE" != x; then
8873    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8874$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8875    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8876    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8877    if test "x$IS_GNU_MAKE" = x; then
8878      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8879$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8880    else
8881      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8882      if test "x$IS_MODERN_MAKE" = x; then
8883        { $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
8884$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;}
8885      else
8886        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8887          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8888            MAKE_EXPECTED_ENV='cygwin'
8889          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8890            MAKE_EXPECTED_ENV='msys'
8891          else
8892            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8893          fi
8894          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8895          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8896        else
8897          # Not relevant for non-Windows
8898          IS_MAKE_CORRECT_ENV=true
8899        fi
8900        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8901          { $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
8902$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;}
8903        else
8904          FOUND_MAKE=$MAKE_CANDIDATE
8905
8906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8907
8908  # First separate the path from the arguments. This will split at the first
8909  # space.
8910  complete="$FOUND_MAKE"
8911  path="${complete%% *}"
8912  tmp="$complete EOL"
8913  arguments="${tmp#* }"
8914
8915  # Input might be given as Windows format, start by converting to
8916  # unix format.
8917  new_path=`$CYGPATH -u "$path"`
8918
8919  # Now try to locate executable using which
8920  new_path=`$WHICH "$new_path" 2> /dev/null`
8921  # bat and cmd files are not always considered executable in cygwin causing which
8922  # to not find them
8923  if test "x$new_path" = x \
8924           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8925           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8926    new_path=`$CYGPATH -u "$path"`
8927  fi
8928  if test "x$new_path" = x; then
8929    # Oops. Which didn't find the executable.
8930    # The splitting of arguments from the executable at a space might have been incorrect,
8931    # since paths with space are more likely in Windows. Give it another try with the whole
8932    # argument.
8933    path="$complete"
8934    arguments="EOL"
8935    new_path=`$CYGPATH -u "$path"`
8936    new_path=`$WHICH "$new_path" 2> /dev/null`
8937    # bat and cmd files are not always considered executable in cygwin causing which
8938    # to not find them
8939    if test "x$new_path" = x \
8940             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8941             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8942      new_path=`$CYGPATH -u "$path"`
8943    fi
8944    if test "x$new_path" = x; then
8945      # It's still not found. Now this is an unrecoverable error.
8946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8947$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8948      has_space=`$ECHO "$complete" | $GREP " "`
8949      if test "x$has_space" != x; then
8950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8952      fi
8953      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8954    fi
8955  fi
8956
8957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8960  # "foo.exe" is OK but "foo" is an error.
8961  #
8962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8963  # It is also a way to make sure we got the proper file name for the real test later on.
8964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8965  if test "x$test_shortpath" = x; then
8966    # Short path failed, file does not exist as specified.
8967    # Try adding .exe or .cmd
8968    if test -f "${new_path}.exe"; then
8969       input_to_shortpath="${new_path}.exe"
8970    elif test -f "${new_path}.cmd"; then
8971       input_to_shortpath="${new_path}.cmd"
8972    else
8973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8974$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8975      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8976$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8977      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8978    fi
8979  else
8980    input_to_shortpath="$new_path"
8981  fi
8982
8983  # Call helper function which possibly converts this using DOS-style short mode.
8984  # If so, the updated path is stored in $new_path.
8985  new_path="$input_to_shortpath"
8986
8987  input_path="$input_to_shortpath"
8988  # Check if we need to convert this using DOS-style short mode. If the path
8989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8990  # take no chances and rewrite it.
8991  # Note: m4 eats our [], so we need to use [ and ] instead.
8992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8993  if test "x$has_forbidden_chars" != x; then
8994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8998      # Going to short mode and back again did indeed matter. Since short mode is
8999      # case insensitive, let's make it lowercase to improve readability.
9000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9001      # Now convert it back to Unix-stile (cygpath)
9002      input_path=`$CYGPATH -u "$shortmode_path"`
9003      new_path="$input_path"
9004    fi
9005  fi
9006
9007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9008  if test "x$test_cygdrive_prefix" = x; then
9009    # As a simple fix, exclude /usr/bin since it's not a real path.
9010    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9012      # a path prefixed by /cygdrive for fixpath to work.
9013      new_path="$CYGWIN_ROOT_PATH$input_path"
9014    fi
9015  fi
9016
9017  # remove trailing .exe if any
9018  new_path="${new_path/%.exe/}"
9019
9020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9021
9022  # First separate the path from the arguments. This will split at the first
9023  # space.
9024  complete="$FOUND_MAKE"
9025  path="${complete%% *}"
9026  tmp="$complete EOL"
9027  arguments="${tmp#* }"
9028
9029  # Input might be given as Windows format, start by converting to
9030  # unix format.
9031  new_path="$path"
9032
9033  windows_path="$new_path"
9034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9035    unix_path=`$CYGPATH -u "$windows_path"`
9036    new_path="$unix_path"
9037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9039    new_path="$unix_path"
9040  fi
9041
9042
9043  # Now try to locate executable using which
9044  new_path=`$WHICH "$new_path" 2> /dev/null`
9045
9046  if test "x$new_path" = x; then
9047    # Oops. Which didn't find the executable.
9048    # The splitting of arguments from the executable at a space might have been incorrect,
9049    # since paths with space are more likely in Windows. Give it another try with the whole
9050    # argument.
9051    path="$complete"
9052    arguments="EOL"
9053    new_path="$path"
9054
9055  windows_path="$new_path"
9056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9057    unix_path=`$CYGPATH -u "$windows_path"`
9058    new_path="$unix_path"
9059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9061    new_path="$unix_path"
9062  fi
9063
9064
9065    new_path=`$WHICH "$new_path" 2> /dev/null`
9066
9067    if test "x$new_path" = x; then
9068      # It's still not found. Now this is an unrecoverable error.
9069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9070$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9071      has_space=`$ECHO "$complete" | $GREP " "`
9072      if test "x$has_space" != x; then
9073        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9074$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9075      fi
9076      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9077    fi
9078  fi
9079
9080  # Now new_path has a complete unix path to the binary
9081  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9082    # Keep paths in /bin as-is, but remove trailing .exe if any
9083    new_path="${new_path/%.exe/}"
9084    # Do not save /bin paths to all_fixpath_prefixes!
9085  else
9086    # Not in mixed or Windows style, start by that.
9087    new_path=`cmd //c echo $new_path`
9088
9089  input_path="$new_path"
9090  # Check if we need to convert this using DOS-style short mode. If the path
9091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9092  # take no chances and rewrite it.
9093  # Note: m4 eats our [], so we need to use [ and ] instead.
9094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9095  if test "x$has_forbidden_chars" != x; then
9096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9098  fi
9099
9100    # Output is in $new_path
9101
9102  windows_path="$new_path"
9103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9104    unix_path=`$CYGPATH -u "$windows_path"`
9105    new_path="$unix_path"
9106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9108    new_path="$unix_path"
9109  fi
9110
9111    # remove trailing .exe if any
9112    new_path="${new_path/%.exe/}"
9113
9114    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9115    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9116  fi
9117
9118  else
9119    # We're on a posix platform. Hooray! :)
9120    # First separate the path from the arguments. This will split at the first
9121    # space.
9122    complete="$FOUND_MAKE"
9123    path="${complete%% *}"
9124    tmp="$complete EOL"
9125    arguments="${tmp#* }"
9126
9127    # Cannot rely on the command "which" here since it doesn't always work.
9128    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9129    if test -z "$is_absolute_path"; then
9130      # Path to executable is not absolute. Find it.
9131      IFS_save="$IFS"
9132      IFS=:
9133      for p in $PATH; do
9134        if test -f "$p/$path" && test -x "$p/$path"; then
9135          new_path="$p/$path"
9136          break
9137        fi
9138      done
9139      IFS="$IFS_save"
9140    else
9141      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9142$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9143      new_path="$path"
9144    fi
9145
9146    if test "x$new_path" = x; then
9147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9148$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9149        has_space=`$ECHO "$complete" | $GREP " "`
9150        if test "x$has_space" != x; then
9151          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9152$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9153        fi
9154        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9155      fi
9156  fi
9157
9158      # Now join together the path and the arguments once again
9159      if test "x$arguments" != xEOL; then
9160        new_complete="$new_path ${arguments% *}"
9161      else
9162        new_complete="$new_path"
9163      fi
9164
9165  if test "x$complete" != "x$new_complete"; then
9166      FOUND_MAKE="$new_complete"
9167      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9168$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9169    fi
9170
9171        fi
9172      fi
9173    fi
9174  fi
9175
9176    fi
9177
9178    if test "x$FOUND_MAKE" = x; then
9179      if test "x$TOOLS_DIR" != x; then
9180        # We have a tools-dir, check that as well before giving up.
9181        OLD_PATH=$PATH
9182        PATH=$TOOLS_DIR:$PATH
9183        for ac_prog in gmake
9184do
9185  # Extract the first word of "$ac_prog", so it can be a program name with args.
9186set dummy $ac_prog; ac_word=$2
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9188$as_echo_n "checking for $ac_word... " >&6; }
9189if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9190  $as_echo_n "(cached) " >&6
9191else
9192  case $CHECK_TOOLSDIR_GMAKE in
9193  [\\/]* | ?:[\\/]*)
9194  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9195  ;;
9196  *)
9197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9198for as_dir in $PATH
9199do
9200  IFS=$as_save_IFS
9201  test -z "$as_dir" && as_dir=.
9202    for ac_exec_ext in '' $ac_executable_extensions; do
9203  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9204    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9206    break 2
9207  fi
9208done
9209  done
9210IFS=$as_save_IFS
9211
9212  ;;
9213esac
9214fi
9215CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9216if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9218$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9219else
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9221$as_echo "no" >&6; }
9222fi
9223
9224
9225  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9226done
9227
9228
9229  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9230  DESCRIPTION="gmake in tools-dir"
9231  if test "x$MAKE_CANDIDATE" != x; then
9232    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9233$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9234    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9235    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9236    if test "x$IS_GNU_MAKE" = x; then
9237      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9238$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9239    else
9240      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9241      if test "x$IS_MODERN_MAKE" = x; then
9242        { $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
9243$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;}
9244      else
9245        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9246          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9247            MAKE_EXPECTED_ENV='cygwin'
9248          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9249            MAKE_EXPECTED_ENV='msys'
9250          else
9251            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9252          fi
9253          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9254          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9255        else
9256          # Not relevant for non-Windows
9257          IS_MAKE_CORRECT_ENV=true
9258        fi
9259        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9260          { $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
9261$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;}
9262        else
9263          FOUND_MAKE=$MAKE_CANDIDATE
9264
9265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9266
9267  # First separate the path from the arguments. This will split at the first
9268  # space.
9269  complete="$FOUND_MAKE"
9270  path="${complete%% *}"
9271  tmp="$complete EOL"
9272  arguments="${tmp#* }"
9273
9274  # Input might be given as Windows format, start by converting to
9275  # unix format.
9276  new_path=`$CYGPATH -u "$path"`
9277
9278  # Now try to locate executable using which
9279  new_path=`$WHICH "$new_path" 2> /dev/null`
9280  # bat and cmd files are not always considered executable in cygwin causing which
9281  # to not find them
9282  if test "x$new_path" = x \
9283           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9284           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9285    new_path=`$CYGPATH -u "$path"`
9286  fi
9287  if test "x$new_path" = x; then
9288    # Oops. Which didn't find the executable.
9289    # The splitting of arguments from the executable at a space might have been incorrect,
9290    # since paths with space are more likely in Windows. Give it another try with the whole
9291    # argument.
9292    path="$complete"
9293    arguments="EOL"
9294    new_path=`$CYGPATH -u "$path"`
9295    new_path=`$WHICH "$new_path" 2> /dev/null`
9296    # bat and cmd files are not always considered executable in cygwin causing which
9297    # to not find them
9298    if test "x$new_path" = x \
9299             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9300             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9301      new_path=`$CYGPATH -u "$path"`
9302    fi
9303    if test "x$new_path" = x; then
9304      # It's still not found. Now this is an unrecoverable error.
9305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9306$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9307      has_space=`$ECHO "$complete" | $GREP " "`
9308      if test "x$has_space" != x; then
9309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9311      fi
9312      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9313    fi
9314  fi
9315
9316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9319  # "foo.exe" is OK but "foo" is an error.
9320  #
9321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9322  # It is also a way to make sure we got the proper file name for the real test later on.
9323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9324  if test "x$test_shortpath" = x; then
9325    # Short path failed, file does not exist as specified.
9326    # Try adding .exe or .cmd
9327    if test -f "${new_path}.exe"; then
9328       input_to_shortpath="${new_path}.exe"
9329    elif test -f "${new_path}.cmd"; then
9330       input_to_shortpath="${new_path}.cmd"
9331    else
9332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9333$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9334      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9335$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9336      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9337    fi
9338  else
9339    input_to_shortpath="$new_path"
9340  fi
9341
9342  # Call helper function which possibly converts this using DOS-style short mode.
9343  # If so, the updated path is stored in $new_path.
9344  new_path="$input_to_shortpath"
9345
9346  input_path="$input_to_shortpath"
9347  # Check if we need to convert this using DOS-style short mode. If the path
9348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9349  # take no chances and rewrite it.
9350  # Note: m4 eats our [], so we need to use [ and ] instead.
9351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9352  if test "x$has_forbidden_chars" != x; then
9353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9357      # Going to short mode and back again did indeed matter. Since short mode is
9358      # case insensitive, let's make it lowercase to improve readability.
9359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9360      # Now convert it back to Unix-stile (cygpath)
9361      input_path=`$CYGPATH -u "$shortmode_path"`
9362      new_path="$input_path"
9363    fi
9364  fi
9365
9366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9367  if test "x$test_cygdrive_prefix" = x; then
9368    # As a simple fix, exclude /usr/bin since it's not a real path.
9369    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9371      # a path prefixed by /cygdrive for fixpath to work.
9372      new_path="$CYGWIN_ROOT_PATH$input_path"
9373    fi
9374  fi
9375
9376  # remove trailing .exe if any
9377  new_path="${new_path/%.exe/}"
9378
9379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9380
9381  # First separate the path from the arguments. This will split at the first
9382  # space.
9383  complete="$FOUND_MAKE"
9384  path="${complete%% *}"
9385  tmp="$complete EOL"
9386  arguments="${tmp#* }"
9387
9388  # Input might be given as Windows format, start by converting to
9389  # unix format.
9390  new_path="$path"
9391
9392  windows_path="$new_path"
9393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9394    unix_path=`$CYGPATH -u "$windows_path"`
9395    new_path="$unix_path"
9396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9398    new_path="$unix_path"
9399  fi
9400
9401
9402  # Now try to locate executable using which
9403  new_path=`$WHICH "$new_path" 2> /dev/null`
9404
9405  if test "x$new_path" = x; then
9406    # Oops. Which didn't find the executable.
9407    # The splitting of arguments from the executable at a space might have been incorrect,
9408    # since paths with space are more likely in Windows. Give it another try with the whole
9409    # argument.
9410    path="$complete"
9411    arguments="EOL"
9412    new_path="$path"
9413
9414  windows_path="$new_path"
9415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9416    unix_path=`$CYGPATH -u "$windows_path"`
9417    new_path="$unix_path"
9418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9420    new_path="$unix_path"
9421  fi
9422
9423
9424    new_path=`$WHICH "$new_path" 2> /dev/null`
9425
9426    if test "x$new_path" = x; then
9427      # It's still not found. Now this is an unrecoverable error.
9428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9429$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9430      has_space=`$ECHO "$complete" | $GREP " "`
9431      if test "x$has_space" != x; then
9432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9434      fi
9435      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9436    fi
9437  fi
9438
9439  # Now new_path has a complete unix path to the binary
9440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9441    # Keep paths in /bin as-is, but remove trailing .exe if any
9442    new_path="${new_path/%.exe/}"
9443    # Do not save /bin paths to all_fixpath_prefixes!
9444  else
9445    # Not in mixed or Windows style, start by that.
9446    new_path=`cmd //c echo $new_path`
9447
9448  input_path="$new_path"
9449  # Check if we need to convert this using DOS-style short mode. If the path
9450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9451  # take no chances and rewrite it.
9452  # Note: m4 eats our [], so we need to use [ and ] instead.
9453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9454  if test "x$has_forbidden_chars" != x; then
9455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9457  fi
9458
9459    # Output is in $new_path
9460
9461  windows_path="$new_path"
9462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9463    unix_path=`$CYGPATH -u "$windows_path"`
9464    new_path="$unix_path"
9465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9467    new_path="$unix_path"
9468  fi
9469
9470    # remove trailing .exe if any
9471    new_path="${new_path/%.exe/}"
9472
9473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9475  fi
9476
9477  else
9478    # We're on a posix platform. Hooray! :)
9479    # First separate the path from the arguments. This will split at the first
9480    # space.
9481    complete="$FOUND_MAKE"
9482    path="${complete%% *}"
9483    tmp="$complete EOL"
9484    arguments="${tmp#* }"
9485
9486    # Cannot rely on the command "which" here since it doesn't always work.
9487    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9488    if test -z "$is_absolute_path"; then
9489      # Path to executable is not absolute. Find it.
9490      IFS_save="$IFS"
9491      IFS=:
9492      for p in $PATH; do
9493        if test -f "$p/$path" && test -x "$p/$path"; then
9494          new_path="$p/$path"
9495          break
9496        fi
9497      done
9498      IFS="$IFS_save"
9499    else
9500      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9501$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9502      new_path="$path"
9503    fi
9504
9505    if test "x$new_path" = x; then
9506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9507$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9508        has_space=`$ECHO "$complete" | $GREP " "`
9509        if test "x$has_space" != x; then
9510          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9511$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9512        fi
9513        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9514      fi
9515  fi
9516
9517      # Now join together the path and the arguments once again
9518      if test "x$arguments" != xEOL; then
9519        new_complete="$new_path ${arguments% *}"
9520      else
9521        new_complete="$new_path"
9522      fi
9523
9524  if test "x$complete" != "x$new_complete"; then
9525      FOUND_MAKE="$new_complete"
9526      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9527$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9528    fi
9529
9530        fi
9531      fi
9532    fi
9533  fi
9534
9535        if test "x$FOUND_MAKE" = x; then
9536          for ac_prog in make
9537do
9538  # Extract the first word of "$ac_prog", so it can be a program name with args.
9539set dummy $ac_prog; ac_word=$2
9540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9541$as_echo_n "checking for $ac_word... " >&6; }
9542if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9543  $as_echo_n "(cached) " >&6
9544else
9545  case $CHECK_TOOLSDIR_MAKE in
9546  [\\/]* | ?:[\\/]*)
9547  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9548  ;;
9549  *)
9550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9551for as_dir in $PATH
9552do
9553  IFS=$as_save_IFS
9554  test -z "$as_dir" && as_dir=.
9555    for ac_exec_ext in '' $ac_executable_extensions; do
9556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9557    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9559    break 2
9560  fi
9561done
9562  done
9563IFS=$as_save_IFS
9564
9565  ;;
9566esac
9567fi
9568CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9569if test -n "$CHECK_TOOLSDIR_MAKE"; then
9570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9571$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9572else
9573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9574$as_echo "no" >&6; }
9575fi
9576
9577
9578  test -n "$CHECK_TOOLSDIR_MAKE" && break
9579done
9580
9581
9582  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9583  DESCRIPTION="make in tools-dir"
9584  if test "x$MAKE_CANDIDATE" != x; then
9585    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9586$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9587    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9588    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9589    if test "x$IS_GNU_MAKE" = x; then
9590      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9591$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9592    else
9593      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9594      if test "x$IS_MODERN_MAKE" = x; then
9595        { $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
9596$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;}
9597      else
9598        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9599          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9600            MAKE_EXPECTED_ENV='cygwin'
9601          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9602            MAKE_EXPECTED_ENV='msys'
9603          else
9604            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9605          fi
9606          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9607          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9608        else
9609          # Not relevant for non-Windows
9610          IS_MAKE_CORRECT_ENV=true
9611        fi
9612        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9613          { $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
9614$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;}
9615        else
9616          FOUND_MAKE=$MAKE_CANDIDATE
9617
9618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9619
9620  # First separate the path from the arguments. This will split at the first
9621  # space.
9622  complete="$FOUND_MAKE"
9623  path="${complete%% *}"
9624  tmp="$complete EOL"
9625  arguments="${tmp#* }"
9626
9627  # Input might be given as Windows format, start by converting to
9628  # unix format.
9629  new_path=`$CYGPATH -u "$path"`
9630
9631  # Now try to locate executable using which
9632  new_path=`$WHICH "$new_path" 2> /dev/null`
9633  # bat and cmd files are not always considered executable in cygwin causing which
9634  # to not find them
9635  if test "x$new_path" = x \
9636           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9637           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9638    new_path=`$CYGPATH -u "$path"`
9639  fi
9640  if test "x$new_path" = x; then
9641    # Oops. Which didn't find the executable.
9642    # The splitting of arguments from the executable at a space might have been incorrect,
9643    # since paths with space are more likely in Windows. Give it another try with the whole
9644    # argument.
9645    path="$complete"
9646    arguments="EOL"
9647    new_path=`$CYGPATH -u "$path"`
9648    new_path=`$WHICH "$new_path" 2> /dev/null`
9649    # bat and cmd files are not always considered executable in cygwin causing which
9650    # to not find them
9651    if test "x$new_path" = x \
9652             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9653             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9654      new_path=`$CYGPATH -u "$path"`
9655    fi
9656    if test "x$new_path" = x; then
9657      # It's still not found. Now this is an unrecoverable error.
9658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9659$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9660      has_space=`$ECHO "$complete" | $GREP " "`
9661      if test "x$has_space" != x; then
9662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9664      fi
9665      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9666    fi
9667  fi
9668
9669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9672  # "foo.exe" is OK but "foo" is an error.
9673  #
9674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9675  # It is also a way to make sure we got the proper file name for the real test later on.
9676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9677  if test "x$test_shortpath" = x; then
9678    # Short path failed, file does not exist as specified.
9679    # Try adding .exe or .cmd
9680    if test -f "${new_path}.exe"; then
9681       input_to_shortpath="${new_path}.exe"
9682    elif test -f "${new_path}.cmd"; then
9683       input_to_shortpath="${new_path}.cmd"
9684    else
9685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9686$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9687      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9688$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9689      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9690    fi
9691  else
9692    input_to_shortpath="$new_path"
9693  fi
9694
9695  # Call helper function which possibly converts this using DOS-style short mode.
9696  # If so, the updated path is stored in $new_path.
9697  new_path="$input_to_shortpath"
9698
9699  input_path="$input_to_shortpath"
9700  # Check if we need to convert this using DOS-style short mode. If the path
9701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9702  # take no chances and rewrite it.
9703  # Note: m4 eats our [], so we need to use [ and ] instead.
9704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9705  if test "x$has_forbidden_chars" != x; then
9706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9710      # Going to short mode and back again did indeed matter. Since short mode is
9711      # case insensitive, let's make it lowercase to improve readability.
9712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9713      # Now convert it back to Unix-stile (cygpath)
9714      input_path=`$CYGPATH -u "$shortmode_path"`
9715      new_path="$input_path"
9716    fi
9717  fi
9718
9719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9720  if test "x$test_cygdrive_prefix" = x; then
9721    # As a simple fix, exclude /usr/bin since it's not a real path.
9722    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9724      # a path prefixed by /cygdrive for fixpath to work.
9725      new_path="$CYGWIN_ROOT_PATH$input_path"
9726    fi
9727  fi
9728
9729  # remove trailing .exe if any
9730  new_path="${new_path/%.exe/}"
9731
9732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9733
9734  # First separate the path from the arguments. This will split at the first
9735  # space.
9736  complete="$FOUND_MAKE"
9737  path="${complete%% *}"
9738  tmp="$complete EOL"
9739  arguments="${tmp#* }"
9740
9741  # Input might be given as Windows format, start by converting to
9742  # unix format.
9743  new_path="$path"
9744
9745  windows_path="$new_path"
9746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9747    unix_path=`$CYGPATH -u "$windows_path"`
9748    new_path="$unix_path"
9749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9751    new_path="$unix_path"
9752  fi
9753
9754
9755  # Now try to locate executable using which
9756  new_path=`$WHICH "$new_path" 2> /dev/null`
9757
9758  if test "x$new_path" = x; then
9759    # Oops. Which didn't find the executable.
9760    # The splitting of arguments from the executable at a space might have been incorrect,
9761    # since paths with space are more likely in Windows. Give it another try with the whole
9762    # argument.
9763    path="$complete"
9764    arguments="EOL"
9765    new_path="$path"
9766
9767  windows_path="$new_path"
9768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9769    unix_path=`$CYGPATH -u "$windows_path"`
9770    new_path="$unix_path"
9771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9773    new_path="$unix_path"
9774  fi
9775
9776
9777    new_path=`$WHICH "$new_path" 2> /dev/null`
9778
9779    if test "x$new_path" = x; then
9780      # It's still not found. Now this is an unrecoverable error.
9781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9782$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9783      has_space=`$ECHO "$complete" | $GREP " "`
9784      if test "x$has_space" != x; then
9785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9787      fi
9788      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9789    fi
9790  fi
9791
9792  # Now new_path has a complete unix path to the binary
9793  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9794    # Keep paths in /bin as-is, but remove trailing .exe if any
9795    new_path="${new_path/%.exe/}"
9796    # Do not save /bin paths to all_fixpath_prefixes!
9797  else
9798    # Not in mixed or Windows style, start by that.
9799    new_path=`cmd //c echo $new_path`
9800
9801  input_path="$new_path"
9802  # Check if we need to convert this using DOS-style short mode. If the path
9803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9804  # take no chances and rewrite it.
9805  # Note: m4 eats our [], so we need to use [ and ] instead.
9806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9807  if test "x$has_forbidden_chars" != x; then
9808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9810  fi
9811
9812    # Output is in $new_path
9813
9814  windows_path="$new_path"
9815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9816    unix_path=`$CYGPATH -u "$windows_path"`
9817    new_path="$unix_path"
9818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9820    new_path="$unix_path"
9821  fi
9822
9823    # remove trailing .exe if any
9824    new_path="${new_path/%.exe/}"
9825
9826    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9827    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9828  fi
9829
9830  else
9831    # We're on a posix platform. Hooray! :)
9832    # First separate the path from the arguments. This will split at the first
9833    # space.
9834    complete="$FOUND_MAKE"
9835    path="${complete%% *}"
9836    tmp="$complete EOL"
9837    arguments="${tmp#* }"
9838
9839    # Cannot rely on the command "which" here since it doesn't always work.
9840    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9841    if test -z "$is_absolute_path"; then
9842      # Path to executable is not absolute. Find it.
9843      IFS_save="$IFS"
9844      IFS=:
9845      for p in $PATH; do
9846        if test -f "$p/$path" && test -x "$p/$path"; then
9847          new_path="$p/$path"
9848          break
9849        fi
9850      done
9851      IFS="$IFS_save"
9852    else
9853      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9854$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9855      new_path="$path"
9856    fi
9857
9858    if test "x$new_path" = x; then
9859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9860$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9861        has_space=`$ECHO "$complete" | $GREP " "`
9862        if test "x$has_space" != x; then
9863          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9864$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9865        fi
9866        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9867      fi
9868  fi
9869
9870      # Now join together the path and the arguments once again
9871      if test "x$arguments" != xEOL; then
9872        new_complete="$new_path ${arguments% *}"
9873      else
9874        new_complete="$new_path"
9875      fi
9876
9877  if test "x$complete" != "x$new_complete"; then
9878      FOUND_MAKE="$new_complete"
9879      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9880$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9881    fi
9882
9883        fi
9884      fi
9885    fi
9886  fi
9887
9888        fi
9889        PATH=$OLD_PATH
9890      fi
9891    fi
9892
9893    if test "x$FOUND_MAKE" = x; then
9894      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
9895    fi
9896  fi
9897
9898  MAKE=$FOUND_MAKE
9899
9900  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9901$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9902
9903
9904
9905    # Test if find supports -delete
9906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9907$as_echo_n "checking if find supports -delete... " >&6; }
9908    FIND_DELETE="-delete"
9909
9910    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9911
9912    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9913
9914    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9915    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9916        # No, it does not.
9917        rm $DELETEDIR/TestIfFindSupportsDelete
9918        FIND_DELETE="-exec rm \{\} \+"
9919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9920$as_echo "no" >&6; }
9921    else
9922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9923$as_echo "yes" >&6; }
9924    fi
9925    rmdir $DELETEDIR
9926
9927
9928
9929# These tools might not be installed by default,
9930# need hint on how to install them.
9931
9932    for ac_prog in unzip
9933do
9934  # Extract the first word of "$ac_prog", so it can be a program name with args.
9935set dummy $ac_prog; ac_word=$2
9936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9937$as_echo_n "checking for $ac_word... " >&6; }
9938if test "${ac_cv_path_UNZIP+set}" = set; then :
9939  $as_echo_n "(cached) " >&6
9940else
9941  case $UNZIP in
9942  [\\/]* | ?:[\\/]*)
9943  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9944  ;;
9945  *)
9946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9947for as_dir in $PATH
9948do
9949  IFS=$as_save_IFS
9950  test -z "$as_dir" && as_dir=.
9951    for ac_exec_ext in '' $ac_executable_extensions; do
9952  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9953    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9955    break 2
9956  fi
9957done
9958  done
9959IFS=$as_save_IFS
9960
9961  ;;
9962esac
9963fi
9964UNZIP=$ac_cv_path_UNZIP
9965if test -n "$UNZIP"; then
9966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9967$as_echo "$UNZIP" >&6; }
9968else
9969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9970$as_echo "no" >&6; }
9971fi
9972
9973
9974  test -n "$UNZIP" && break
9975done
9976
9977
9978    if test "x$UNZIP" = x; then
9979        if test "xunzip" = x; then
9980          PROG_NAME=unzip
9981        else
9982          PROG_NAME=unzip
9983        fi
9984        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9985$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9986        as_fn_error $? "Cannot continue" "$LINENO" 5
9987    fi
9988
9989
9990
9991    for ac_prog in zip
9992do
9993  # Extract the first word of "$ac_prog", so it can be a program name with args.
9994set dummy $ac_prog; ac_word=$2
9995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9996$as_echo_n "checking for $ac_word... " >&6; }
9997if test "${ac_cv_path_ZIP+set}" = set; then :
9998  $as_echo_n "(cached) " >&6
9999else
10000  case $ZIP in
10001  [\\/]* | ?:[\\/]*)
10002  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10003  ;;
10004  *)
10005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10006for as_dir in $PATH
10007do
10008  IFS=$as_save_IFS
10009  test -z "$as_dir" && as_dir=.
10010    for ac_exec_ext in '' $ac_executable_extensions; do
10011  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10012    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10014    break 2
10015  fi
10016done
10017  done
10018IFS=$as_save_IFS
10019
10020  ;;
10021esac
10022fi
10023ZIP=$ac_cv_path_ZIP
10024if test -n "$ZIP"; then
10025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10026$as_echo "$ZIP" >&6; }
10027else
10028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10029$as_echo "no" >&6; }
10030fi
10031
10032
10033  test -n "$ZIP" && break
10034done
10035
10036
10037    if test "x$ZIP" = x; then
10038        if test "xzip" = x; then
10039          PROG_NAME=zip
10040        else
10041          PROG_NAME=zip
10042        fi
10043        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10044$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10045        as_fn_error $? "Cannot continue" "$LINENO" 5
10046    fi
10047
10048
10049
10050# Non-required basic tools
10051
10052# Extract the first word of "ldd", so it can be a program name with args.
10053set dummy ldd; ac_word=$2
10054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10055$as_echo_n "checking for $ac_word... " >&6; }
10056if test "${ac_cv_path_LDD+set}" = set; then :
10057  $as_echo_n "(cached) " >&6
10058else
10059  case $LDD in
10060  [\\/]* | ?:[\\/]*)
10061  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10062  ;;
10063  *)
10064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10065for as_dir in $PATH
10066do
10067  IFS=$as_save_IFS
10068  test -z "$as_dir" && as_dir=.
10069    for ac_exec_ext in '' $ac_executable_extensions; do
10070  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10071    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10073    break 2
10074  fi
10075done
10076  done
10077IFS=$as_save_IFS
10078
10079  ;;
10080esac
10081fi
10082LDD=$ac_cv_path_LDD
10083if test -n "$LDD"; then
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10085$as_echo "$LDD" >&6; }
10086else
10087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10088$as_echo "no" >&6; }
10089fi
10090
10091
10092if test "x$LDD" = "x"; then
10093    # List shared lib dependencies is used for
10094    # debug output and checking for forbidden dependencies.
10095    # We can build without it.
10096    LDD="true"
10097fi
10098# Extract the first word of "otool", so it can be a program name with args.
10099set dummy otool; ac_word=$2
10100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10101$as_echo_n "checking for $ac_word... " >&6; }
10102if test "${ac_cv_path_OTOOL+set}" = set; then :
10103  $as_echo_n "(cached) " >&6
10104else
10105  case $OTOOL in
10106  [\\/]* | ?:[\\/]*)
10107  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10108  ;;
10109  *)
10110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10111for as_dir in $PATH
10112do
10113  IFS=$as_save_IFS
10114  test -z "$as_dir" && as_dir=.
10115    for ac_exec_ext in '' $ac_executable_extensions; do
10116  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10117    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10119    break 2
10120  fi
10121done
10122  done
10123IFS=$as_save_IFS
10124
10125  ;;
10126esac
10127fi
10128OTOOL=$ac_cv_path_OTOOL
10129if test -n "$OTOOL"; then
10130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10131$as_echo "$OTOOL" >&6; }
10132else
10133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10134$as_echo "no" >&6; }
10135fi
10136
10137
10138if test "x$OTOOL" = "x"; then
10139   OTOOL="true"
10140fi
10141for ac_prog in readelf greadelf
10142do
10143  # Extract the first word of "$ac_prog", so it can be a program name with args.
10144set dummy $ac_prog; ac_word=$2
10145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10146$as_echo_n "checking for $ac_word... " >&6; }
10147if test "${ac_cv_path_READELF+set}" = set; then :
10148  $as_echo_n "(cached) " >&6
10149else
10150  case $READELF in
10151  [\\/]* | ?:[\\/]*)
10152  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10153  ;;
10154  *)
10155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10156for as_dir in $PATH
10157do
10158  IFS=$as_save_IFS
10159  test -z "$as_dir" && as_dir=.
10160    for ac_exec_ext in '' $ac_executable_extensions; do
10161  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10162    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10164    break 2
10165  fi
10166done
10167  done
10168IFS=$as_save_IFS
10169
10170  ;;
10171esac
10172fi
10173READELF=$ac_cv_path_READELF
10174if test -n "$READELF"; then
10175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10176$as_echo "$READELF" >&6; }
10177else
10178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10179$as_echo "no" >&6; }
10180fi
10181
10182
10183  test -n "$READELF" && break
10184done
10185
10186# Extract the first word of "hg", so it can be a program name with args.
10187set dummy hg; ac_word=$2
10188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10189$as_echo_n "checking for $ac_word... " >&6; }
10190if test "${ac_cv_path_HG+set}" = set; then :
10191  $as_echo_n "(cached) " >&6
10192else
10193  case $HG in
10194  [\\/]* | ?:[\\/]*)
10195  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10196  ;;
10197  *)
10198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10199for as_dir in $PATH
10200do
10201  IFS=$as_save_IFS
10202  test -z "$as_dir" && as_dir=.
10203    for ac_exec_ext in '' $ac_executable_extensions; do
10204  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10205    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10207    break 2
10208  fi
10209done
10210  done
10211IFS=$as_save_IFS
10212
10213  ;;
10214esac
10215fi
10216HG=$ac_cv_path_HG
10217if test -n "$HG"; then
10218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10219$as_echo "$HG" >&6; }
10220else
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223fi
10224
10225
10226# Extract the first word of "stat", so it can be a program name with args.
10227set dummy stat; ac_word=$2
10228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10229$as_echo_n "checking for $ac_word... " >&6; }
10230if test "${ac_cv_path_STAT+set}" = set; then :
10231  $as_echo_n "(cached) " >&6
10232else
10233  case $STAT in
10234  [\\/]* | ?:[\\/]*)
10235  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10236  ;;
10237  *)
10238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10239for as_dir in $PATH
10240do
10241  IFS=$as_save_IFS
10242  test -z "$as_dir" && as_dir=.
10243    for ac_exec_ext in '' $ac_executable_extensions; do
10244  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10245    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10247    break 2
10248  fi
10249done
10250  done
10251IFS=$as_save_IFS
10252
10253  ;;
10254esac
10255fi
10256STAT=$ac_cv_path_STAT
10257if test -n "$STAT"; then
10258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10259$as_echo "$STAT" >&6; }
10260else
10261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262$as_echo "no" >&6; }
10263fi
10264
10265
10266# Extract the first word of "time", so it can be a program name with args.
10267set dummy time; ac_word=$2
10268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10269$as_echo_n "checking for $ac_word... " >&6; }
10270if test "${ac_cv_path_TIME+set}" = set; then :
10271  $as_echo_n "(cached) " >&6
10272else
10273  case $TIME in
10274  [\\/]* | ?:[\\/]*)
10275  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10276  ;;
10277  *)
10278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10279for as_dir in $PATH
10280do
10281  IFS=$as_save_IFS
10282  test -z "$as_dir" && as_dir=.
10283    for ac_exec_ext in '' $ac_executable_extensions; do
10284  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10285    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10287    break 2
10288  fi
10289done
10290  done
10291IFS=$as_save_IFS
10292
10293  ;;
10294esac
10295fi
10296TIME=$ac_cv_path_TIME
10297if test -n "$TIME"; then
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10299$as_echo "$TIME" >&6; }
10300else
10301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302$as_echo "no" >&6; }
10303fi
10304
10305
10306
10307if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10308
10309    for ac_prog in comm
10310do
10311  # Extract the first word of "$ac_prog", so it can be a program name with args.
10312set dummy $ac_prog; ac_word=$2
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10314$as_echo_n "checking for $ac_word... " >&6; }
10315if test "${ac_cv_path_COMM+set}" = set; then :
10316  $as_echo_n "(cached) " >&6
10317else
10318  case $COMM in
10319  [\\/]* | ?:[\\/]*)
10320  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10321  ;;
10322  *)
10323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10324for as_dir in $PATH
10325do
10326  IFS=$as_save_IFS
10327  test -z "$as_dir" && as_dir=.
10328    for ac_exec_ext in '' $ac_executable_extensions; do
10329  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10330    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10332    break 2
10333  fi
10334done
10335  done
10336IFS=$as_save_IFS
10337
10338  ;;
10339esac
10340fi
10341COMM=$ac_cv_path_COMM
10342if test -n "$COMM"; then
10343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10344$as_echo "$COMM" >&6; }
10345else
10346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
10348fi
10349
10350
10351  test -n "$COMM" && break
10352done
10353
10354
10355    if test "x$COMM" = x; then
10356        if test "xcomm" = x; then
10357          PROG_NAME=comm
10358        else
10359          PROG_NAME=comm
10360        fi
10361        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10362$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10363        as_fn_error $? "Cannot continue" "$LINENO" 5
10364    fi
10365
10366
10367fi
10368
10369
10370# Check if pkg-config is available.
10371
10372
10373if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10374	if test -n "$ac_tool_prefix"; then
10375  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10376set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10378$as_echo_n "checking for $ac_word... " >&6; }
10379if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10380  $as_echo_n "(cached) " >&6
10381else
10382  case $PKG_CONFIG in
10383  [\\/]* | ?:[\\/]*)
10384  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10385  ;;
10386  *)
10387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10388for as_dir in $PATH
10389do
10390  IFS=$as_save_IFS
10391  test -z "$as_dir" && as_dir=.
10392    for ac_exec_ext in '' $ac_executable_extensions; do
10393  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10394    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10396    break 2
10397  fi
10398done
10399  done
10400IFS=$as_save_IFS
10401
10402  ;;
10403esac
10404fi
10405PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10406if test -n "$PKG_CONFIG"; then
10407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10408$as_echo "$PKG_CONFIG" >&6; }
10409else
10410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411$as_echo "no" >&6; }
10412fi
10413
10414
10415fi
10416if test -z "$ac_cv_path_PKG_CONFIG"; then
10417  ac_pt_PKG_CONFIG=$PKG_CONFIG
10418  # Extract the first word of "pkg-config", so it can be a program name with args.
10419set dummy pkg-config; ac_word=$2
10420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10421$as_echo_n "checking for $ac_word... " >&6; }
10422if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10423  $as_echo_n "(cached) " >&6
10424else
10425  case $ac_pt_PKG_CONFIG in
10426  [\\/]* | ?:[\\/]*)
10427  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10428  ;;
10429  *)
10430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10431for as_dir in $PATH
10432do
10433  IFS=$as_save_IFS
10434  test -z "$as_dir" && as_dir=.
10435    for ac_exec_ext in '' $ac_executable_extensions; do
10436  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10437    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10439    break 2
10440  fi
10441done
10442  done
10443IFS=$as_save_IFS
10444
10445  ;;
10446esac
10447fi
10448ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10449if test -n "$ac_pt_PKG_CONFIG"; then
10450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10451$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10452else
10453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10454$as_echo "no" >&6; }
10455fi
10456
10457  if test "x$ac_pt_PKG_CONFIG" = x; then
10458    PKG_CONFIG=""
10459  else
10460    case $cross_compiling:$ac_tool_warned in
10461yes:)
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10464ac_tool_warned=yes ;;
10465esac
10466    PKG_CONFIG=$ac_pt_PKG_CONFIG
10467  fi
10468else
10469  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10470fi
10471
10472fi
10473if test -n "$PKG_CONFIG"; then
10474	_pkg_min_version=0.9.0
10475	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10476$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10477	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10478		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10479$as_echo "yes" >&6; }
10480	else
10481		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10482$as_echo "no" >&6; }
10483		PKG_CONFIG=""
10484	fi
10485
10486fi
10487
10488# After basic tools have been setup, we can check build os specific details.
10489
10490###############################################################################
10491
10492# Note that this is the build platform OS version!
10493
10494OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10495OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10496OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10497OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10498
10499
10500
10501
10502
10503# Setup builddeps, for automatic downloading of tools we need.
10504# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10505# boot-jdk setup, but we need to have basic tools setup first.
10506
10507
10508# Check whether --with-builddeps-conf was given.
10509if test "${with_builddeps_conf+set}" = set; then :
10510  withval=$with_builddeps_conf;
10511fi
10512
10513
10514
10515# Check whether --with-builddeps-server was given.
10516if test "${with_builddeps_server+set}" = set; then :
10517  withval=$with_builddeps_server;
10518fi
10519
10520
10521
10522# Check whether --with-builddeps-dir was given.
10523if test "${with_builddeps_dir+set}" = set; then :
10524  withval=$with_builddeps_dir;
10525else
10526  with_builddeps_dir=/localhome/builddeps
10527fi
10528
10529
10530
10531# Check whether --with-builddeps-group was given.
10532if test "${with_builddeps_group+set}" = set; then :
10533  withval=$with_builddeps_group;
10534fi
10535
10536
10537
10538
10539    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10540        if test "x$with_builddeps_conf" != x; then
10541            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10542$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10543            builddepsfile=$with_builddeps_conf
10544            if test -s $builddepsfile; then
10545                . $builddepsfile
10546                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10547$as_echo "loaded!" >&6; }
10548            else
10549               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10550           fi
10551        else
10552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10553$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10554            builddepsfile=`mktemp`
10555            touch $builddepsfile
10556            # Put all found confs into a single file.
10557            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10558            # Source the file to acquire the variables
10559            if test -s $builddepsfile; then
10560                . $builddepsfile
10561                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10562$as_echo "found at least one!" >&6; }
10563            else
10564               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10565           fi
10566        fi
10567        # Create build and target names that use _ instead of "-" and ".".
10568        # This is necessary to use them in variable names.
10569        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10570        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10571        # Extract rewrite information for build and target
10572        eval rewritten_build=\${REWRITE_${build_var}}
10573        if test "x$rewritten_build" = x; then
10574            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10575            echo Build stays the same $rewritten_build
10576        else
10577            echo Rewriting build for builddeps into $rewritten_build
10578        fi
10579        eval rewritten_target=\${REWRITE_${target_var}}
10580        if test "x$rewritten_target" = x; then
10581            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10582            echo Target stays the same $rewritten_target
10583        else
10584            echo Rewriting target for builddeps into $rewritten_target
10585        fi
10586        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10587        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10588    fi
10589    for ac_prog in 7z unzip
10590do
10591  # Extract the first word of "$ac_prog", so it can be a program name with args.
10592set dummy $ac_prog; ac_word=$2
10593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10594$as_echo_n "checking for $ac_word... " >&6; }
10595if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10596  $as_echo_n "(cached) " >&6
10597else
10598  if test -n "$BDEPS_UNZIP"; then
10599  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10600else
10601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10602for as_dir in $PATH
10603do
10604  IFS=$as_save_IFS
10605  test -z "$as_dir" && as_dir=.
10606    for ac_exec_ext in '' $ac_executable_extensions; do
10607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10608    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10610    break 2
10611  fi
10612done
10613  done
10614IFS=$as_save_IFS
10615
10616fi
10617fi
10618BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10619if test -n "$BDEPS_UNZIP"; then
10620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10621$as_echo "$BDEPS_UNZIP" >&6; }
10622else
10623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624$as_echo "no" >&6; }
10625fi
10626
10627
10628  test -n "$BDEPS_UNZIP" && break
10629done
10630
10631    if test "x$BDEPS_UNZIP" = x7z; then
10632        BDEPS_UNZIP="7z x"
10633    fi
10634
10635    for ac_prog in wget lftp ftp
10636do
10637  # Extract the first word of "$ac_prog", so it can be a program name with args.
10638set dummy $ac_prog; ac_word=$2
10639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10640$as_echo_n "checking for $ac_word... " >&6; }
10641if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10642  $as_echo_n "(cached) " >&6
10643else
10644  if test -n "$BDEPS_FTP"; then
10645  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10646else
10647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10648for as_dir in $PATH
10649do
10650  IFS=$as_save_IFS
10651  test -z "$as_dir" && as_dir=.
10652    for ac_exec_ext in '' $ac_executable_extensions; do
10653  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10654    ac_cv_prog_BDEPS_FTP="$ac_prog"
10655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10656    break 2
10657  fi
10658done
10659  done
10660IFS=$as_save_IFS
10661
10662fi
10663fi
10664BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10665if test -n "$BDEPS_FTP"; then
10666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10667$as_echo "$BDEPS_FTP" >&6; }
10668else
10669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670$as_echo "no" >&6; }
10671fi
10672
10673
10674  test -n "$BDEPS_FTP" && break
10675done
10676
10677
10678
10679###############################################################################
10680#
10681# Determine OpenJDK variants, options and version numbers.
10682#
10683###############################################################################
10684
10685# We need build & target for this.
10686
10687
10688###############################################################################
10689#
10690# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10691# We always build headless support.
10692#
10693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10694$as_echo_n "checking headful support... " >&6; }
10695# Check whether --enable-headful was given.
10696if test "${enable_headful+set}" = set; then :
10697  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10698else
10699  SUPPORT_HEADFUL=yes
10700fi
10701
10702
10703SUPPORT_HEADLESS=yes
10704BUILD_HEADLESS="BUILD_HEADLESS:=true"
10705
10706if test "x$SUPPORT_HEADFUL" = xyes; then
10707    # We are building both headful and headless.
10708    headful_msg="inlude support for both headful and headless"
10709fi
10710
10711if test "x$SUPPORT_HEADFUL" = xno; then
10712    # Thus we are building headless only.
10713    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10714    headful_msg="headless only"
10715fi
10716
10717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10718$as_echo "$headful_msg" >&6; }
10719
10720
10721
10722
10723
10724# Control wether Hotspot runs Queens test after build.
10725# Check whether --enable-hotspot-test-in-build was given.
10726if test "${enable_hotspot_test_in_build+set}" = set; then :
10727  enableval=$enable_hotspot_test_in_build;
10728else
10729  enable_hotspot_test_in_build=no
10730fi
10731
10732if test "x$enable_hotspot_test_in_build" = "xyes"; then
10733    TEST_IN_BUILD=true
10734else
10735    TEST_IN_BUILD=false
10736fi
10737
10738
10739###############################################################################
10740#
10741# Choose cacerts source file
10742#
10743
10744# Check whether --with-cacerts-file was given.
10745if test "${with_cacerts_file+set}" = set; then :
10746  withval=$with_cacerts_file;
10747fi
10748
10749if test "x$with_cacerts_file" != x; then
10750    CACERTS_FILE=$with_cacerts_file
10751else
10752    if test "x$OPENJDK" = "xtrue"; then
10753        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10754    else
10755        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10756    fi
10757fi
10758
10759
10760###############################################################################
10761#
10762# Enable or disable unlimited crypto
10763#
10764# Check whether --enable-unlimited-crypto was given.
10765if test "${enable_unlimited_crypto+set}" = set; then :
10766  enableval=$enable_unlimited_crypto;
10767else
10768  enable_unlimited_crypto=no
10769fi
10770
10771if test "x$enable_unlimited_crypto" = "xyes"; then
10772    UNLIMITED_CRYPTO=true
10773else
10774    UNLIMITED_CRYPTO=false
10775fi
10776
10777
10778###############################################################################
10779#
10780# Compress jars
10781#
10782COMPRESS_JARS=false
10783
10784
10785
10786
10787# Source the version numbers
10788. $AUTOCONF_DIR/version-numbers
10789
10790# Get the settings from parameters
10791
10792# Check whether --with-milestone was given.
10793if test "${with_milestone+set}" = set; then :
10794  withval=$with_milestone;
10795fi
10796
10797if test "x$with_milestone" = xyes; then
10798  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10799elif test "x$with_milestone" != x; then
10800    MILESTONE="$with_milestone"
10801fi
10802if test "x$MILESTONE" = x; then
10803  MILESTONE=internal
10804fi
10805
10806
10807# Check whether --with-build-number was given.
10808if test "${with_build_number+set}" = set; then :
10809  withval=$with_build_number;
10810fi
10811
10812if test "x$with_build_number" = xyes; then
10813  as_fn_error $? "Build number must have a value" "$LINENO" 5
10814elif test "x$with_build_number" != x; then
10815  JDK_BUILD_NUMBER="$with_build_number"
10816fi
10817if test "x$JDK_BUILD_NUMBER" = x; then
10818  JDK_BUILD_NUMBER=b00
10819fi
10820
10821
10822# Check whether --with-user-release-suffix was given.
10823if test "${with_user_release_suffix+set}" = set; then :
10824  withval=$with_user_release_suffix;
10825fi
10826
10827if test "x$with_user_release_suffix" = xyes; then
10828  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10829elif test "x$with_user_release_suffix" != x; then
10830  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10831else
10832  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10833  # Avoid [:alnum:] since it depends on the locale.
10834  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10835  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10836fi
10837
10838
10839# Now set the JDK version, milestone, build number etc.
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854COPYRIGHT_YEAR=`date +'%Y'`
10855
10856
10857if test "x$JDK_UPDATE_VERSION" != x; then
10858  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10859else
10860  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10861fi
10862
10863
10864COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10865
10866
10867
10868###############################################################################
10869#
10870# Setup BootJDK, used to bootstrap the build.
10871#
10872###############################################################################
10873
10874
10875BOOT_JDK_FOUND=no
10876
10877# Check whether --with-boot-jdk was given.
10878if test "${with_boot_jdk+set}" = set; then :
10879  withval=$with_boot_jdk;
10880fi
10881
10882
10883# We look for the Boot JDK through various means, going from more certain to
10884# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10885# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10886# must check if this is indeed valid; otherwise we'll continue looking.
10887
10888# Test: Is bootjdk explicitely set by command line arguments?
10889
10890  if test "x$BOOT_JDK_FOUND" = xno; then
10891    # Now execute the test
10892
10893if test "x$with_boot_jdk" != x; then
10894    BOOT_JDK=$with_boot_jdk
10895    BOOT_JDK_FOUND=maybe
10896    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10897$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10898fi
10899
10900
10901    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10902    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10903      # Do we have a bin/java?
10904      if test ! -x "$BOOT_JDK/bin/java"; then
10905        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10907        BOOT_JDK_FOUND=no
10908      else
10909        # Do we have a bin/javac?
10910        if test ! -x "$BOOT_JDK/bin/javac"; then
10911          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10913          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10914$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10915          BOOT_JDK_FOUND=no
10916        else
10917          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10918          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10919            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10921            BOOT_JDK_FOUND=no
10922          else
10923            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10924            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10925
10926            # Extra M4 quote needed to protect [] in grep expression.
10927            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10928            if test "x$FOUND_VERSION_78" = x; then
10929              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10931              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10932$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10933              BOOT_JDK_FOUND=no
10934            else
10935              # We're done! :-)
10936              BOOT_JDK_FOUND=yes
10937
10938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10939
10940  # Input might be given as Windows format, start by converting to
10941  # unix format.
10942  path="$BOOT_JDK"
10943  new_path=`$CYGPATH -u "$path"`
10944
10945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10948  # "foo.exe" is OK but "foo" is an error.
10949  #
10950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10951  # It is also a way to make sure we got the proper file name for the real test later on.
10952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10953  if test "x$test_shortpath" = x; then
10954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10956    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10957  fi
10958
10959  # Call helper function which possibly converts this using DOS-style short mode.
10960  # If so, the updated path is stored in $new_path.
10961
10962  input_path="$new_path"
10963  # Check if we need to convert this using DOS-style short mode. If the path
10964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10965  # take no chances and rewrite it.
10966  # Note: m4 eats our [], so we need to use [ and ] instead.
10967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10968  if test "x$has_forbidden_chars" != x; then
10969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10973      # Going to short mode and back again did indeed matter. Since short mode is
10974      # case insensitive, let's make it lowercase to improve readability.
10975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10976      # Now convert it back to Unix-stile (cygpath)
10977      input_path=`$CYGPATH -u "$shortmode_path"`
10978      new_path="$input_path"
10979    fi
10980  fi
10981
10982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10983  if test "x$test_cygdrive_prefix" = x; then
10984    # As a simple fix, exclude /usr/bin since it's not a real path.
10985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10987      # a path prefixed by /cygdrive for fixpath to work.
10988      new_path="$CYGWIN_ROOT_PATH$input_path"
10989    fi
10990  fi
10991
10992
10993  if test "x$path" != "x$new_path"; then
10994    BOOT_JDK="$new_path"
10995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10997  fi
10998
10999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11000
11001  path="$BOOT_JDK"
11002  has_colon=`$ECHO $path | $GREP ^.:`
11003  new_path="$path"
11004  if test "x$has_colon" = x; then
11005    # Not in mixed or Windows style, start by that.
11006    new_path=`cmd //c echo $path`
11007  fi
11008
11009
11010  input_path="$new_path"
11011  # Check if we need to convert this using DOS-style short mode. If the path
11012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11013  # take no chances and rewrite it.
11014  # Note: m4 eats our [], so we need to use [ and ] instead.
11015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11016  if test "x$has_forbidden_chars" != x; then
11017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11019  fi
11020
11021
11022  windows_path="$new_path"
11023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11024    unix_path=`$CYGPATH -u "$windows_path"`
11025    new_path="$unix_path"
11026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11028    new_path="$unix_path"
11029  fi
11030
11031  if test "x$path" != "x$new_path"; then
11032    BOOT_JDK="$new_path"
11033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11035  fi
11036
11037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11039
11040  else
11041    # We're on a posix platform. Hooray! :)
11042    path="$BOOT_JDK"
11043
11044    if test ! -f "$path" && test ! -d "$path"; then
11045      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11046    fi
11047
11048    has_space=`$ECHO "$path" | $GREP " "`
11049    if test "x$has_space" != x; then
11050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11051$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11052      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11053    fi
11054  fi
11055
11056              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11057$as_echo_n "checking for Boot JDK... " >&6; }
11058              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11059$as_echo "$BOOT_JDK" >&6; }
11060              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11061$as_echo_n "checking Boot JDK version... " >&6; }
11062              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11063              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11064$as_echo "$BOOT_JDK_VERSION" >&6; }
11065            fi # end check jdk version
11066          fi # end check rt.jar
11067        fi # end check javac
11068      fi # end check java
11069    fi # end check boot jdk found
11070  fi
11071
11072if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11073  # Having specified an argument which is incorrect will produce an instant failure;
11074  # we should not go on looking
11075  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11076fi
11077
11078# Test: Is bootjdk available from builddeps?
11079
11080  if test "x$BOOT_JDK_FOUND" = xno; then
11081    # Now execute the test
11082
11083
11084
11085    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11086        # Source the builddeps file again, to make sure it uses the latest variables!
11087        . $builddepsfile
11088        # Look for a target and build machine specific resource!
11089        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11090        if test "x$resource" = x; then
11091            # Ok, lets instead look for a target specific resource
11092            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11093        fi
11094        if test "x$resource" = x; then
11095            # Ok, lets instead look for a build specific resource
11096            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11097        fi
11098        if test "x$resource" = x; then
11099            # Ok, lets instead look for a generic resource
11100            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11101            resource=${builddep_bootjdk}
11102        fi
11103        if test "x$resource" != x; then
11104            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11105$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11106	    # If the resource in the builddeps.conf file is an existing directory,
11107	    # for example /java/linux/cups
11108	    if test -d ${resource}; then
11109	       depdir=${resource}
11110	    else
11111
11112# bootjdk is for example mymodule
11113# $resource is for example libs/general/libmymod_1_2_3.zip
11114# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11115# $with_builddeps_dir is for example /localhome/builddeps
11116# depdir is the name of the variable into which we store the depdir, eg MYMOD
11117# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11118# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11119    filename=`basename $resource`
11120    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11121    filebase=${filename%%.*}
11122    extension=${filename#*.}
11123    installdir=$with_builddeps_dir/$filebase
11124    if test ! -f $installdir/$filename.unpacked; then
11125        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11126$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11127        if test ! -d $installdir; then
11128            mkdir -p $installdir
11129        fi
11130        if test ! -d $installdir; then
11131            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11132        fi
11133        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11134        touch $tmpfile
11135        if test ! -f $tmpfile; then
11136            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11137        fi
11138
11139    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11140    # $tmpfile is the local file name for the downloaded file.
11141    VALID_TOOL=no
11142    if test "x$BDEPS_FTP" = xwget; then
11143       VALID_TOOL=yes
11144       wget -O $tmpfile $with_builddeps_server/$resource
11145    fi
11146    if test "x$BDEPS_FTP" = xlftp; then
11147       VALID_TOOL=yes
11148       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11149    fi
11150    if test "x$BDEPS_FTP" = xftp; then
11151        VALID_TOOL=yes
11152        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11153        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11154        FTPUSERPWD=${FTPSERVER%%@*}
11155        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11156            FTPUSER=${userpwd%%:*}
11157            FTPPWD=${userpwd#*@}
11158            FTPSERVER=${FTPSERVER#*@}
11159        else
11160            FTPUSER=ftp
11161            FTPPWD=ftp
11162        fi
11163        # the "pass" command does not work on some
11164        # ftp clients (read ftp.exe) but if it works,
11165        # passive mode is better!
11166        (\
11167            echo "user $FTPUSER $FTPPWD"        ;\
11168            echo "pass"                         ;\
11169            echo "bin"                          ;\
11170            echo "get $FTPPATH $tmpfile"              ;\
11171        ) | ftp -in $FTPSERVER
11172    fi
11173    if test "x$VALID_TOOL" != xyes; then
11174       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11175    fi
11176
11177        mv $tmpfile $installdir/$filename
11178        if test ! -s $installdir/$filename; then
11179            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11180        fi
11181        case "$extension" in
11182            zip)  echo "Unzipping $installdir/$filename..."
11183               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11184            ;;
11185            tar.gz) echo "Untaring $installdir/$filename..."
11186               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11187            ;;
11188            tgz) echo "Untaring $installdir/$filename..."
11189               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11190            ;;
11191            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11192            ;;
11193        esac
11194    fi
11195    if test -f $installdir/$filename.unpacked; then
11196        depdir=$installdir
11197    fi
11198
11199	    fi
11200            # Source the builddeps file again, because in the previous command, the depdir
11201            # was updated to point at the current build dependency install directory.
11202            . $builddepsfile
11203            # Now extract variables from the builddeps.conf files.
11204            theroot=${builddep_bootjdk_ROOT}
11205            thecflags=${builddep_bootjdk_CFLAGS}
11206            thelibs=${builddep_bootjdk_LIBS}
11207            if test "x$depdir" = x; then
11208                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11209            fi
11210            BOOT_JDK=$depdir
11211            if test "x$theroot" != x; then
11212               BOOT_JDK="$theroot"
11213            fi
11214            if test "x$thecflags" != x; then
11215               BOOT_JDK_CFLAGS="$thecflags"
11216            fi
11217            if test "x$thelibs" != x; then
11218               BOOT_JDK_LIBS="$thelibs"
11219            fi
11220            BOOT_JDK_FOUND=maybe
11221            else BOOT_JDK_FOUND=no
11222
11223        fi
11224        else BOOT_JDK_FOUND=no
11225
11226    fi
11227
11228
11229
11230    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11231    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11232      # Do we have a bin/java?
11233      if test ! -x "$BOOT_JDK/bin/java"; then
11234        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11236        BOOT_JDK_FOUND=no
11237      else
11238        # Do we have a bin/javac?
11239        if test ! -x "$BOOT_JDK/bin/javac"; then
11240          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11242          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11243$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11244          BOOT_JDK_FOUND=no
11245        else
11246          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11247          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11248            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11250            BOOT_JDK_FOUND=no
11251          else
11252            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11253            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11254
11255            # Extra M4 quote needed to protect [] in grep expression.
11256            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11257            if test "x$FOUND_VERSION_78" = x; then
11258              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11259$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11260              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11261$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11262              BOOT_JDK_FOUND=no
11263            else
11264              # We're done! :-)
11265              BOOT_JDK_FOUND=yes
11266
11267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11268
11269  # Input might be given as Windows format, start by converting to
11270  # unix format.
11271  path="$BOOT_JDK"
11272  new_path=`$CYGPATH -u "$path"`
11273
11274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11277  # "foo.exe" is OK but "foo" is an error.
11278  #
11279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11280  # It is also a way to make sure we got the proper file name for the real test later on.
11281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11282  if test "x$test_shortpath" = x; then
11283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11285    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11286  fi
11287
11288  # Call helper function which possibly converts this using DOS-style short mode.
11289  # If so, the updated path is stored in $new_path.
11290
11291  input_path="$new_path"
11292  # Check if we need to convert this using DOS-style short mode. If the path
11293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11294  # take no chances and rewrite it.
11295  # Note: m4 eats our [], so we need to use [ and ] instead.
11296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11297  if test "x$has_forbidden_chars" != x; then
11298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11302      # Going to short mode and back again did indeed matter. Since short mode is
11303      # case insensitive, let's make it lowercase to improve readability.
11304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11305      # Now convert it back to Unix-stile (cygpath)
11306      input_path=`$CYGPATH -u "$shortmode_path"`
11307      new_path="$input_path"
11308    fi
11309  fi
11310
11311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11312  if test "x$test_cygdrive_prefix" = x; then
11313    # As a simple fix, exclude /usr/bin since it's not a real path.
11314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11316      # a path prefixed by /cygdrive for fixpath to work.
11317      new_path="$CYGWIN_ROOT_PATH$input_path"
11318    fi
11319  fi
11320
11321
11322  if test "x$path" != "x$new_path"; then
11323    BOOT_JDK="$new_path"
11324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11326  fi
11327
11328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11329
11330  path="$BOOT_JDK"
11331  has_colon=`$ECHO $path | $GREP ^.:`
11332  new_path="$path"
11333  if test "x$has_colon" = x; then
11334    # Not in mixed or Windows style, start by that.
11335    new_path=`cmd //c echo $path`
11336  fi
11337
11338
11339  input_path="$new_path"
11340  # Check if we need to convert this using DOS-style short mode. If the path
11341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11342  # take no chances and rewrite it.
11343  # Note: m4 eats our [], so we need to use [ and ] instead.
11344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11345  if test "x$has_forbidden_chars" != x; then
11346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11348  fi
11349
11350
11351  windows_path="$new_path"
11352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11353    unix_path=`$CYGPATH -u "$windows_path"`
11354    new_path="$unix_path"
11355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11357    new_path="$unix_path"
11358  fi
11359
11360  if test "x$path" != "x$new_path"; then
11361    BOOT_JDK="$new_path"
11362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11363$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11364  fi
11365
11366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11368
11369  else
11370    # We're on a posix platform. Hooray! :)
11371    path="$BOOT_JDK"
11372
11373    if test ! -f "$path" && test ! -d "$path"; then
11374      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11375    fi
11376
11377    has_space=`$ECHO "$path" | $GREP " "`
11378    if test "x$has_space" != x; then
11379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11381      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11382    fi
11383  fi
11384
11385              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11386$as_echo_n "checking for Boot JDK... " >&6; }
11387              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11388$as_echo "$BOOT_JDK" >&6; }
11389              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11390$as_echo_n "checking Boot JDK version... " >&6; }
11391              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11392              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11393$as_echo "$BOOT_JDK_VERSION" >&6; }
11394            fi # end check jdk version
11395          fi # end check rt.jar
11396        fi # end check javac
11397      fi # end check java
11398    fi # end check boot jdk found
11399  fi
11400
11401
11402# Test: Is $JAVA_HOME set?
11403
11404  if test "x$BOOT_JDK_FOUND" = xno; then
11405    # Now execute the test
11406
11407    if test "x$JAVA_HOME" != x; then
11408        JAVA_HOME_PROCESSED="$JAVA_HOME"
11409
11410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11411
11412  # Input might be given as Windows format, start by converting to
11413  # unix format.
11414  path="$JAVA_HOME_PROCESSED"
11415  new_path=`$CYGPATH -u "$path"`
11416
11417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11420  # "foo.exe" is OK but "foo" is an error.
11421  #
11422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11423  # It is also a way to make sure we got the proper file name for the real test later on.
11424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11425  if test "x$test_shortpath" = x; then
11426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11427$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11428    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11429  fi
11430
11431  # Call helper function which possibly converts this using DOS-style short mode.
11432  # If so, the updated path is stored in $new_path.
11433
11434  input_path="$new_path"
11435  # Check if we need to convert this using DOS-style short mode. If the path
11436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11437  # take no chances and rewrite it.
11438  # Note: m4 eats our [], so we need to use [ and ] instead.
11439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11440  if test "x$has_forbidden_chars" != x; then
11441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11445      # Going to short mode and back again did indeed matter. Since short mode is
11446      # case insensitive, let's make it lowercase to improve readability.
11447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11448      # Now convert it back to Unix-stile (cygpath)
11449      input_path=`$CYGPATH -u "$shortmode_path"`
11450      new_path="$input_path"
11451    fi
11452  fi
11453
11454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11455  if test "x$test_cygdrive_prefix" = x; then
11456    # As a simple fix, exclude /usr/bin since it's not a real path.
11457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11459      # a path prefixed by /cygdrive for fixpath to work.
11460      new_path="$CYGWIN_ROOT_PATH$input_path"
11461    fi
11462  fi
11463
11464
11465  if test "x$path" != "x$new_path"; then
11466    JAVA_HOME_PROCESSED="$new_path"
11467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11468$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11469  fi
11470
11471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11472
11473  path="$JAVA_HOME_PROCESSED"
11474  has_colon=`$ECHO $path | $GREP ^.:`
11475  new_path="$path"
11476  if test "x$has_colon" = x; then
11477    # Not in mixed or Windows style, start by that.
11478    new_path=`cmd //c echo $path`
11479  fi
11480
11481
11482  input_path="$new_path"
11483  # Check if we need to convert this using DOS-style short mode. If the path
11484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11485  # take no chances and rewrite it.
11486  # Note: m4 eats our [], so we need to use [ and ] instead.
11487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11488  if test "x$has_forbidden_chars" != x; then
11489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11491  fi
11492
11493
11494  windows_path="$new_path"
11495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11496    unix_path=`$CYGPATH -u "$windows_path"`
11497    new_path="$unix_path"
11498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11500    new_path="$unix_path"
11501  fi
11502
11503  if test "x$path" != "x$new_path"; then
11504    JAVA_HOME_PROCESSED="$new_path"
11505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11506$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11507  fi
11508
11509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11511
11512  else
11513    # We're on a posix platform. Hooray! :)
11514    path="$JAVA_HOME_PROCESSED"
11515
11516    if test ! -f "$path" && test ! -d "$path"; then
11517      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11518    fi
11519
11520    has_space=`$ECHO "$path" | $GREP " "`
11521    if test "x$has_space" != x; then
11522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11523$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11524      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11525    fi
11526  fi
11527
11528        if test ! -d "$JAVA_HOME_PROCESSED"; then
11529            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11530$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11531        else
11532          # Aha, the user has set a JAVA_HOME
11533          # let us use that as the Boot JDK.
11534          BOOT_JDK="$JAVA_HOME_PROCESSED"
11535          BOOT_JDK_FOUND=maybe
11536          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11537$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11538        fi
11539    fi
11540
11541
11542    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11543    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11544      # Do we have a bin/java?
11545      if test ! -x "$BOOT_JDK/bin/java"; then
11546        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11548        BOOT_JDK_FOUND=no
11549      else
11550        # Do we have a bin/javac?
11551        if test ! -x "$BOOT_JDK/bin/javac"; then
11552          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11554          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11555$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11556          BOOT_JDK_FOUND=no
11557        else
11558          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11559          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11560            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11562            BOOT_JDK_FOUND=no
11563          else
11564            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11565            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11566
11567            # Extra M4 quote needed to protect [] in grep expression.
11568            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11569            if test "x$FOUND_VERSION_78" = x; then
11570              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11572              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11573$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11574              BOOT_JDK_FOUND=no
11575            else
11576              # We're done! :-)
11577              BOOT_JDK_FOUND=yes
11578
11579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11580
11581  # Input might be given as Windows format, start by converting to
11582  # unix format.
11583  path="$BOOT_JDK"
11584  new_path=`$CYGPATH -u "$path"`
11585
11586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11589  # "foo.exe" is OK but "foo" is an error.
11590  #
11591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11592  # It is also a way to make sure we got the proper file name for the real test later on.
11593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11594  if test "x$test_shortpath" = x; then
11595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11596$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11597    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11598  fi
11599
11600  # Call helper function which possibly converts this using DOS-style short mode.
11601  # If so, the updated path is stored in $new_path.
11602
11603  input_path="$new_path"
11604  # Check if we need to convert this using DOS-style short mode. If the path
11605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11606  # take no chances and rewrite it.
11607  # Note: m4 eats our [], so we need to use [ and ] instead.
11608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11609  if test "x$has_forbidden_chars" != x; then
11610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11614      # Going to short mode and back again did indeed matter. Since short mode is
11615      # case insensitive, let's make it lowercase to improve readability.
11616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11617      # Now convert it back to Unix-stile (cygpath)
11618      input_path=`$CYGPATH -u "$shortmode_path"`
11619      new_path="$input_path"
11620    fi
11621  fi
11622
11623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11624  if test "x$test_cygdrive_prefix" = x; then
11625    # As a simple fix, exclude /usr/bin since it's not a real path.
11626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11628      # a path prefixed by /cygdrive for fixpath to work.
11629      new_path="$CYGWIN_ROOT_PATH$input_path"
11630    fi
11631  fi
11632
11633
11634  if test "x$path" != "x$new_path"; then
11635    BOOT_JDK="$new_path"
11636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11638  fi
11639
11640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11641
11642  path="$BOOT_JDK"
11643  has_colon=`$ECHO $path | $GREP ^.:`
11644  new_path="$path"
11645  if test "x$has_colon" = x; then
11646    # Not in mixed or Windows style, start by that.
11647    new_path=`cmd //c echo $path`
11648  fi
11649
11650
11651  input_path="$new_path"
11652  # Check if we need to convert this using DOS-style short mode. If the path
11653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11654  # take no chances and rewrite it.
11655  # Note: m4 eats our [], so we need to use [ and ] instead.
11656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11657  if test "x$has_forbidden_chars" != x; then
11658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11660  fi
11661
11662
11663  windows_path="$new_path"
11664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11665    unix_path=`$CYGPATH -u "$windows_path"`
11666    new_path="$unix_path"
11667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11669    new_path="$unix_path"
11670  fi
11671
11672  if test "x$path" != "x$new_path"; then
11673    BOOT_JDK="$new_path"
11674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11676  fi
11677
11678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11680
11681  else
11682    # We're on a posix platform. Hooray! :)
11683    path="$BOOT_JDK"
11684
11685    if test ! -f "$path" && test ! -d "$path"; then
11686      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11687    fi
11688
11689    has_space=`$ECHO "$path" | $GREP " "`
11690    if test "x$has_space" != x; then
11691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11693      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11694    fi
11695  fi
11696
11697              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11698$as_echo_n "checking for Boot JDK... " >&6; }
11699              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11700$as_echo "$BOOT_JDK" >&6; }
11701              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11702$as_echo_n "checking Boot JDK version... " >&6; }
11703              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11704              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11705$as_echo "$BOOT_JDK_VERSION" >&6; }
11706            fi # end check jdk version
11707          fi # end check rt.jar
11708        fi # end check javac
11709      fi # end check java
11710    fi # end check boot jdk found
11711  fi
11712
11713
11714# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11715
11716  if test "x$BOOT_JDK_FOUND" = xno; then
11717    # Now execute the test
11718
11719    if test -x /usr/libexec/java_home; then
11720        BOOT_JDK=`/usr/libexec/java_home`
11721        BOOT_JDK_FOUND=maybe
11722        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11723$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11724    fi
11725
11726
11727    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11728    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11729      # Do we have a bin/java?
11730      if test ! -x "$BOOT_JDK/bin/java"; then
11731        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11733        BOOT_JDK_FOUND=no
11734      else
11735        # Do we have a bin/javac?
11736        if test ! -x "$BOOT_JDK/bin/javac"; then
11737          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11739          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11740$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11741          BOOT_JDK_FOUND=no
11742        else
11743          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11744          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11745            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11747            BOOT_JDK_FOUND=no
11748          else
11749            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11750            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11751
11752            # Extra M4 quote needed to protect [] in grep expression.
11753            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11754            if test "x$FOUND_VERSION_78" = x; then
11755              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11757              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11758$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11759              BOOT_JDK_FOUND=no
11760            else
11761              # We're done! :-)
11762              BOOT_JDK_FOUND=yes
11763
11764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11765
11766  # Input might be given as Windows format, start by converting to
11767  # unix format.
11768  path="$BOOT_JDK"
11769  new_path=`$CYGPATH -u "$path"`
11770
11771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11774  # "foo.exe" is OK but "foo" is an error.
11775  #
11776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11777  # It is also a way to make sure we got the proper file name for the real test later on.
11778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11779  if test "x$test_shortpath" = x; then
11780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11781$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11782    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11783  fi
11784
11785  # Call helper function which possibly converts this using DOS-style short mode.
11786  # If so, the updated path is stored in $new_path.
11787
11788  input_path="$new_path"
11789  # Check if we need to convert this using DOS-style short mode. If the path
11790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11791  # take no chances and rewrite it.
11792  # Note: m4 eats our [], so we need to use [ and ] instead.
11793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11794  if test "x$has_forbidden_chars" != x; then
11795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11799      # Going to short mode and back again did indeed matter. Since short mode is
11800      # case insensitive, let's make it lowercase to improve readability.
11801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11802      # Now convert it back to Unix-stile (cygpath)
11803      input_path=`$CYGPATH -u "$shortmode_path"`
11804      new_path="$input_path"
11805    fi
11806  fi
11807
11808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11809  if test "x$test_cygdrive_prefix" = x; then
11810    # As a simple fix, exclude /usr/bin since it's not a real path.
11811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11813      # a path prefixed by /cygdrive for fixpath to work.
11814      new_path="$CYGWIN_ROOT_PATH$input_path"
11815    fi
11816  fi
11817
11818
11819  if test "x$path" != "x$new_path"; then
11820    BOOT_JDK="$new_path"
11821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11822$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11823  fi
11824
11825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11826
11827  path="$BOOT_JDK"
11828  has_colon=`$ECHO $path | $GREP ^.:`
11829  new_path="$path"
11830  if test "x$has_colon" = x; then
11831    # Not in mixed or Windows style, start by that.
11832    new_path=`cmd //c echo $path`
11833  fi
11834
11835
11836  input_path="$new_path"
11837  # Check if we need to convert this using DOS-style short mode. If the path
11838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11839  # take no chances and rewrite it.
11840  # Note: m4 eats our [], so we need to use [ and ] instead.
11841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11842  if test "x$has_forbidden_chars" != x; then
11843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11845  fi
11846
11847
11848  windows_path="$new_path"
11849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11850    unix_path=`$CYGPATH -u "$windows_path"`
11851    new_path="$unix_path"
11852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11854    new_path="$unix_path"
11855  fi
11856
11857  if test "x$path" != "x$new_path"; then
11858    BOOT_JDK="$new_path"
11859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11861  fi
11862
11863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11865
11866  else
11867    # We're on a posix platform. Hooray! :)
11868    path="$BOOT_JDK"
11869
11870    if test ! -f "$path" && test ! -d "$path"; then
11871      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11872    fi
11873
11874    has_space=`$ECHO "$path" | $GREP " "`
11875    if test "x$has_space" != x; then
11876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11877$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11878      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11879    fi
11880  fi
11881
11882              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11883$as_echo_n "checking for Boot JDK... " >&6; }
11884              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11885$as_echo "$BOOT_JDK" >&6; }
11886              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11887$as_echo_n "checking Boot JDK version... " >&6; }
11888              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11889              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11890$as_echo "$BOOT_JDK_VERSION" >&6; }
11891            fi # end check jdk version
11892          fi # end check rt.jar
11893        fi # end check javac
11894      fi # end check java
11895    fi # end check boot jdk found
11896  fi
11897
11898
11899# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11900
11901  if test "x$BOOT_JDK_FOUND" = xno; then
11902    # Now execute the test
11903
11904    # Extract the first word of "javac", so it can be a program name with args.
11905set dummy javac; ac_word=$2
11906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11907$as_echo_n "checking for $ac_word... " >&6; }
11908if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11909  $as_echo_n "(cached) " >&6
11910else
11911  case $JAVAC_CHECK in
11912  [\\/]* | ?:[\\/]*)
11913  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11914  ;;
11915  *)
11916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11917for as_dir in $PATH
11918do
11919  IFS=$as_save_IFS
11920  test -z "$as_dir" && as_dir=.
11921    for ac_exec_ext in '' $ac_executable_extensions; do
11922  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11923    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11925    break 2
11926  fi
11927done
11928  done
11929IFS=$as_save_IFS
11930
11931  ;;
11932esac
11933fi
11934JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11935if test -n "$JAVAC_CHECK"; then
11936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11937$as_echo "$JAVAC_CHECK" >&6; }
11938else
11939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11940$as_echo "no" >&6; }
11941fi
11942
11943
11944    # Extract the first word of "java", so it can be a program name with args.
11945set dummy java; ac_word=$2
11946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11947$as_echo_n "checking for $ac_word... " >&6; }
11948if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11949  $as_echo_n "(cached) " >&6
11950else
11951  case $JAVA_CHECK in
11952  [\\/]* | ?:[\\/]*)
11953  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11954  ;;
11955  *)
11956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11957for as_dir in $PATH
11958do
11959  IFS=$as_save_IFS
11960  test -z "$as_dir" && as_dir=.
11961    for ac_exec_ext in '' $ac_executable_extensions; do
11962  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11963    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11965    break 2
11966  fi
11967done
11968  done
11969IFS=$as_save_IFS
11970
11971  ;;
11972esac
11973fi
11974JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11975if test -n "$JAVA_CHECK"; then
11976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11977$as_echo "$JAVA_CHECK" >&6; }
11978else
11979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11980$as_echo "no" >&6; }
11981fi
11982
11983
11984    BINARY="$JAVAC_CHECK"
11985    if test "x$JAVAC_CHECK" = x; then
11986        BINARY="$JAVA_CHECK"
11987    fi
11988    if test "x$BINARY" != x; then
11989        # So there is a java(c) binary, it might be part of a JDK.
11990        # Lets find the JDK/JRE directory by following symbolic links.
11991        # Linux/GNU systems often have links from /usr/bin/java to
11992        # /etc/alternatives/java to the real JDK binary.
11993
11994    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11995        # Follow a chain of symbolic links. Use readlink
11996        # where it exists, else fall back to horribly
11997        # complicated shell code.
11998        if test "x$READLINK_TESTED" != yes; then
11999            # On MacOSX there is a readlink tool with a different
12000            # purpose than the GNU readlink tool. Check the found readlink.
12001            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12002            if test "x$ISGNU" = x; then
12003                 # A readlink that we do not know how to use.
12004                 # Are there other non-GNU readlinks out there?
12005                 READLINK_TESTED=yes
12006                 READLINK=
12007            fi
12008        fi
12009
12010        if test "x$READLINK" != x; then
12011            BINARY=`$READLINK -f $BINARY`
12012        else
12013            # Save the current directory for restoring afterwards
12014            STARTDIR=$PWD
12015            COUNTER=0
12016            sym_link_dir=`$DIRNAME $BINARY`
12017            sym_link_file=`$BASENAME $BINARY`
12018            # Use the system pwd and not the shell builtin to resolve directory symlinks
12019            cd $sym_link_dir
12020            cd `$THEPWDCMD`
12021            sym_link_dir=`$THEPWDCMD`
12022            # Resolve file symlinks
12023            while test $COUNTER -lt 20; do
12024                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12025                if test "x$ISLINK" == x; then
12026                    # This is not a symbolic link! We are done!
12027                    break
12028                fi
12029                # Again resolve directory symlinks since the target of the just found
12030                # link could be in a different directory
12031                cd `$DIRNAME $ISLINK`
12032                sym_link_dir=`$THEPWDCMD`
12033                sym_link_file=`$BASENAME $ISLINK`
12034                let COUNTER=COUNTER+1
12035            done
12036            cd $STARTDIR
12037            BINARY=$sym_link_dir/$sym_link_file
12038        fi
12039    fi
12040
12041        BOOT_JDK=`dirname "$BINARY"`
12042        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12043        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12044            # Looks like we found ourselves an JDK
12045            BOOT_JDK_FOUND=maybe
12046            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12047$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12048        fi
12049    fi
12050
12051
12052    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12053    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12054      # Do we have a bin/java?
12055      if test ! -x "$BOOT_JDK/bin/java"; then
12056        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12058        BOOT_JDK_FOUND=no
12059      else
12060        # Do we have a bin/javac?
12061        if test ! -x "$BOOT_JDK/bin/javac"; then
12062          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12064          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12065$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12066          BOOT_JDK_FOUND=no
12067        else
12068          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12069          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12070            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12072            BOOT_JDK_FOUND=no
12073          else
12074            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12075            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12076
12077            # Extra M4 quote needed to protect [] in grep expression.
12078            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12079            if test "x$FOUND_VERSION_78" = x; then
12080              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12082              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12083$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12084              BOOT_JDK_FOUND=no
12085            else
12086              # We're done! :-)
12087              BOOT_JDK_FOUND=yes
12088
12089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12090
12091  # Input might be given as Windows format, start by converting to
12092  # unix format.
12093  path="$BOOT_JDK"
12094  new_path=`$CYGPATH -u "$path"`
12095
12096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12099  # "foo.exe" is OK but "foo" is an error.
12100  #
12101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12102  # It is also a way to make sure we got the proper file name for the real test later on.
12103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12104  if test "x$test_shortpath" = x; then
12105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12107    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12108  fi
12109
12110  # Call helper function which possibly converts this using DOS-style short mode.
12111  # If so, the updated path is stored in $new_path.
12112
12113  input_path="$new_path"
12114  # Check if we need to convert this using DOS-style short mode. If the path
12115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12116  # take no chances and rewrite it.
12117  # Note: m4 eats our [], so we need to use [ and ] instead.
12118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12119  if test "x$has_forbidden_chars" != x; then
12120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12124      # Going to short mode and back again did indeed matter. Since short mode is
12125      # case insensitive, let's make it lowercase to improve readability.
12126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12127      # Now convert it back to Unix-stile (cygpath)
12128      input_path=`$CYGPATH -u "$shortmode_path"`
12129      new_path="$input_path"
12130    fi
12131  fi
12132
12133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12134  if test "x$test_cygdrive_prefix" = x; then
12135    # As a simple fix, exclude /usr/bin since it's not a real path.
12136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12138      # a path prefixed by /cygdrive for fixpath to work.
12139      new_path="$CYGWIN_ROOT_PATH$input_path"
12140    fi
12141  fi
12142
12143
12144  if test "x$path" != "x$new_path"; then
12145    BOOT_JDK="$new_path"
12146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12148  fi
12149
12150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12151
12152  path="$BOOT_JDK"
12153  has_colon=`$ECHO $path | $GREP ^.:`
12154  new_path="$path"
12155  if test "x$has_colon" = x; then
12156    # Not in mixed or Windows style, start by that.
12157    new_path=`cmd //c echo $path`
12158  fi
12159
12160
12161  input_path="$new_path"
12162  # Check if we need to convert this using DOS-style short mode. If the path
12163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12164  # take no chances and rewrite it.
12165  # Note: m4 eats our [], so we need to use [ and ] instead.
12166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12167  if test "x$has_forbidden_chars" != x; then
12168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12170  fi
12171
12172
12173  windows_path="$new_path"
12174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12175    unix_path=`$CYGPATH -u "$windows_path"`
12176    new_path="$unix_path"
12177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12179    new_path="$unix_path"
12180  fi
12181
12182  if test "x$path" != "x$new_path"; then
12183    BOOT_JDK="$new_path"
12184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12186  fi
12187
12188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12190
12191  else
12192    # We're on a posix platform. Hooray! :)
12193    path="$BOOT_JDK"
12194
12195    if test ! -f "$path" && test ! -d "$path"; then
12196      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12197    fi
12198
12199    has_space=`$ECHO "$path" | $GREP " "`
12200    if test "x$has_space" != x; then
12201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12203      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12204    fi
12205  fi
12206
12207              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12208$as_echo_n "checking for Boot JDK... " >&6; }
12209              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12210$as_echo "$BOOT_JDK" >&6; }
12211              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12212$as_echo_n "checking Boot JDK version... " >&6; }
12213              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12214              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12215$as_echo "$BOOT_JDK_VERSION" >&6; }
12216            fi # end check jdk version
12217          fi # end check rt.jar
12218        fi # end check javac
12219      fi # end check java
12220    fi # end check boot jdk found
12221  fi
12222
12223
12224# Test: Is there a JDK installed in default, well-known locations?
12225
12226  if test "x$BOOT_JDK_FOUND" = xno; then
12227    # Now execute the test
12228
12229  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12230
12231  if test "x$BOOT_JDK_FOUND" = xno; then
12232    # Now execute the test
12233
12234  if test "x$ProgramW6432" != x; then
12235    VIRTUAL_DIR="$ProgramW6432/Java"
12236
12237  windows_path="$VIRTUAL_DIR"
12238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12239    unix_path=`$CYGPATH -u "$windows_path"`
12240    VIRTUAL_DIR="$unix_path"
12241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12243    VIRTUAL_DIR="$unix_path"
12244  fi
12245
12246
12247  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12248  BOOT_JDK_SUFFIX=""
12249  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12250  if test "x$ALL_JDKS_FOUND" != x; then
12251    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12252
12253  if test "x$BOOT_JDK_FOUND" = xno; then
12254    # Now execute the test
12255
12256        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12257        if test -d "$BOOT_JDK"; then
12258          BOOT_JDK_FOUND=maybe
12259          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12260$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12261        fi
12262
12263
12264    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12265    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12266      # Do we have a bin/java?
12267      if test ! -x "$BOOT_JDK/bin/java"; then
12268        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12270        BOOT_JDK_FOUND=no
12271      else
12272        # Do we have a bin/javac?
12273        if test ! -x "$BOOT_JDK/bin/javac"; then
12274          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12276          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12277$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12278          BOOT_JDK_FOUND=no
12279        else
12280          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12281          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12282            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12284            BOOT_JDK_FOUND=no
12285          else
12286            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12287            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12288
12289            # Extra M4 quote needed to protect [] in grep expression.
12290            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12291            if test "x$FOUND_VERSION_78" = x; then
12292              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12294              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12295$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12296              BOOT_JDK_FOUND=no
12297            else
12298              # We're done! :-)
12299              BOOT_JDK_FOUND=yes
12300
12301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12302
12303  # Input might be given as Windows format, start by converting to
12304  # unix format.
12305  path="$BOOT_JDK"
12306  new_path=`$CYGPATH -u "$path"`
12307
12308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12311  # "foo.exe" is OK but "foo" is an error.
12312  #
12313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12314  # It is also a way to make sure we got the proper file name for the real test later on.
12315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12316  if test "x$test_shortpath" = x; then
12317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12319    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12320  fi
12321
12322  # Call helper function which possibly converts this using DOS-style short mode.
12323  # If so, the updated path is stored in $new_path.
12324
12325  input_path="$new_path"
12326  # Check if we need to convert this using DOS-style short mode. If the path
12327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12328  # take no chances and rewrite it.
12329  # Note: m4 eats our [], so we need to use [ and ] instead.
12330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12331  if test "x$has_forbidden_chars" != x; then
12332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12336      # Going to short mode and back again did indeed matter. Since short mode is
12337      # case insensitive, let's make it lowercase to improve readability.
12338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12339      # Now convert it back to Unix-stile (cygpath)
12340      input_path=`$CYGPATH -u "$shortmode_path"`
12341      new_path="$input_path"
12342    fi
12343  fi
12344
12345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12346  if test "x$test_cygdrive_prefix" = x; then
12347    # As a simple fix, exclude /usr/bin since it's not a real path.
12348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12350      # a path prefixed by /cygdrive for fixpath to work.
12351      new_path="$CYGWIN_ROOT_PATH$input_path"
12352    fi
12353  fi
12354
12355
12356  if test "x$path" != "x$new_path"; then
12357    BOOT_JDK="$new_path"
12358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12360  fi
12361
12362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12363
12364  path="$BOOT_JDK"
12365  has_colon=`$ECHO $path | $GREP ^.:`
12366  new_path="$path"
12367  if test "x$has_colon" = x; then
12368    # Not in mixed or Windows style, start by that.
12369    new_path=`cmd //c echo $path`
12370  fi
12371
12372
12373  input_path="$new_path"
12374  # Check if we need to convert this using DOS-style short mode. If the path
12375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12376  # take no chances and rewrite it.
12377  # Note: m4 eats our [], so we need to use [ and ] instead.
12378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12379  if test "x$has_forbidden_chars" != x; then
12380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12382  fi
12383
12384
12385  windows_path="$new_path"
12386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12387    unix_path=`$CYGPATH -u "$windows_path"`
12388    new_path="$unix_path"
12389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12391    new_path="$unix_path"
12392  fi
12393
12394  if test "x$path" != "x$new_path"; then
12395    BOOT_JDK="$new_path"
12396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12398  fi
12399
12400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12402
12403  else
12404    # We're on a posix platform. Hooray! :)
12405    path="$BOOT_JDK"
12406
12407    if test ! -f "$path" && test ! -d "$path"; then
12408      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12409    fi
12410
12411    has_space=`$ECHO "$path" | $GREP " "`
12412    if test "x$has_space" != x; then
12413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12415      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12416    fi
12417  fi
12418
12419              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12420$as_echo_n "checking for Boot JDK... " >&6; }
12421              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12422$as_echo "$BOOT_JDK" >&6; }
12423              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12424$as_echo_n "checking Boot JDK version... " >&6; }
12425              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12426              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12427$as_echo "$BOOT_JDK_VERSION" >&6; }
12428            fi # end check jdk version
12429          fi # end check rt.jar
12430        fi # end check javac
12431      fi # end check java
12432    fi # end check boot jdk found
12433  fi
12434
12435    done
12436  fi
12437
12438  fi
12439
12440
12441    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12442    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12443      # Do we have a bin/java?
12444      if test ! -x "$BOOT_JDK/bin/java"; then
12445        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12447        BOOT_JDK_FOUND=no
12448      else
12449        # Do we have a bin/javac?
12450        if test ! -x "$BOOT_JDK/bin/javac"; then
12451          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12453          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12454$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12455          BOOT_JDK_FOUND=no
12456        else
12457          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12458          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12459            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12461            BOOT_JDK_FOUND=no
12462          else
12463            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12464            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12465
12466            # Extra M4 quote needed to protect [] in grep expression.
12467            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12468            if test "x$FOUND_VERSION_78" = x; then
12469              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12471              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12472$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12473              BOOT_JDK_FOUND=no
12474            else
12475              # We're done! :-)
12476              BOOT_JDK_FOUND=yes
12477
12478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12479
12480  # Input might be given as Windows format, start by converting to
12481  # unix format.
12482  path="$BOOT_JDK"
12483  new_path=`$CYGPATH -u "$path"`
12484
12485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12488  # "foo.exe" is OK but "foo" is an error.
12489  #
12490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12491  # It is also a way to make sure we got the proper file name for the real test later on.
12492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12493  if test "x$test_shortpath" = x; then
12494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12495$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12496    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12497  fi
12498
12499  # Call helper function which possibly converts this using DOS-style short mode.
12500  # If so, the updated path is stored in $new_path.
12501
12502  input_path="$new_path"
12503  # Check if we need to convert this using DOS-style short mode. If the path
12504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12505  # take no chances and rewrite it.
12506  # Note: m4 eats our [], so we need to use [ and ] instead.
12507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12508  if test "x$has_forbidden_chars" != x; then
12509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12513      # Going to short mode and back again did indeed matter. Since short mode is
12514      # case insensitive, let's make it lowercase to improve readability.
12515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12516      # Now convert it back to Unix-stile (cygpath)
12517      input_path=`$CYGPATH -u "$shortmode_path"`
12518      new_path="$input_path"
12519    fi
12520  fi
12521
12522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12523  if test "x$test_cygdrive_prefix" = x; then
12524    # As a simple fix, exclude /usr/bin since it's not a real path.
12525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12527      # a path prefixed by /cygdrive for fixpath to work.
12528      new_path="$CYGWIN_ROOT_PATH$input_path"
12529    fi
12530  fi
12531
12532
12533  if test "x$path" != "x$new_path"; then
12534    BOOT_JDK="$new_path"
12535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12537  fi
12538
12539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12540
12541  path="$BOOT_JDK"
12542  has_colon=`$ECHO $path | $GREP ^.:`
12543  new_path="$path"
12544  if test "x$has_colon" = x; then
12545    # Not in mixed or Windows style, start by that.
12546    new_path=`cmd //c echo $path`
12547  fi
12548
12549
12550  input_path="$new_path"
12551  # Check if we need to convert this using DOS-style short mode. If the path
12552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12553  # take no chances and rewrite it.
12554  # Note: m4 eats our [], so we need to use [ and ] instead.
12555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12556  if test "x$has_forbidden_chars" != x; then
12557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12559  fi
12560
12561
12562  windows_path="$new_path"
12563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12564    unix_path=`$CYGPATH -u "$windows_path"`
12565    new_path="$unix_path"
12566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12568    new_path="$unix_path"
12569  fi
12570
12571  if test "x$path" != "x$new_path"; then
12572    BOOT_JDK="$new_path"
12573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12575  fi
12576
12577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12579
12580  else
12581    # We're on a posix platform. Hooray! :)
12582    path="$BOOT_JDK"
12583
12584    if test ! -f "$path" && test ! -d "$path"; then
12585      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12586    fi
12587
12588    has_space=`$ECHO "$path" | $GREP " "`
12589    if test "x$has_space" != x; then
12590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12592      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12593    fi
12594  fi
12595
12596              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12597$as_echo_n "checking for Boot JDK... " >&6; }
12598              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12599$as_echo "$BOOT_JDK" >&6; }
12600              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12601$as_echo_n "checking Boot JDK version... " >&6; }
12602              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12603              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12604$as_echo "$BOOT_JDK_VERSION" >&6; }
12605            fi # end check jdk version
12606          fi # end check rt.jar
12607        fi # end check javac
12608      fi # end check java
12609    fi # end check boot jdk found
12610  fi
12611
12612
12613  if test "x$BOOT_JDK_FOUND" = xno; then
12614    # Now execute the test
12615
12616  if test "x$PROGRAMW6432" != x; then
12617    VIRTUAL_DIR="$PROGRAMW6432/Java"
12618
12619  windows_path="$VIRTUAL_DIR"
12620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12621    unix_path=`$CYGPATH -u "$windows_path"`
12622    VIRTUAL_DIR="$unix_path"
12623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12625    VIRTUAL_DIR="$unix_path"
12626  fi
12627
12628
12629  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12630  BOOT_JDK_SUFFIX=""
12631  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12632  if test "x$ALL_JDKS_FOUND" != x; then
12633    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12634
12635  if test "x$BOOT_JDK_FOUND" = xno; then
12636    # Now execute the test
12637
12638        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12639        if test -d "$BOOT_JDK"; then
12640          BOOT_JDK_FOUND=maybe
12641          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12642$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12643        fi
12644
12645
12646    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12647    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12648      # Do we have a bin/java?
12649      if test ! -x "$BOOT_JDK/bin/java"; then
12650        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12652        BOOT_JDK_FOUND=no
12653      else
12654        # Do we have a bin/javac?
12655        if test ! -x "$BOOT_JDK/bin/javac"; then
12656          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12657$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12658          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12659$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12660          BOOT_JDK_FOUND=no
12661        else
12662          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12663          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12664            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12666            BOOT_JDK_FOUND=no
12667          else
12668            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12669            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12670
12671            # Extra M4 quote needed to protect [] in grep expression.
12672            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12673            if test "x$FOUND_VERSION_78" = x; then
12674              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12676              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12677$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12678              BOOT_JDK_FOUND=no
12679            else
12680              # We're done! :-)
12681              BOOT_JDK_FOUND=yes
12682
12683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12684
12685  # Input might be given as Windows format, start by converting to
12686  # unix format.
12687  path="$BOOT_JDK"
12688  new_path=`$CYGPATH -u "$path"`
12689
12690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12693  # "foo.exe" is OK but "foo" is an error.
12694  #
12695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12696  # It is also a way to make sure we got the proper file name for the real test later on.
12697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12698  if test "x$test_shortpath" = x; then
12699    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12701    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12702  fi
12703
12704  # Call helper function which possibly converts this using DOS-style short mode.
12705  # If so, the updated path is stored in $new_path.
12706
12707  input_path="$new_path"
12708  # Check if we need to convert this using DOS-style short mode. If the path
12709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12710  # take no chances and rewrite it.
12711  # Note: m4 eats our [], so we need to use [ and ] instead.
12712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12713  if test "x$has_forbidden_chars" != x; then
12714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12718      # Going to short mode and back again did indeed matter. Since short mode is
12719      # case insensitive, let's make it lowercase to improve readability.
12720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12721      # Now convert it back to Unix-stile (cygpath)
12722      input_path=`$CYGPATH -u "$shortmode_path"`
12723      new_path="$input_path"
12724    fi
12725  fi
12726
12727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12728  if test "x$test_cygdrive_prefix" = x; then
12729    # As a simple fix, exclude /usr/bin since it's not a real path.
12730    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12732      # a path prefixed by /cygdrive for fixpath to work.
12733      new_path="$CYGWIN_ROOT_PATH$input_path"
12734    fi
12735  fi
12736
12737
12738  if test "x$path" != "x$new_path"; then
12739    BOOT_JDK="$new_path"
12740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12741$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12742  fi
12743
12744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12745
12746  path="$BOOT_JDK"
12747  has_colon=`$ECHO $path | $GREP ^.:`
12748  new_path="$path"
12749  if test "x$has_colon" = x; then
12750    # Not in mixed or Windows style, start by that.
12751    new_path=`cmd //c echo $path`
12752  fi
12753
12754
12755  input_path="$new_path"
12756  # Check if we need to convert this using DOS-style short mode. If the path
12757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12758  # take no chances and rewrite it.
12759  # Note: m4 eats our [], so we need to use [ and ] instead.
12760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12761  if test "x$has_forbidden_chars" != x; then
12762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12764  fi
12765
12766
12767  windows_path="$new_path"
12768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12769    unix_path=`$CYGPATH -u "$windows_path"`
12770    new_path="$unix_path"
12771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12773    new_path="$unix_path"
12774  fi
12775
12776  if test "x$path" != "x$new_path"; then
12777    BOOT_JDK="$new_path"
12778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12780  fi
12781
12782  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12783  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12784
12785  else
12786    # We're on a posix platform. Hooray! :)
12787    path="$BOOT_JDK"
12788
12789    if test ! -f "$path" && test ! -d "$path"; then
12790      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12791    fi
12792
12793    has_space=`$ECHO "$path" | $GREP " "`
12794    if test "x$has_space" != x; then
12795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12797      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12798    fi
12799  fi
12800
12801              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12802$as_echo_n "checking for Boot JDK... " >&6; }
12803              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12804$as_echo "$BOOT_JDK" >&6; }
12805              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12806$as_echo_n "checking Boot JDK version... " >&6; }
12807              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12808              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12809$as_echo "$BOOT_JDK_VERSION" >&6; }
12810            fi # end check jdk version
12811          fi # end check rt.jar
12812        fi # end check javac
12813      fi # end check java
12814    fi # end check boot jdk found
12815  fi
12816
12817    done
12818  fi
12819
12820  fi
12821
12822
12823    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12824    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12825      # Do we have a bin/java?
12826      if test ! -x "$BOOT_JDK/bin/java"; then
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12829        BOOT_JDK_FOUND=no
12830      else
12831        # Do we have a bin/javac?
12832        if test ! -x "$BOOT_JDK/bin/javac"; then
12833          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12835          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12836$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12837          BOOT_JDK_FOUND=no
12838        else
12839          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12840          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12841            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12843            BOOT_JDK_FOUND=no
12844          else
12845            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12846            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12847
12848            # Extra M4 quote needed to protect [] in grep expression.
12849            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12850            if test "x$FOUND_VERSION_78" = x; then
12851              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12853              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12854$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12855              BOOT_JDK_FOUND=no
12856            else
12857              # We're done! :-)
12858              BOOT_JDK_FOUND=yes
12859
12860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12861
12862  # Input might be given as Windows format, start by converting to
12863  # unix format.
12864  path="$BOOT_JDK"
12865  new_path=`$CYGPATH -u "$path"`
12866
12867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12870  # "foo.exe" is OK but "foo" is an error.
12871  #
12872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12873  # It is also a way to make sure we got the proper file name for the real test later on.
12874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12875  if test "x$test_shortpath" = x; then
12876    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12877$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12878    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12879  fi
12880
12881  # Call helper function which possibly converts this using DOS-style short mode.
12882  # If so, the updated path is stored in $new_path.
12883
12884  input_path="$new_path"
12885  # Check if we need to convert this using DOS-style short mode. If the path
12886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12887  # take no chances and rewrite it.
12888  # Note: m4 eats our [], so we need to use [ and ] instead.
12889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12890  if test "x$has_forbidden_chars" != x; then
12891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12895      # Going to short mode and back again did indeed matter. Since short mode is
12896      # case insensitive, let's make it lowercase to improve readability.
12897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12898      # Now convert it back to Unix-stile (cygpath)
12899      input_path=`$CYGPATH -u "$shortmode_path"`
12900      new_path="$input_path"
12901    fi
12902  fi
12903
12904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12905  if test "x$test_cygdrive_prefix" = x; then
12906    # As a simple fix, exclude /usr/bin since it's not a real path.
12907    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12909      # a path prefixed by /cygdrive for fixpath to work.
12910      new_path="$CYGWIN_ROOT_PATH$input_path"
12911    fi
12912  fi
12913
12914
12915  if test "x$path" != "x$new_path"; then
12916    BOOT_JDK="$new_path"
12917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12919  fi
12920
12921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12922
12923  path="$BOOT_JDK"
12924  has_colon=`$ECHO $path | $GREP ^.:`
12925  new_path="$path"
12926  if test "x$has_colon" = x; then
12927    # Not in mixed or Windows style, start by that.
12928    new_path=`cmd //c echo $path`
12929  fi
12930
12931
12932  input_path="$new_path"
12933  # Check if we need to convert this using DOS-style short mode. If the path
12934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12935  # take no chances and rewrite it.
12936  # Note: m4 eats our [], so we need to use [ and ] instead.
12937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12938  if test "x$has_forbidden_chars" != x; then
12939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12941  fi
12942
12943
12944  windows_path="$new_path"
12945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12946    unix_path=`$CYGPATH -u "$windows_path"`
12947    new_path="$unix_path"
12948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12950    new_path="$unix_path"
12951  fi
12952
12953  if test "x$path" != "x$new_path"; then
12954    BOOT_JDK="$new_path"
12955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12957  fi
12958
12959  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12960  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12961
12962  else
12963    # We're on a posix platform. Hooray! :)
12964    path="$BOOT_JDK"
12965
12966    if test ! -f "$path" && test ! -d "$path"; then
12967      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12968    fi
12969
12970    has_space=`$ECHO "$path" | $GREP " "`
12971    if test "x$has_space" != x; then
12972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12973$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12974      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12975    fi
12976  fi
12977
12978              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12979$as_echo_n "checking for Boot JDK... " >&6; }
12980              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12981$as_echo "$BOOT_JDK" >&6; }
12982              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12983$as_echo_n "checking Boot JDK version... " >&6; }
12984              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12985              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12986$as_echo "$BOOT_JDK_VERSION" >&6; }
12987            fi # end check jdk version
12988          fi # end check rt.jar
12989        fi # end check javac
12990      fi # end check java
12991    fi # end check boot jdk found
12992  fi
12993
12994
12995  if test "x$BOOT_JDK_FOUND" = xno; then
12996    # Now execute the test
12997
12998  if test "x$PROGRAMFILES" != x; then
12999    VIRTUAL_DIR="$PROGRAMFILES/Java"
13000
13001  windows_path="$VIRTUAL_DIR"
13002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13003    unix_path=`$CYGPATH -u "$windows_path"`
13004    VIRTUAL_DIR="$unix_path"
13005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13007    VIRTUAL_DIR="$unix_path"
13008  fi
13009
13010
13011  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13012  BOOT_JDK_SUFFIX=""
13013  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13014  if test "x$ALL_JDKS_FOUND" != x; then
13015    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13016
13017  if test "x$BOOT_JDK_FOUND" = xno; then
13018    # Now execute the test
13019
13020        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13021        if test -d "$BOOT_JDK"; then
13022          BOOT_JDK_FOUND=maybe
13023          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13024$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13025        fi
13026
13027
13028    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13029    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13030      # Do we have a bin/java?
13031      if test ! -x "$BOOT_JDK/bin/java"; then
13032        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13034        BOOT_JDK_FOUND=no
13035      else
13036        # Do we have a bin/javac?
13037        if test ! -x "$BOOT_JDK/bin/javac"; then
13038          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13040          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13041$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13042          BOOT_JDK_FOUND=no
13043        else
13044          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13045          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13046            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13048            BOOT_JDK_FOUND=no
13049          else
13050            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13051            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13052
13053            # Extra M4 quote needed to protect [] in grep expression.
13054            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13055            if test "x$FOUND_VERSION_78" = x; then
13056              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13058              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13059$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13060              BOOT_JDK_FOUND=no
13061            else
13062              # We're done! :-)
13063              BOOT_JDK_FOUND=yes
13064
13065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13066
13067  # Input might be given as Windows format, start by converting to
13068  # unix format.
13069  path="$BOOT_JDK"
13070  new_path=`$CYGPATH -u "$path"`
13071
13072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13075  # "foo.exe" is OK but "foo" is an error.
13076  #
13077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13078  # It is also a way to make sure we got the proper file name for the real test later on.
13079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13080  if test "x$test_shortpath" = x; then
13081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13083    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13084  fi
13085
13086  # Call helper function which possibly converts this using DOS-style short mode.
13087  # If so, the updated path is stored in $new_path.
13088
13089  input_path="$new_path"
13090  # Check if we need to convert this using DOS-style short mode. If the path
13091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13092  # take no chances and rewrite it.
13093  # Note: m4 eats our [], so we need to use [ and ] instead.
13094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13095  if test "x$has_forbidden_chars" != x; then
13096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13100      # Going to short mode and back again did indeed matter. Since short mode is
13101      # case insensitive, let's make it lowercase to improve readability.
13102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13103      # Now convert it back to Unix-stile (cygpath)
13104      input_path=`$CYGPATH -u "$shortmode_path"`
13105      new_path="$input_path"
13106    fi
13107  fi
13108
13109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13110  if test "x$test_cygdrive_prefix" = x; then
13111    # As a simple fix, exclude /usr/bin since it's not a real path.
13112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13114      # a path prefixed by /cygdrive for fixpath to work.
13115      new_path="$CYGWIN_ROOT_PATH$input_path"
13116    fi
13117  fi
13118
13119
13120  if test "x$path" != "x$new_path"; then
13121    BOOT_JDK="$new_path"
13122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13124  fi
13125
13126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13127
13128  path="$BOOT_JDK"
13129  has_colon=`$ECHO $path | $GREP ^.:`
13130  new_path="$path"
13131  if test "x$has_colon" = x; then
13132    # Not in mixed or Windows style, start by that.
13133    new_path=`cmd //c echo $path`
13134  fi
13135
13136
13137  input_path="$new_path"
13138  # Check if we need to convert this using DOS-style short mode. If the path
13139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13140  # take no chances and rewrite it.
13141  # Note: m4 eats our [], so we need to use [ and ] instead.
13142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13143  if test "x$has_forbidden_chars" != x; then
13144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13146  fi
13147
13148
13149  windows_path="$new_path"
13150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13151    unix_path=`$CYGPATH -u "$windows_path"`
13152    new_path="$unix_path"
13153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13155    new_path="$unix_path"
13156  fi
13157
13158  if test "x$path" != "x$new_path"; then
13159    BOOT_JDK="$new_path"
13160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13162  fi
13163
13164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13166
13167  else
13168    # We're on a posix platform. Hooray! :)
13169    path="$BOOT_JDK"
13170
13171    if test ! -f "$path" && test ! -d "$path"; then
13172      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13173    fi
13174
13175    has_space=`$ECHO "$path" | $GREP " "`
13176    if test "x$has_space" != x; then
13177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13179      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13180    fi
13181  fi
13182
13183              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13184$as_echo_n "checking for Boot JDK... " >&6; }
13185              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13186$as_echo "$BOOT_JDK" >&6; }
13187              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13188$as_echo_n "checking Boot JDK version... " >&6; }
13189              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13190              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13191$as_echo "$BOOT_JDK_VERSION" >&6; }
13192            fi # end check jdk version
13193          fi # end check rt.jar
13194        fi # end check javac
13195      fi # end check java
13196    fi # end check boot jdk found
13197  fi
13198
13199    done
13200  fi
13201
13202  fi
13203
13204
13205    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13206    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13207      # Do we have a bin/java?
13208      if test ! -x "$BOOT_JDK/bin/java"; then
13209        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13211        BOOT_JDK_FOUND=no
13212      else
13213        # Do we have a bin/javac?
13214        if test ! -x "$BOOT_JDK/bin/javac"; then
13215          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13217          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13218$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13219          BOOT_JDK_FOUND=no
13220        else
13221          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13222          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13223            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13225            BOOT_JDK_FOUND=no
13226          else
13227            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13228            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13229
13230            # Extra M4 quote needed to protect [] in grep expression.
13231            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13232            if test "x$FOUND_VERSION_78" = x; then
13233              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13235              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13236$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13237              BOOT_JDK_FOUND=no
13238            else
13239              # We're done! :-)
13240              BOOT_JDK_FOUND=yes
13241
13242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13243
13244  # Input might be given as Windows format, start by converting to
13245  # unix format.
13246  path="$BOOT_JDK"
13247  new_path=`$CYGPATH -u "$path"`
13248
13249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13252  # "foo.exe" is OK but "foo" is an error.
13253  #
13254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13255  # It is also a way to make sure we got the proper file name for the real test later on.
13256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13257  if test "x$test_shortpath" = x; then
13258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13259$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13260    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13261  fi
13262
13263  # Call helper function which possibly converts this using DOS-style short mode.
13264  # If so, the updated path is stored in $new_path.
13265
13266  input_path="$new_path"
13267  # Check if we need to convert this using DOS-style short mode. If the path
13268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13269  # take no chances and rewrite it.
13270  # Note: m4 eats our [], so we need to use [ and ] instead.
13271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13272  if test "x$has_forbidden_chars" != x; then
13273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13277      # Going to short mode and back again did indeed matter. Since short mode is
13278      # case insensitive, let's make it lowercase to improve readability.
13279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13280      # Now convert it back to Unix-stile (cygpath)
13281      input_path=`$CYGPATH -u "$shortmode_path"`
13282      new_path="$input_path"
13283    fi
13284  fi
13285
13286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13287  if test "x$test_cygdrive_prefix" = x; then
13288    # As a simple fix, exclude /usr/bin since it's not a real path.
13289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13291      # a path prefixed by /cygdrive for fixpath to work.
13292      new_path="$CYGWIN_ROOT_PATH$input_path"
13293    fi
13294  fi
13295
13296
13297  if test "x$path" != "x$new_path"; then
13298    BOOT_JDK="$new_path"
13299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13300$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13301  fi
13302
13303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13304
13305  path="$BOOT_JDK"
13306  has_colon=`$ECHO $path | $GREP ^.:`
13307  new_path="$path"
13308  if test "x$has_colon" = x; then
13309    # Not in mixed or Windows style, start by that.
13310    new_path=`cmd //c echo $path`
13311  fi
13312
13313
13314  input_path="$new_path"
13315  # Check if we need to convert this using DOS-style short mode. If the path
13316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13317  # take no chances and rewrite it.
13318  # Note: m4 eats our [], so we need to use [ and ] instead.
13319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13320  if test "x$has_forbidden_chars" != x; then
13321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13323  fi
13324
13325
13326  windows_path="$new_path"
13327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13328    unix_path=`$CYGPATH -u "$windows_path"`
13329    new_path="$unix_path"
13330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13332    new_path="$unix_path"
13333  fi
13334
13335  if test "x$path" != "x$new_path"; then
13336    BOOT_JDK="$new_path"
13337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13339  fi
13340
13341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13343
13344  else
13345    # We're on a posix platform. Hooray! :)
13346    path="$BOOT_JDK"
13347
13348    if test ! -f "$path" && test ! -d "$path"; then
13349      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13350    fi
13351
13352    has_space=`$ECHO "$path" | $GREP " "`
13353    if test "x$has_space" != x; then
13354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13356      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13357    fi
13358  fi
13359
13360              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13361$as_echo_n "checking for Boot JDK... " >&6; }
13362              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13363$as_echo "$BOOT_JDK" >&6; }
13364              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13365$as_echo_n "checking Boot JDK version... " >&6; }
13366              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13368$as_echo "$BOOT_JDK_VERSION" >&6; }
13369            fi # end check jdk version
13370          fi # end check rt.jar
13371        fi # end check javac
13372      fi # end check java
13373    fi # end check boot jdk found
13374  fi
13375
13376
13377  if test "x$BOOT_JDK_FOUND" = xno; then
13378    # Now execute the test
13379
13380  if test "x$ProgramFiles" != x; then
13381    VIRTUAL_DIR="$ProgramFiles/Java"
13382
13383  windows_path="$VIRTUAL_DIR"
13384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13385    unix_path=`$CYGPATH -u "$windows_path"`
13386    VIRTUAL_DIR="$unix_path"
13387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13389    VIRTUAL_DIR="$unix_path"
13390  fi
13391
13392
13393  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13394  BOOT_JDK_SUFFIX=""
13395  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13396  if test "x$ALL_JDKS_FOUND" != x; then
13397    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13398
13399  if test "x$BOOT_JDK_FOUND" = xno; then
13400    # Now execute the test
13401
13402        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13403        if test -d "$BOOT_JDK"; then
13404          BOOT_JDK_FOUND=maybe
13405          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13406$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13407        fi
13408
13409
13410    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13411    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13412      # Do we have a bin/java?
13413      if test ! -x "$BOOT_JDK/bin/java"; then
13414        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13416        BOOT_JDK_FOUND=no
13417      else
13418        # Do we have a bin/javac?
13419        if test ! -x "$BOOT_JDK/bin/javac"; then
13420          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13422          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13423$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13424          BOOT_JDK_FOUND=no
13425        else
13426          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13427          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13428            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13430            BOOT_JDK_FOUND=no
13431          else
13432            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13433            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13434
13435            # Extra M4 quote needed to protect [] in grep expression.
13436            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13437            if test "x$FOUND_VERSION_78" = x; then
13438              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13440              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13441$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13442              BOOT_JDK_FOUND=no
13443            else
13444              # We're done! :-)
13445              BOOT_JDK_FOUND=yes
13446
13447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13448
13449  # Input might be given as Windows format, start by converting to
13450  # unix format.
13451  path="$BOOT_JDK"
13452  new_path=`$CYGPATH -u "$path"`
13453
13454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13457  # "foo.exe" is OK but "foo" is an error.
13458  #
13459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13460  # It is also a way to make sure we got the proper file name for the real test later on.
13461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13462  if test "x$test_shortpath" = x; then
13463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13464$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13465    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13466  fi
13467
13468  # Call helper function which possibly converts this using DOS-style short mode.
13469  # If so, the updated path is stored in $new_path.
13470
13471  input_path="$new_path"
13472  # Check if we need to convert this using DOS-style short mode. If the path
13473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13474  # take no chances and rewrite it.
13475  # Note: m4 eats our [], so we need to use [ and ] instead.
13476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13477  if test "x$has_forbidden_chars" != x; then
13478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13482      # Going to short mode and back again did indeed matter. Since short mode is
13483      # case insensitive, let's make it lowercase to improve readability.
13484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13485      # Now convert it back to Unix-stile (cygpath)
13486      input_path=`$CYGPATH -u "$shortmode_path"`
13487      new_path="$input_path"
13488    fi
13489  fi
13490
13491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13492  if test "x$test_cygdrive_prefix" = x; then
13493    # As a simple fix, exclude /usr/bin since it's not a real path.
13494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13496      # a path prefixed by /cygdrive for fixpath to work.
13497      new_path="$CYGWIN_ROOT_PATH$input_path"
13498    fi
13499  fi
13500
13501
13502  if test "x$path" != "x$new_path"; then
13503    BOOT_JDK="$new_path"
13504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13506  fi
13507
13508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13509
13510  path="$BOOT_JDK"
13511  has_colon=`$ECHO $path | $GREP ^.:`
13512  new_path="$path"
13513  if test "x$has_colon" = x; then
13514    # Not in mixed or Windows style, start by that.
13515    new_path=`cmd //c echo $path`
13516  fi
13517
13518
13519  input_path="$new_path"
13520  # Check if we need to convert this using DOS-style short mode. If the path
13521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13522  # take no chances and rewrite it.
13523  # Note: m4 eats our [], so we need to use [ and ] instead.
13524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13525  if test "x$has_forbidden_chars" != x; then
13526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13528  fi
13529
13530
13531  windows_path="$new_path"
13532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13533    unix_path=`$CYGPATH -u "$windows_path"`
13534    new_path="$unix_path"
13535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13537    new_path="$unix_path"
13538  fi
13539
13540  if test "x$path" != "x$new_path"; then
13541    BOOT_JDK="$new_path"
13542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13543$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13544  fi
13545
13546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13548
13549  else
13550    # We're on a posix platform. Hooray! :)
13551    path="$BOOT_JDK"
13552
13553    if test ! -f "$path" && test ! -d "$path"; then
13554      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13555    fi
13556
13557    has_space=`$ECHO "$path" | $GREP " "`
13558    if test "x$has_space" != x; then
13559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13560$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13561      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13562    fi
13563  fi
13564
13565              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13566$as_echo_n "checking for Boot JDK... " >&6; }
13567              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13568$as_echo "$BOOT_JDK" >&6; }
13569              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13570$as_echo_n "checking Boot JDK version... " >&6; }
13571              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13572              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13573$as_echo "$BOOT_JDK_VERSION" >&6; }
13574            fi # end check jdk version
13575          fi # end check rt.jar
13576        fi # end check javac
13577      fi # end check java
13578    fi # end check boot jdk found
13579  fi
13580
13581    done
13582  fi
13583
13584  fi
13585
13586
13587    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13588    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13589      # Do we have a bin/java?
13590      if test ! -x "$BOOT_JDK/bin/java"; then
13591        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13593        BOOT_JDK_FOUND=no
13594      else
13595        # Do we have a bin/javac?
13596        if test ! -x "$BOOT_JDK/bin/javac"; then
13597          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13599          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13600$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13601          BOOT_JDK_FOUND=no
13602        else
13603          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13604          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13605            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13607            BOOT_JDK_FOUND=no
13608          else
13609            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13610            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13611
13612            # Extra M4 quote needed to protect [] in grep expression.
13613            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13614            if test "x$FOUND_VERSION_78" = x; then
13615              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13617              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13618$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13619              BOOT_JDK_FOUND=no
13620            else
13621              # We're done! :-)
13622              BOOT_JDK_FOUND=yes
13623
13624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13625
13626  # Input might be given as Windows format, start by converting to
13627  # unix format.
13628  path="$BOOT_JDK"
13629  new_path=`$CYGPATH -u "$path"`
13630
13631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13634  # "foo.exe" is OK but "foo" is an error.
13635  #
13636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13637  # It is also a way to make sure we got the proper file name for the real test later on.
13638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13639  if test "x$test_shortpath" = x; then
13640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13642    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13643  fi
13644
13645  # Call helper function which possibly converts this using DOS-style short mode.
13646  # If so, the updated path is stored in $new_path.
13647
13648  input_path="$new_path"
13649  # Check if we need to convert this using DOS-style short mode. If the path
13650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13651  # take no chances and rewrite it.
13652  # Note: m4 eats our [], so we need to use [ and ] instead.
13653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13654  if test "x$has_forbidden_chars" != x; then
13655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13659      # Going to short mode and back again did indeed matter. Since short mode is
13660      # case insensitive, let's make it lowercase to improve readability.
13661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13662      # Now convert it back to Unix-stile (cygpath)
13663      input_path=`$CYGPATH -u "$shortmode_path"`
13664      new_path="$input_path"
13665    fi
13666  fi
13667
13668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13669  if test "x$test_cygdrive_prefix" = x; then
13670    # As a simple fix, exclude /usr/bin since it's not a real path.
13671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13673      # a path prefixed by /cygdrive for fixpath to work.
13674      new_path="$CYGWIN_ROOT_PATH$input_path"
13675    fi
13676  fi
13677
13678
13679  if test "x$path" != "x$new_path"; then
13680    BOOT_JDK="$new_path"
13681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13683  fi
13684
13685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13686
13687  path="$BOOT_JDK"
13688  has_colon=`$ECHO $path | $GREP ^.:`
13689  new_path="$path"
13690  if test "x$has_colon" = x; then
13691    # Not in mixed or Windows style, start by that.
13692    new_path=`cmd //c echo $path`
13693  fi
13694
13695
13696  input_path="$new_path"
13697  # Check if we need to convert this using DOS-style short mode. If the path
13698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13699  # take no chances and rewrite it.
13700  # Note: m4 eats our [], so we need to use [ and ] instead.
13701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13702  if test "x$has_forbidden_chars" != x; then
13703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13705  fi
13706
13707
13708  windows_path="$new_path"
13709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13710    unix_path=`$CYGPATH -u "$windows_path"`
13711    new_path="$unix_path"
13712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13714    new_path="$unix_path"
13715  fi
13716
13717  if test "x$path" != "x$new_path"; then
13718    BOOT_JDK="$new_path"
13719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13721  fi
13722
13723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13725
13726  else
13727    # We're on a posix platform. Hooray! :)
13728    path="$BOOT_JDK"
13729
13730    if test ! -f "$path" && test ! -d "$path"; then
13731      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13732    fi
13733
13734    has_space=`$ECHO "$path" | $GREP " "`
13735    if test "x$has_space" != x; then
13736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13739    fi
13740  fi
13741
13742              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13743$as_echo_n "checking for Boot JDK... " >&6; }
13744              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13745$as_echo "$BOOT_JDK" >&6; }
13746              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13747$as_echo_n "checking Boot JDK version... " >&6; }
13748              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13749              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13750$as_echo "$BOOT_JDK_VERSION" >&6; }
13751            fi # end check jdk version
13752          fi # end check rt.jar
13753        fi # end check javac
13754      fi # end check java
13755    fi # end check boot jdk found
13756  fi
13757
13758
13759  if test "x$BOOT_JDK_FOUND" = xno; then
13760    # Now execute the test
13761
13762  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13763  BOOT_JDK_SUFFIX=""
13764  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13765  if test "x$ALL_JDKS_FOUND" != x; then
13766    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13767
13768  if test "x$BOOT_JDK_FOUND" = xno; then
13769    # Now execute the test
13770
13771        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13772        if test -d "$BOOT_JDK"; then
13773          BOOT_JDK_FOUND=maybe
13774          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13775$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13776        fi
13777
13778
13779    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13780    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13781      # Do we have a bin/java?
13782      if test ! -x "$BOOT_JDK/bin/java"; then
13783        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13785        BOOT_JDK_FOUND=no
13786      else
13787        # Do we have a bin/javac?
13788        if test ! -x "$BOOT_JDK/bin/javac"; then
13789          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13791          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13792$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13793          BOOT_JDK_FOUND=no
13794        else
13795          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13796          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13797            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13799            BOOT_JDK_FOUND=no
13800          else
13801            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13802            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13803
13804            # Extra M4 quote needed to protect [] in grep expression.
13805            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13806            if test "x$FOUND_VERSION_78" = x; then
13807              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13809              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13810$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13811              BOOT_JDK_FOUND=no
13812            else
13813              # We're done! :-)
13814              BOOT_JDK_FOUND=yes
13815
13816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13817
13818  # Input might be given as Windows format, start by converting to
13819  # unix format.
13820  path="$BOOT_JDK"
13821  new_path=`$CYGPATH -u "$path"`
13822
13823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13826  # "foo.exe" is OK but "foo" is an error.
13827  #
13828  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13829  # It is also a way to make sure we got the proper file name for the real test later on.
13830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13831  if test "x$test_shortpath" = x; then
13832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13833$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13834    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13835  fi
13836
13837  # Call helper function which possibly converts this using DOS-style short mode.
13838  # If so, the updated path is stored in $new_path.
13839
13840  input_path="$new_path"
13841  # Check if we need to convert this using DOS-style short mode. If the path
13842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13843  # take no chances and rewrite it.
13844  # Note: m4 eats our [], so we need to use [ and ] instead.
13845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13846  if test "x$has_forbidden_chars" != x; then
13847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13851      # Going to short mode and back again did indeed matter. Since short mode is
13852      # case insensitive, let's make it lowercase to improve readability.
13853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13854      # Now convert it back to Unix-stile (cygpath)
13855      input_path=`$CYGPATH -u "$shortmode_path"`
13856      new_path="$input_path"
13857    fi
13858  fi
13859
13860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13861  if test "x$test_cygdrive_prefix" = x; then
13862    # As a simple fix, exclude /usr/bin since it's not a real path.
13863    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13865      # a path prefixed by /cygdrive for fixpath to work.
13866      new_path="$CYGWIN_ROOT_PATH$input_path"
13867    fi
13868  fi
13869
13870
13871  if test "x$path" != "x$new_path"; then
13872    BOOT_JDK="$new_path"
13873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13874$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13875  fi
13876
13877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13878
13879  path="$BOOT_JDK"
13880  has_colon=`$ECHO $path | $GREP ^.:`
13881  new_path="$path"
13882  if test "x$has_colon" = x; then
13883    # Not in mixed or Windows style, start by that.
13884    new_path=`cmd //c echo $path`
13885  fi
13886
13887
13888  input_path="$new_path"
13889  # Check if we need to convert this using DOS-style short mode. If the path
13890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13891  # take no chances and rewrite it.
13892  # Note: m4 eats our [], so we need to use [ and ] instead.
13893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13894  if test "x$has_forbidden_chars" != x; then
13895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13897  fi
13898
13899
13900  windows_path="$new_path"
13901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13902    unix_path=`$CYGPATH -u "$windows_path"`
13903    new_path="$unix_path"
13904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13906    new_path="$unix_path"
13907  fi
13908
13909  if test "x$path" != "x$new_path"; then
13910    BOOT_JDK="$new_path"
13911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13912$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13913  fi
13914
13915  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13916  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13917
13918  else
13919    # We're on a posix platform. Hooray! :)
13920    path="$BOOT_JDK"
13921
13922    if test ! -f "$path" && test ! -d "$path"; then
13923      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13924    fi
13925
13926    has_space=`$ECHO "$path" | $GREP " "`
13927    if test "x$has_space" != x; then
13928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13930      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13931    fi
13932  fi
13933
13934              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13935$as_echo_n "checking for Boot JDK... " >&6; }
13936              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13937$as_echo "$BOOT_JDK" >&6; }
13938              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13939$as_echo_n "checking Boot JDK version... " >&6; }
13940              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13941              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13942$as_echo "$BOOT_JDK_VERSION" >&6; }
13943            fi # end check jdk version
13944          fi # end check rt.jar
13945        fi # end check javac
13946      fi # end check java
13947    fi # end check boot jdk found
13948  fi
13949
13950    done
13951  fi
13952
13953
13954    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13955    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13956      # Do we have a bin/java?
13957      if test ! -x "$BOOT_JDK/bin/java"; then
13958        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13960        BOOT_JDK_FOUND=no
13961      else
13962        # Do we have a bin/javac?
13963        if test ! -x "$BOOT_JDK/bin/javac"; then
13964          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13966          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13967$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13968          BOOT_JDK_FOUND=no
13969        else
13970          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13971          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13972            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13974            BOOT_JDK_FOUND=no
13975          else
13976            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13977            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13978
13979            # Extra M4 quote needed to protect [] in grep expression.
13980            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13981            if test "x$FOUND_VERSION_78" = x; then
13982              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13984              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13985$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13986              BOOT_JDK_FOUND=no
13987            else
13988              # We're done! :-)
13989              BOOT_JDK_FOUND=yes
13990
13991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13992
13993  # Input might be given as Windows format, start by converting to
13994  # unix format.
13995  path="$BOOT_JDK"
13996  new_path=`$CYGPATH -u "$path"`
13997
13998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14001  # "foo.exe" is OK but "foo" is an error.
14002  #
14003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14004  # It is also a way to make sure we got the proper file name for the real test later on.
14005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14006  if test "x$test_shortpath" = x; then
14007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14009    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14010  fi
14011
14012  # Call helper function which possibly converts this using DOS-style short mode.
14013  # If so, the updated path is stored in $new_path.
14014
14015  input_path="$new_path"
14016  # Check if we need to convert this using DOS-style short mode. If the path
14017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14018  # take no chances and rewrite it.
14019  # Note: m4 eats our [], so we need to use [ and ] instead.
14020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14021  if test "x$has_forbidden_chars" != x; then
14022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14026      # Going to short mode and back again did indeed matter. Since short mode is
14027      # case insensitive, let's make it lowercase to improve readability.
14028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14029      # Now convert it back to Unix-stile (cygpath)
14030      input_path=`$CYGPATH -u "$shortmode_path"`
14031      new_path="$input_path"
14032    fi
14033  fi
14034
14035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14036  if test "x$test_cygdrive_prefix" = x; then
14037    # As a simple fix, exclude /usr/bin since it's not a real path.
14038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14040      # a path prefixed by /cygdrive for fixpath to work.
14041      new_path="$CYGWIN_ROOT_PATH$input_path"
14042    fi
14043  fi
14044
14045
14046  if test "x$path" != "x$new_path"; then
14047    BOOT_JDK="$new_path"
14048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14049$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14050  fi
14051
14052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14053
14054  path="$BOOT_JDK"
14055  has_colon=`$ECHO $path | $GREP ^.:`
14056  new_path="$path"
14057  if test "x$has_colon" = x; then
14058    # Not in mixed or Windows style, start by that.
14059    new_path=`cmd //c echo $path`
14060  fi
14061
14062
14063  input_path="$new_path"
14064  # Check if we need to convert this using DOS-style short mode. If the path
14065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14066  # take no chances and rewrite it.
14067  # Note: m4 eats our [], so we need to use [ and ] instead.
14068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14069  if test "x$has_forbidden_chars" != x; then
14070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14072  fi
14073
14074
14075  windows_path="$new_path"
14076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14077    unix_path=`$CYGPATH -u "$windows_path"`
14078    new_path="$unix_path"
14079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14081    new_path="$unix_path"
14082  fi
14083
14084  if test "x$path" != "x$new_path"; then
14085    BOOT_JDK="$new_path"
14086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14088  fi
14089
14090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14092
14093  else
14094    # We're on a posix platform. Hooray! :)
14095    path="$BOOT_JDK"
14096
14097    if test ! -f "$path" && test ! -d "$path"; then
14098      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14099    fi
14100
14101    has_space=`$ECHO "$path" | $GREP " "`
14102    if test "x$has_space" != x; then
14103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14104$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14105      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14106    fi
14107  fi
14108
14109              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14110$as_echo_n "checking for Boot JDK... " >&6; }
14111              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14112$as_echo "$BOOT_JDK" >&6; }
14113              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14114$as_echo_n "checking Boot JDK version... " >&6; }
14115              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14116              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14117$as_echo "$BOOT_JDK_VERSION" >&6; }
14118            fi # end check jdk version
14119          fi # end check rt.jar
14120        fi # end check javac
14121      fi # end check java
14122    fi # end check boot jdk found
14123  fi
14124
14125  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14126
14127  if test "x$BOOT_JDK_FOUND" = xno; then
14128    # Now execute the test
14129
14130  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14131  BOOT_JDK_SUFFIX="/Contents/Home"
14132  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14133  if test "x$ALL_JDKS_FOUND" != x; then
14134    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14135
14136  if test "x$BOOT_JDK_FOUND" = xno; then
14137    # Now execute the test
14138
14139        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14140        if test -d "$BOOT_JDK"; then
14141          BOOT_JDK_FOUND=maybe
14142          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14143$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14144        fi
14145
14146
14147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14149      # Do we have a bin/java?
14150      if test ! -x "$BOOT_JDK/bin/java"; then
14151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14153        BOOT_JDK_FOUND=no
14154      else
14155        # Do we have a bin/javac?
14156        if test ! -x "$BOOT_JDK/bin/javac"; then
14157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14161          BOOT_JDK_FOUND=no
14162        else
14163          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14164          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14165            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14167            BOOT_JDK_FOUND=no
14168          else
14169            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14170            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14171
14172            # Extra M4 quote needed to protect [] in grep expression.
14173            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14174            if test "x$FOUND_VERSION_78" = x; then
14175              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14177              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14178$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14179              BOOT_JDK_FOUND=no
14180            else
14181              # We're done! :-)
14182              BOOT_JDK_FOUND=yes
14183
14184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14185
14186  # Input might be given as Windows format, start by converting to
14187  # unix format.
14188  path="$BOOT_JDK"
14189  new_path=`$CYGPATH -u "$path"`
14190
14191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14194  # "foo.exe" is OK but "foo" is an error.
14195  #
14196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14197  # It is also a way to make sure we got the proper file name for the real test later on.
14198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14199  if test "x$test_shortpath" = x; then
14200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14202    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14203  fi
14204
14205  # Call helper function which possibly converts this using DOS-style short mode.
14206  # If so, the updated path is stored in $new_path.
14207
14208  input_path="$new_path"
14209  # Check if we need to convert this using DOS-style short mode. If the path
14210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14211  # take no chances and rewrite it.
14212  # Note: m4 eats our [], so we need to use [ and ] instead.
14213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14214  if test "x$has_forbidden_chars" != x; then
14215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14219      # Going to short mode and back again did indeed matter. Since short mode is
14220      # case insensitive, let's make it lowercase to improve readability.
14221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14222      # Now convert it back to Unix-stile (cygpath)
14223      input_path=`$CYGPATH -u "$shortmode_path"`
14224      new_path="$input_path"
14225    fi
14226  fi
14227
14228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14229  if test "x$test_cygdrive_prefix" = x; then
14230    # As a simple fix, exclude /usr/bin since it's not a real path.
14231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14233      # a path prefixed by /cygdrive for fixpath to work.
14234      new_path="$CYGWIN_ROOT_PATH$input_path"
14235    fi
14236  fi
14237
14238
14239  if test "x$path" != "x$new_path"; then
14240    BOOT_JDK="$new_path"
14241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14243  fi
14244
14245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14246
14247  path="$BOOT_JDK"
14248  has_colon=`$ECHO $path | $GREP ^.:`
14249  new_path="$path"
14250  if test "x$has_colon" = x; then
14251    # Not in mixed or Windows style, start by that.
14252    new_path=`cmd //c echo $path`
14253  fi
14254
14255
14256  input_path="$new_path"
14257  # Check if we need to convert this using DOS-style short mode. If the path
14258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14259  # take no chances and rewrite it.
14260  # Note: m4 eats our [], so we need to use [ and ] instead.
14261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14262  if test "x$has_forbidden_chars" != x; then
14263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14265  fi
14266
14267
14268  windows_path="$new_path"
14269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14270    unix_path=`$CYGPATH -u "$windows_path"`
14271    new_path="$unix_path"
14272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14274    new_path="$unix_path"
14275  fi
14276
14277  if test "x$path" != "x$new_path"; then
14278    BOOT_JDK="$new_path"
14279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14281  fi
14282
14283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14285
14286  else
14287    # We're on a posix platform. Hooray! :)
14288    path="$BOOT_JDK"
14289
14290    if test ! -f "$path" && test ! -d "$path"; then
14291      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14292    fi
14293
14294    has_space=`$ECHO "$path" | $GREP " "`
14295    if test "x$has_space" != x; then
14296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14298      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14299    fi
14300  fi
14301
14302              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14303$as_echo_n "checking for Boot JDK... " >&6; }
14304              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14305$as_echo "$BOOT_JDK" >&6; }
14306              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14307$as_echo_n "checking Boot JDK version... " >&6; }
14308              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14309              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14310$as_echo "$BOOT_JDK_VERSION" >&6; }
14311            fi # end check jdk version
14312          fi # end check rt.jar
14313        fi # end check javac
14314      fi # end check java
14315    fi # end check boot jdk found
14316  fi
14317
14318    done
14319  fi
14320
14321
14322    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14323    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14324      # Do we have a bin/java?
14325      if test ! -x "$BOOT_JDK/bin/java"; then
14326        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14328        BOOT_JDK_FOUND=no
14329      else
14330        # Do we have a bin/javac?
14331        if test ! -x "$BOOT_JDK/bin/javac"; then
14332          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14334          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14335$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14336          BOOT_JDK_FOUND=no
14337        else
14338          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14339          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14340            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14342            BOOT_JDK_FOUND=no
14343          else
14344            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14345            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14346
14347            # Extra M4 quote needed to protect [] in grep expression.
14348            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14349            if test "x$FOUND_VERSION_78" = x; then
14350              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14352              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14353$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14354              BOOT_JDK_FOUND=no
14355            else
14356              # We're done! :-)
14357              BOOT_JDK_FOUND=yes
14358
14359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14360
14361  # Input might be given as Windows format, start by converting to
14362  # unix format.
14363  path="$BOOT_JDK"
14364  new_path=`$CYGPATH -u "$path"`
14365
14366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14369  # "foo.exe" is OK but "foo" is an error.
14370  #
14371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14372  # It is also a way to make sure we got the proper file name for the real test later on.
14373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14374  if test "x$test_shortpath" = x; then
14375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14376$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14377    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14378  fi
14379
14380  # Call helper function which possibly converts this using DOS-style short mode.
14381  # If so, the updated path is stored in $new_path.
14382
14383  input_path="$new_path"
14384  # Check if we need to convert this using DOS-style short mode. If the path
14385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14386  # take no chances and rewrite it.
14387  # Note: m4 eats our [], so we need to use [ and ] instead.
14388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14389  if test "x$has_forbidden_chars" != x; then
14390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14394      # Going to short mode and back again did indeed matter. Since short mode is
14395      # case insensitive, let's make it lowercase to improve readability.
14396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14397      # Now convert it back to Unix-stile (cygpath)
14398      input_path=`$CYGPATH -u "$shortmode_path"`
14399      new_path="$input_path"
14400    fi
14401  fi
14402
14403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14404  if test "x$test_cygdrive_prefix" = x; then
14405    # As a simple fix, exclude /usr/bin since it's not a real path.
14406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14408      # a path prefixed by /cygdrive for fixpath to work.
14409      new_path="$CYGWIN_ROOT_PATH$input_path"
14410    fi
14411  fi
14412
14413
14414  if test "x$path" != "x$new_path"; then
14415    BOOT_JDK="$new_path"
14416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14418  fi
14419
14420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14421
14422  path="$BOOT_JDK"
14423  has_colon=`$ECHO $path | $GREP ^.:`
14424  new_path="$path"
14425  if test "x$has_colon" = x; then
14426    # Not in mixed or Windows style, start by that.
14427    new_path=`cmd //c echo $path`
14428  fi
14429
14430
14431  input_path="$new_path"
14432  # Check if we need to convert this using DOS-style short mode. If the path
14433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14434  # take no chances and rewrite it.
14435  # Note: m4 eats our [], so we need to use [ and ] instead.
14436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14437  if test "x$has_forbidden_chars" != x; then
14438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14440  fi
14441
14442
14443  windows_path="$new_path"
14444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14445    unix_path=`$CYGPATH -u "$windows_path"`
14446    new_path="$unix_path"
14447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14449    new_path="$unix_path"
14450  fi
14451
14452  if test "x$path" != "x$new_path"; then
14453    BOOT_JDK="$new_path"
14454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14455$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14456  fi
14457
14458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14460
14461  else
14462    # We're on a posix platform. Hooray! :)
14463    path="$BOOT_JDK"
14464
14465    if test ! -f "$path" && test ! -d "$path"; then
14466      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14467    fi
14468
14469    has_space=`$ECHO "$path" | $GREP " "`
14470    if test "x$has_space" != x; then
14471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14473      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14474    fi
14475  fi
14476
14477              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14478$as_echo_n "checking for Boot JDK... " >&6; }
14479              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14480$as_echo "$BOOT_JDK" >&6; }
14481              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14482$as_echo_n "checking Boot JDK version... " >&6; }
14483              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14484              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14485$as_echo "$BOOT_JDK_VERSION" >&6; }
14486            fi # end check jdk version
14487          fi # end check rt.jar
14488        fi # end check javac
14489      fi # end check java
14490    fi # end check boot jdk found
14491  fi
14492
14493
14494  if test "x$BOOT_JDK_FOUND" = xno; then
14495    # Now execute the test
14496
14497  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14498  BOOT_JDK_SUFFIX="/Contents/Home"
14499  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14500  if test "x$ALL_JDKS_FOUND" != x; then
14501    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14502
14503  if test "x$BOOT_JDK_FOUND" = xno; then
14504    # Now execute the test
14505
14506        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14507        if test -d "$BOOT_JDK"; then
14508          BOOT_JDK_FOUND=maybe
14509          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14510$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14511        fi
14512
14513
14514    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14515    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14516      # Do we have a bin/java?
14517      if test ! -x "$BOOT_JDK/bin/java"; then
14518        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14520        BOOT_JDK_FOUND=no
14521      else
14522        # Do we have a bin/javac?
14523        if test ! -x "$BOOT_JDK/bin/javac"; then
14524          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14526          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14527$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14528          BOOT_JDK_FOUND=no
14529        else
14530          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14531          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14532            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14534            BOOT_JDK_FOUND=no
14535          else
14536            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14537            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14538
14539            # Extra M4 quote needed to protect [] in grep expression.
14540            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14541            if test "x$FOUND_VERSION_78" = x; then
14542              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14544              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14545$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14546              BOOT_JDK_FOUND=no
14547            else
14548              # We're done! :-)
14549              BOOT_JDK_FOUND=yes
14550
14551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14552
14553  # Input might be given as Windows format, start by converting to
14554  # unix format.
14555  path="$BOOT_JDK"
14556  new_path=`$CYGPATH -u "$path"`
14557
14558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14561  # "foo.exe" is OK but "foo" is an error.
14562  #
14563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14564  # It is also a way to make sure we got the proper file name for the real test later on.
14565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14566  if test "x$test_shortpath" = x; then
14567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14570  fi
14571
14572  # Call helper function which possibly converts this using DOS-style short mode.
14573  # If so, the updated path is stored in $new_path.
14574
14575  input_path="$new_path"
14576  # Check if we need to convert this using DOS-style short mode. If the path
14577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14578  # take no chances and rewrite it.
14579  # Note: m4 eats our [], so we need to use [ and ] instead.
14580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14581  if test "x$has_forbidden_chars" != x; then
14582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14586      # Going to short mode and back again did indeed matter. Since short mode is
14587      # case insensitive, let's make it lowercase to improve readability.
14588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14589      # Now convert it back to Unix-stile (cygpath)
14590      input_path=`$CYGPATH -u "$shortmode_path"`
14591      new_path="$input_path"
14592    fi
14593  fi
14594
14595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14596  if test "x$test_cygdrive_prefix" = x; then
14597    # As a simple fix, exclude /usr/bin since it's not a real path.
14598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14600      # a path prefixed by /cygdrive for fixpath to work.
14601      new_path="$CYGWIN_ROOT_PATH$input_path"
14602    fi
14603  fi
14604
14605
14606  if test "x$path" != "x$new_path"; then
14607    BOOT_JDK="$new_path"
14608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14610  fi
14611
14612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14613
14614  path="$BOOT_JDK"
14615  has_colon=`$ECHO $path | $GREP ^.:`
14616  new_path="$path"
14617  if test "x$has_colon" = x; then
14618    # Not in mixed or Windows style, start by that.
14619    new_path=`cmd //c echo $path`
14620  fi
14621
14622
14623  input_path="$new_path"
14624  # Check if we need to convert this using DOS-style short mode. If the path
14625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14626  # take no chances and rewrite it.
14627  # Note: m4 eats our [], so we need to use [ and ] instead.
14628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14629  if test "x$has_forbidden_chars" != x; then
14630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14632  fi
14633
14634
14635  windows_path="$new_path"
14636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14637    unix_path=`$CYGPATH -u "$windows_path"`
14638    new_path="$unix_path"
14639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14641    new_path="$unix_path"
14642  fi
14643
14644  if test "x$path" != "x$new_path"; then
14645    BOOT_JDK="$new_path"
14646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14648  fi
14649
14650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14652
14653  else
14654    # We're on a posix platform. Hooray! :)
14655    path="$BOOT_JDK"
14656
14657    if test ! -f "$path" && test ! -d "$path"; then
14658      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14659    fi
14660
14661    has_space=`$ECHO "$path" | $GREP " "`
14662    if test "x$has_space" != x; then
14663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14665      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14666    fi
14667  fi
14668
14669              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14670$as_echo_n "checking for Boot JDK... " >&6; }
14671              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14672$as_echo "$BOOT_JDK" >&6; }
14673              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14674$as_echo_n "checking Boot JDK version... " >&6; }
14675              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14676              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14677$as_echo "$BOOT_JDK_VERSION" >&6; }
14678            fi # end check jdk version
14679          fi # end check rt.jar
14680        fi # end check javac
14681      fi # end check java
14682    fi # end check boot jdk found
14683  fi
14684
14685    done
14686  fi
14687
14688
14689    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14690    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14691      # Do we have a bin/java?
14692      if test ! -x "$BOOT_JDK/bin/java"; then
14693        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14695        BOOT_JDK_FOUND=no
14696      else
14697        # Do we have a bin/javac?
14698        if test ! -x "$BOOT_JDK/bin/javac"; then
14699          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14701          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14702$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14703          BOOT_JDK_FOUND=no
14704        else
14705          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14706          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14707            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14709            BOOT_JDK_FOUND=no
14710          else
14711            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14712            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14713
14714            # Extra M4 quote needed to protect [] in grep expression.
14715            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14716            if test "x$FOUND_VERSION_78" = x; then
14717              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14719              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14720$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14721              BOOT_JDK_FOUND=no
14722            else
14723              # We're done! :-)
14724              BOOT_JDK_FOUND=yes
14725
14726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14727
14728  # Input might be given as Windows format, start by converting to
14729  # unix format.
14730  path="$BOOT_JDK"
14731  new_path=`$CYGPATH -u "$path"`
14732
14733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14736  # "foo.exe" is OK but "foo" is an error.
14737  #
14738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14739  # It is also a way to make sure we got the proper file name for the real test later on.
14740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14741  if test "x$test_shortpath" = x; then
14742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14744    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14745  fi
14746
14747  # Call helper function which possibly converts this using DOS-style short mode.
14748  # If so, the updated path is stored in $new_path.
14749
14750  input_path="$new_path"
14751  # Check if we need to convert this using DOS-style short mode. If the path
14752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14753  # take no chances and rewrite it.
14754  # Note: m4 eats our [], so we need to use [ and ] instead.
14755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14756  if test "x$has_forbidden_chars" != x; then
14757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14761      # Going to short mode and back again did indeed matter. Since short mode is
14762      # case insensitive, let's make it lowercase to improve readability.
14763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14764      # Now convert it back to Unix-stile (cygpath)
14765      input_path=`$CYGPATH -u "$shortmode_path"`
14766      new_path="$input_path"
14767    fi
14768  fi
14769
14770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14771  if test "x$test_cygdrive_prefix" = x; then
14772    # As a simple fix, exclude /usr/bin since it's not a real path.
14773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14775      # a path prefixed by /cygdrive for fixpath to work.
14776      new_path="$CYGWIN_ROOT_PATH$input_path"
14777    fi
14778  fi
14779
14780
14781  if test "x$path" != "x$new_path"; then
14782    BOOT_JDK="$new_path"
14783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14785  fi
14786
14787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14788
14789  path="$BOOT_JDK"
14790  has_colon=`$ECHO $path | $GREP ^.:`
14791  new_path="$path"
14792  if test "x$has_colon" = x; then
14793    # Not in mixed or Windows style, start by that.
14794    new_path=`cmd //c echo $path`
14795  fi
14796
14797
14798  input_path="$new_path"
14799  # Check if we need to convert this using DOS-style short mode. If the path
14800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14801  # take no chances and rewrite it.
14802  # Note: m4 eats our [], so we need to use [ and ] instead.
14803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14804  if test "x$has_forbidden_chars" != x; then
14805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14807  fi
14808
14809
14810  windows_path="$new_path"
14811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14812    unix_path=`$CYGPATH -u "$windows_path"`
14813    new_path="$unix_path"
14814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14816    new_path="$unix_path"
14817  fi
14818
14819  if test "x$path" != "x$new_path"; then
14820    BOOT_JDK="$new_path"
14821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14822$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14823  fi
14824
14825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14827
14828  else
14829    # We're on a posix platform. Hooray! :)
14830    path="$BOOT_JDK"
14831
14832    if test ! -f "$path" && test ! -d "$path"; then
14833      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14834    fi
14835
14836    has_space=`$ECHO "$path" | $GREP " "`
14837    if test "x$has_space" != x; then
14838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14840      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14841    fi
14842  fi
14843
14844              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14845$as_echo_n "checking for Boot JDK... " >&6; }
14846              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14847$as_echo "$BOOT_JDK" >&6; }
14848              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14849$as_echo_n "checking Boot JDK version... " >&6; }
14850              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14851              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14852$as_echo "$BOOT_JDK_VERSION" >&6; }
14853            fi # end check jdk version
14854          fi # end check rt.jar
14855        fi # end check javac
14856      fi # end check java
14857    fi # end check boot jdk found
14858  fi
14859
14860  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14861
14862  if test "x$BOOT_JDK_FOUND" = xno; then
14863    # Now execute the test
14864
14865  BOOT_JDK_PREFIX="/usr/lib/jvm"
14866  BOOT_JDK_SUFFIX=""
14867  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14868  if test "x$ALL_JDKS_FOUND" != x; then
14869    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14870
14871  if test "x$BOOT_JDK_FOUND" = xno; then
14872    # Now execute the test
14873
14874        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14875        if test -d "$BOOT_JDK"; then
14876          BOOT_JDK_FOUND=maybe
14877          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14878$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14879        fi
14880
14881
14882    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14883    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14884      # Do we have a bin/java?
14885      if test ! -x "$BOOT_JDK/bin/java"; then
14886        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14888        BOOT_JDK_FOUND=no
14889      else
14890        # Do we have a bin/javac?
14891        if test ! -x "$BOOT_JDK/bin/javac"; then
14892          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14894          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14895$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14896          BOOT_JDK_FOUND=no
14897        else
14898          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14899          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14900            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14902            BOOT_JDK_FOUND=no
14903          else
14904            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14905            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14906
14907            # Extra M4 quote needed to protect [] in grep expression.
14908            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14909            if test "x$FOUND_VERSION_78" = x; then
14910              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14912              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14913$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14914              BOOT_JDK_FOUND=no
14915            else
14916              # We're done! :-)
14917              BOOT_JDK_FOUND=yes
14918
14919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14920
14921  # Input might be given as Windows format, start by converting to
14922  # unix format.
14923  path="$BOOT_JDK"
14924  new_path=`$CYGPATH -u "$path"`
14925
14926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14929  # "foo.exe" is OK but "foo" is an error.
14930  #
14931  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14932  # It is also a way to make sure we got the proper file name for the real test later on.
14933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14934  if test "x$test_shortpath" = x; then
14935    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14936$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14937    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14938  fi
14939
14940  # Call helper function which possibly converts this using DOS-style short mode.
14941  # If so, the updated path is stored in $new_path.
14942
14943  input_path="$new_path"
14944  # Check if we need to convert this using DOS-style short mode. If the path
14945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14946  # take no chances and rewrite it.
14947  # Note: m4 eats our [], so we need to use [ and ] instead.
14948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14949  if test "x$has_forbidden_chars" != x; then
14950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14954      # Going to short mode and back again did indeed matter. Since short mode is
14955      # case insensitive, let's make it lowercase to improve readability.
14956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14957      # Now convert it back to Unix-stile (cygpath)
14958      input_path=`$CYGPATH -u "$shortmode_path"`
14959      new_path="$input_path"
14960    fi
14961  fi
14962
14963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14964  if test "x$test_cygdrive_prefix" = x; then
14965    # As a simple fix, exclude /usr/bin since it's not a real path.
14966    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14968      # a path prefixed by /cygdrive for fixpath to work.
14969      new_path="$CYGWIN_ROOT_PATH$input_path"
14970    fi
14971  fi
14972
14973
14974  if test "x$path" != "x$new_path"; then
14975    BOOT_JDK="$new_path"
14976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14977$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14978  fi
14979
14980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14981
14982  path="$BOOT_JDK"
14983  has_colon=`$ECHO $path | $GREP ^.:`
14984  new_path="$path"
14985  if test "x$has_colon" = x; then
14986    # Not in mixed or Windows style, start by that.
14987    new_path=`cmd //c echo $path`
14988  fi
14989
14990
14991  input_path="$new_path"
14992  # Check if we need to convert this using DOS-style short mode. If the path
14993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14994  # take no chances and rewrite it.
14995  # Note: m4 eats our [], so we need to use [ and ] instead.
14996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14997  if test "x$has_forbidden_chars" != x; then
14998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15000  fi
15001
15002
15003  windows_path="$new_path"
15004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15005    unix_path=`$CYGPATH -u "$windows_path"`
15006    new_path="$unix_path"
15007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15009    new_path="$unix_path"
15010  fi
15011
15012  if test "x$path" != "x$new_path"; then
15013    BOOT_JDK="$new_path"
15014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15015$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15016  fi
15017
15018  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15019  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15020
15021  else
15022    # We're on a posix platform. Hooray! :)
15023    path="$BOOT_JDK"
15024
15025    if test ! -f "$path" && test ! -d "$path"; then
15026      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15027    fi
15028
15029    has_space=`$ECHO "$path" | $GREP " "`
15030    if test "x$has_space" != x; then
15031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15032$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15033      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15034    fi
15035  fi
15036
15037              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15038$as_echo_n "checking for Boot JDK... " >&6; }
15039              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15040$as_echo "$BOOT_JDK" >&6; }
15041              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15042$as_echo_n "checking Boot JDK version... " >&6; }
15043              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15044              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15045$as_echo "$BOOT_JDK_VERSION" >&6; }
15046            fi # end check jdk version
15047          fi # end check rt.jar
15048        fi # end check javac
15049      fi # end check java
15050    fi # end check boot jdk found
15051  fi
15052
15053    done
15054  fi
15055
15056
15057    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15058    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15059      # Do we have a bin/java?
15060      if test ! -x "$BOOT_JDK/bin/java"; then
15061        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15063        BOOT_JDK_FOUND=no
15064      else
15065        # Do we have a bin/javac?
15066        if test ! -x "$BOOT_JDK/bin/javac"; then
15067          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15069          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15070$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15071          BOOT_JDK_FOUND=no
15072        else
15073          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15074          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15075            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15077            BOOT_JDK_FOUND=no
15078          else
15079            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15080            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15081
15082            # Extra M4 quote needed to protect [] in grep expression.
15083            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15084            if test "x$FOUND_VERSION_78" = x; then
15085              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15087              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15088$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15089              BOOT_JDK_FOUND=no
15090            else
15091              # We're done! :-)
15092              BOOT_JDK_FOUND=yes
15093
15094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15095
15096  # Input might be given as Windows format, start by converting to
15097  # unix format.
15098  path="$BOOT_JDK"
15099  new_path=`$CYGPATH -u "$path"`
15100
15101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15104  # "foo.exe" is OK but "foo" is an error.
15105  #
15106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15107  # It is also a way to make sure we got the proper file name for the real test later on.
15108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15109  if test "x$test_shortpath" = x; then
15110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15112    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15113  fi
15114
15115  # Call helper function which possibly converts this using DOS-style short mode.
15116  # If so, the updated path is stored in $new_path.
15117
15118  input_path="$new_path"
15119  # Check if we need to convert this using DOS-style short mode. If the path
15120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15121  # take no chances and rewrite it.
15122  # Note: m4 eats our [], so we need to use [ and ] instead.
15123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15124  if test "x$has_forbidden_chars" != x; then
15125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15129      # Going to short mode and back again did indeed matter. Since short mode is
15130      # case insensitive, let's make it lowercase to improve readability.
15131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15132      # Now convert it back to Unix-stile (cygpath)
15133      input_path=`$CYGPATH -u "$shortmode_path"`
15134      new_path="$input_path"
15135    fi
15136  fi
15137
15138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15139  if test "x$test_cygdrive_prefix" = x; then
15140    # As a simple fix, exclude /usr/bin since it's not a real path.
15141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15143      # a path prefixed by /cygdrive for fixpath to work.
15144      new_path="$CYGWIN_ROOT_PATH$input_path"
15145    fi
15146  fi
15147
15148
15149  if test "x$path" != "x$new_path"; then
15150    BOOT_JDK="$new_path"
15151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15152$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15153  fi
15154
15155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15156
15157  path="$BOOT_JDK"
15158  has_colon=`$ECHO $path | $GREP ^.:`
15159  new_path="$path"
15160  if test "x$has_colon" = x; then
15161    # Not in mixed or Windows style, start by that.
15162    new_path=`cmd //c echo $path`
15163  fi
15164
15165
15166  input_path="$new_path"
15167  # Check if we need to convert this using DOS-style short mode. If the path
15168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15169  # take no chances and rewrite it.
15170  # Note: m4 eats our [], so we need to use [ and ] instead.
15171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15172  if test "x$has_forbidden_chars" != x; then
15173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15175  fi
15176
15177
15178  windows_path="$new_path"
15179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15180    unix_path=`$CYGPATH -u "$windows_path"`
15181    new_path="$unix_path"
15182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15184    new_path="$unix_path"
15185  fi
15186
15187  if test "x$path" != "x$new_path"; then
15188    BOOT_JDK="$new_path"
15189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15191  fi
15192
15193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15195
15196  else
15197    # We're on a posix platform. Hooray! :)
15198    path="$BOOT_JDK"
15199
15200    if test ! -f "$path" && test ! -d "$path"; then
15201      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15202    fi
15203
15204    has_space=`$ECHO "$path" | $GREP " "`
15205    if test "x$has_space" != x; then
15206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15208      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15209    fi
15210  fi
15211
15212              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15213$as_echo_n "checking for Boot JDK... " >&6; }
15214              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15215$as_echo "$BOOT_JDK" >&6; }
15216              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15217$as_echo_n "checking Boot JDK version... " >&6; }
15218              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15219              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15220$as_echo "$BOOT_JDK_VERSION" >&6; }
15221            fi # end check jdk version
15222          fi # end check rt.jar
15223        fi # end check javac
15224      fi # end check java
15225    fi # end check boot jdk found
15226  fi
15227
15228  fi
15229
15230
15231    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15232    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15233      # Do we have a bin/java?
15234      if test ! -x "$BOOT_JDK/bin/java"; then
15235        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15237        BOOT_JDK_FOUND=no
15238      else
15239        # Do we have a bin/javac?
15240        if test ! -x "$BOOT_JDK/bin/javac"; then
15241          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15243          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15244$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15245          BOOT_JDK_FOUND=no
15246        else
15247          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15248          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15249            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15251            BOOT_JDK_FOUND=no
15252          else
15253            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15254            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15255
15256            # Extra M4 quote needed to protect [] in grep expression.
15257            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15258            if test "x$FOUND_VERSION_78" = x; then
15259              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15261              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15262$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15263              BOOT_JDK_FOUND=no
15264            else
15265              # We're done! :-)
15266              BOOT_JDK_FOUND=yes
15267
15268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15269
15270  # Input might be given as Windows format, start by converting to
15271  # unix format.
15272  path="$BOOT_JDK"
15273  new_path=`$CYGPATH -u "$path"`
15274
15275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15278  # "foo.exe" is OK but "foo" is an error.
15279  #
15280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15281  # It is also a way to make sure we got the proper file name for the real test later on.
15282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15283  if test "x$test_shortpath" = x; then
15284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15286    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15287  fi
15288
15289  # Call helper function which possibly converts this using DOS-style short mode.
15290  # If so, the updated path is stored in $new_path.
15291
15292  input_path="$new_path"
15293  # Check if we need to convert this using DOS-style short mode. If the path
15294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15295  # take no chances and rewrite it.
15296  # Note: m4 eats our [], so we need to use [ and ] instead.
15297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15298  if test "x$has_forbidden_chars" != x; then
15299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15303      # Going to short mode and back again did indeed matter. Since short mode is
15304      # case insensitive, let's make it lowercase to improve readability.
15305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15306      # Now convert it back to Unix-stile (cygpath)
15307      input_path=`$CYGPATH -u "$shortmode_path"`
15308      new_path="$input_path"
15309    fi
15310  fi
15311
15312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15313  if test "x$test_cygdrive_prefix" = x; then
15314    # As a simple fix, exclude /usr/bin since it's not a real path.
15315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15317      # a path prefixed by /cygdrive for fixpath to work.
15318      new_path="$CYGWIN_ROOT_PATH$input_path"
15319    fi
15320  fi
15321
15322
15323  if test "x$path" != "x$new_path"; then
15324    BOOT_JDK="$new_path"
15325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15327  fi
15328
15329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15330
15331  path="$BOOT_JDK"
15332  has_colon=`$ECHO $path | $GREP ^.:`
15333  new_path="$path"
15334  if test "x$has_colon" = x; then
15335    # Not in mixed or Windows style, start by that.
15336    new_path=`cmd //c echo $path`
15337  fi
15338
15339
15340  input_path="$new_path"
15341  # Check if we need to convert this using DOS-style short mode. If the path
15342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15343  # take no chances and rewrite it.
15344  # Note: m4 eats our [], so we need to use [ and ] instead.
15345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15346  if test "x$has_forbidden_chars" != x; then
15347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15349  fi
15350
15351
15352  windows_path="$new_path"
15353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15354    unix_path=`$CYGPATH -u "$windows_path"`
15355    new_path="$unix_path"
15356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15358    new_path="$unix_path"
15359  fi
15360
15361  if test "x$path" != "x$new_path"; then
15362    BOOT_JDK="$new_path"
15363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15365  fi
15366
15367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15369
15370  else
15371    # We're on a posix platform. Hooray! :)
15372    path="$BOOT_JDK"
15373
15374    if test ! -f "$path" && test ! -d "$path"; then
15375      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15376    fi
15377
15378    has_space=`$ECHO "$path" | $GREP " "`
15379    if test "x$has_space" != x; then
15380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15382      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15383    fi
15384  fi
15385
15386              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15387$as_echo_n "checking for Boot JDK... " >&6; }
15388              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15389$as_echo "$BOOT_JDK" >&6; }
15390              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15391$as_echo_n "checking Boot JDK version... " >&6; }
15392              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15393              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15394$as_echo "$BOOT_JDK_VERSION" >&6; }
15395            fi # end check jdk version
15396          fi # end check rt.jar
15397        fi # end check javac
15398      fi # end check java
15399    fi # end check boot jdk found
15400  fi
15401
15402
15403# If we haven't found anything yet, we've truly lost. Give up.
15404if test "x$BOOT_JDK_FOUND" = xno; then
15405
15406    # Print a helpful message on how to acquire the necessary build dependency.
15407    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15408    MISSING_DEPENDENCY=openjdk
15409    PKGHANDLER_COMMAND=
15410
15411    case $PKGHANDLER in
15412	apt-get)
15413                apt_help     $MISSING_DEPENDENCY ;;
15414    yum)
15415                yum_help     $MISSING_DEPENDENCY ;;
15416	port)
15417                port_help    $MISSING_DEPENDENCY ;;
15418	pkgutil)
15419                pkgutil_help $MISSING_DEPENDENCY ;;
15420	pkgadd)
15421                pkgadd_help  $MISSING_DEPENDENCY ;;
15422    * )
15423      break ;;
15424    esac
15425
15426    if test "x$PKGHANDLER_COMMAND" != x; then
15427        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15428    fi
15429
15430  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15431$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15432  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15433$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15434  as_fn_error $? "Cannot continue" "$LINENO" 5
15435fi
15436
15437# Setup proper paths for what we found
15438BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15439if test ! -f "$BOOT_RTJAR"; then
15440    # On MacOSX it is called classes.jar
15441    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15442    if test -f "$BOOT_RTJAR"; then
15443      # Remove the ..
15444      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15445    fi
15446fi
15447BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15448BOOT_JDK="$BOOT_JDK"
15449
15450
15451
15452
15453# Setup tools from the Boot JDK.
15454
15455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15456$as_echo_n "checking for java in Boot JDK... " >&6; }
15457  JAVA=$BOOT_JDK/bin/java
15458  if test ! -x $JAVA; then
15459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15460$as_echo "not found" >&6; }
15461      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15462$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15463      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15464  fi
15465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15466$as_echo "ok" >&6; }
15467
15468
15469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15470$as_echo_n "checking for javac in Boot JDK... " >&6; }
15471  JAVAC=$BOOT_JDK/bin/javac
15472  if test ! -x $JAVAC; then
15473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15474$as_echo "not found" >&6; }
15475      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15476$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15477      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15478  fi
15479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15480$as_echo "ok" >&6; }
15481
15482
15483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15484$as_echo_n "checking for javah in Boot JDK... " >&6; }
15485  JAVAH=$BOOT_JDK/bin/javah
15486  if test ! -x $JAVAH; then
15487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15488$as_echo "not found" >&6; }
15489      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15490$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15491      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15492  fi
15493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15494$as_echo "ok" >&6; }
15495
15496
15497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15498$as_echo_n "checking for javap in Boot JDK... " >&6; }
15499  JAVAP=$BOOT_JDK/bin/javap
15500  if test ! -x $JAVAP; then
15501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15502$as_echo "not found" >&6; }
15503      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15504$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15505      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15506  fi
15507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15508$as_echo "ok" >&6; }
15509
15510
15511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15512$as_echo_n "checking for jar in Boot JDK... " >&6; }
15513  JAR=$BOOT_JDK/bin/jar
15514  if test ! -x $JAR; then
15515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15516$as_echo "not found" >&6; }
15517      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15518$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15519      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15520  fi
15521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15522$as_echo "ok" >&6; }
15523
15524
15525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15526$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15527  RMIC=$BOOT_JDK/bin/rmic
15528  if test ! -x $RMIC; then
15529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15530$as_echo "not found" >&6; }
15531      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15532$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15533      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15534  fi
15535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15536$as_echo "ok" >&6; }
15537
15538
15539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15540$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15541  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15542  if test ! -x $NATIVE2ASCII; then
15543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15544$as_echo "not found" >&6; }
15545      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15546$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15547      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15548  fi
15549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15550$as_echo "ok" >&6; }
15551
15552
15553# Finally, set some other options...
15554
15555# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15556BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15557
15558
15559
15560
15561##############################################################################
15562#
15563# Specify options for anything that is run with the Boot JDK.
15564#
15565
15566# Check whether --with-boot-jdk-jvmargs was given.
15567if test "${with_boot_jdk_jvmargs+set}" = set; then :
15568  withval=$with_boot_jdk_jvmargs;
15569fi
15570
15571
15572if test "x$with_boot_jdk_jvmargs" = x; then
15573    # Not all JVM:s accept the same arguments on the command line.
15574    # OpenJDK specific increase in thread stack for JDK build,
15575    # well more specifically, when running javac.
15576    if test "x$BUILD_NUM_BITS" = x32; then
15577       STACK_SIZE=768
15578    else
15579       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15580       # since 64-bit pointers are pushed on the stach. Apparently, we need
15581       # to increase the stack space when javacing the JDK....
15582       STACK_SIZE=1536
15583    fi
15584
15585    # Minimum amount of heap memory.
15586
15587    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15588    # If so, then append -Xms64M to boot_jdk_jvmargs
15589    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15590    FOUND_VERSION=`$JAVA -Xms64M -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 -Xms64M"
15593    fi
15594
15595    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15596        # Why does macosx need more heap? Its the huge JDK batch.
15597
15598    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15599    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15600    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15601    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15602    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15603        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15604    fi
15605
15606    else
15607
15608    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15609    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15610    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15611    FOUND_VERSION=`$JAVA -Xmx1100M -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 -Xmx1100M"
15614    fi
15615
15616    fi
15617    # When is adding -client something that speeds up the JVM?
15618    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15619
15620    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15621    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15622    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15623    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15624    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15625        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15626    fi
15627
15628
15629    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15630    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15631    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15632    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15633    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15634        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15635    fi
15636
15637
15638    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15639    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15640    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15641    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15642    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15643        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15644    fi
15645
15646    # Disable special log output when a debug build is used as Boot JDK...
15647
15648    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15649    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15650    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15651    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15652    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15653        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15654    fi
15655
15656fi
15657
15658BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15659
15660
15661
15662###############################################################################
15663#
15664# Configure the sources to use. We can add or override individual directories.
15665#
15666###############################################################################
15667
15668
15669
15670# Where are the sources. Any of these can be overridden
15671# using --with-override-corba and the likes.
15672LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15673CORBA_TOPDIR="$SRC_ROOT/corba"
15674JAXP_TOPDIR="$SRC_ROOT/jaxp"
15675JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15676HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15677JDK_TOPDIR="$SRC_ROOT/jdk"
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687###############################################################################
15688#
15689# Pickup additional source for a component from outside of the source root
15690# or override source for a component.
15691#
15692
15693# Check whether --with-add-source-root was given.
15694if test "${with_add_source_root+set}" = set; then :
15695  withval=$with_add_source_root;
15696fi
15697
15698
15699
15700# Check whether --with-override-source-root was given.
15701if test "${with_override_source_root+set}" = set; then :
15702  withval=$with_override_source_root;
15703fi
15704
15705
15706
15707# Check whether --with-adds-and-overrides was given.
15708if test "${with_adds_and_overrides+set}" = set; then :
15709  withval=$with_adds_and_overrides;
15710fi
15711
15712
15713if test "x$with_adds_and_overrides" != x; then
15714    with_add_source_root="$with_adds_and_overrides/adds"
15715    with_override_source_root="$with_adds_and_overrides/overrides"
15716fi
15717
15718if test "x$with_add_source_root" != x; then
15719    if ! test -d $with_add_source_root; then
15720       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15721    fi
15722    CURDIR="$PWD"
15723    cd "$with_add_source_root"
15724    ADD_SRC_ROOT="`pwd`"
15725    cd "$CURDIR"
15726    # Verify that the addon source root does not have any root makefiles.
15727    # If it does, then it is usually an error, prevent this.
15728    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15729       test -f $with_add_source_root/langtools/make/Makefile; then
15730        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
15731    fi
15732    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15733       test -f $with_add_source_root/corba/make/Makefile; then
15734        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
15735    fi
15736    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15737       test -f $with_add_source_root/jaxp/make/Makefile; then
15738        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
15739    fi
15740    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15741       test -f $with_add_source_root/jaxws/make/Makefile; then
15742        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
15743    fi
15744    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15745       test -f $with_add_source_root/hotspot/make/Makefile; then
15746        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
15747    fi
15748    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15749       test -f $with_add_source_root/jdk/make/Makefile; then
15750        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
15751    fi
15752fi
15753
15754
15755if test "x$with_override_source_root" != x; then
15756    if ! test -d $with_override_source_root; then
15757       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15758    fi
15759    CURDIR="$PWD"
15760    cd "$with_override_source_root"
15761    OVERRIDE_SRC_ROOT="`pwd`"
15762    cd "$CURDIR"
15763    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15764       test -f $with_override_source_root/langtools/make/Makefile; then
15765        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
15766    fi
15767    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15768       test -f $with_override_source_root/corba/make/Makefile; then
15769        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
15770    fi
15771    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15772       test -f $with_override_source_root/jaxp/make/Makefile; then
15773        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
15774    fi
15775    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15776       test -f $with_override_source_root/jaxws/make/Makefile; then
15777        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
15778    fi
15779    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15780       test -f $with_override_source_root/hotspot/make/Makefile; then
15781        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
15782    fi
15783    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15784       test -f $with_override_source_root/jdk/make/Makefile; then
15785        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
15786    fi
15787fi
15788
15789
15790###############################################################################
15791#
15792# Override a repo completely, this is used for example when you have 3 small
15793# development sandboxes of the langtools sources and want to avoid having 3 full
15794# OpenJDK sources checked out on disk.
15795#
15796# Assuming that the 3 langtools sandboxes are located here:
15797# /home/fredrik/sandbox1/langtools
15798# /home/fredrik/sandbox2/langtools
15799# /home/fredrik/sandbox3/langtools
15800#
15801# From the source root you create build subdirs manually:
15802#     mkdir -p build1 build2 build3
15803# in each build directory run:
15804#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15805#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15806#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15807#
15808
15809
15810# Check whether --with-override-langtools was given.
15811if test "${with_override_langtools+set}" = set; then :
15812  withval=$with_override_langtools;
15813fi
15814
15815
15816
15817# Check whether --with-override-corba was given.
15818if test "${with_override_corba+set}" = set; then :
15819  withval=$with_override_corba;
15820fi
15821
15822
15823
15824# Check whether --with-override-jaxp was given.
15825if test "${with_override_jaxp+set}" = set; then :
15826  withval=$with_override_jaxp;
15827fi
15828
15829
15830
15831# Check whether --with-override-jaxws was given.
15832if test "${with_override_jaxws+set}" = set; then :
15833  withval=$with_override_jaxws;
15834fi
15835
15836
15837
15838# Check whether --with-override-hotspot was given.
15839if test "${with_override_hotspot+set}" = set; then :
15840  withval=$with_override_hotspot;
15841fi
15842
15843
15844
15845# Check whether --with-override-jdk was given.
15846if test "${with_override_jdk+set}" = set; then :
15847  withval=$with_override_jdk;
15848fi
15849
15850
15851if test "x$with_override_langtools" != x; then
15852    CURDIR="$PWD"
15853    cd "$with_override_langtools"
15854    LANGTOOLS_TOPDIR="`pwd`"
15855    cd "$CURDIR"
15856    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15857        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15858    fi
15859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15860$as_echo_n "checking if langtools should be overridden... " >&6; }
15861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15862$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15863fi
15864if test "x$with_override_corba" != x; then
15865    CURDIR="$PWD"
15866    cd "$with_override_corba"
15867    CORBA_TOPDIR="`pwd`"
15868    cd "$CURDIR"
15869    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15870        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15871    fi
15872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15873$as_echo_n "checking if corba should be overridden... " >&6; }
15874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15875$as_echo "yes with $CORBA_TOPDIR" >&6; }
15876fi
15877if test "x$with_override_jaxp" != x; then
15878    CURDIR="$PWD"
15879    cd "$with_override_jaxp"
15880    JAXP_TOPDIR="`pwd`"
15881    cd "$CURDIR"
15882    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15883        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15884    fi
15885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15886$as_echo_n "checking if jaxp should be overridden... " >&6; }
15887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15888$as_echo "yes with $JAXP_TOPDIR" >&6; }
15889fi
15890if test "x$with_override_jaxws" != x; then
15891    CURDIR="$PWD"
15892    cd "$with_override_jaxws"
15893    JAXWS_TOPDIR="`pwd`"
15894    cd "$CURDIR"
15895    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15896        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15897    fi
15898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15899$as_echo_n "checking if jaxws should be overridden... " >&6; }
15900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15901$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15902fi
15903if test "x$with_override_hotspot" != x; then
15904    CURDIR="$PWD"
15905    cd "$with_override_hotspot"
15906    HOTSPOT_TOPDIR="`pwd`"
15907    cd "$CURDIR"
15908    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15909       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15910        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15911    fi
15912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15913$as_echo_n "checking if hotspot should be overridden... " >&6; }
15914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15915$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15916fi
15917if test "x$with_override_jdk" != x; then
15918    CURDIR="$PWD"
15919    cd "$with_override_jdk"
15920    JDK_TOPDIR="`pwd`"
15921    cd "$CURDIR"
15922    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15923        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15924    fi
15925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15926$as_echo_n "checking if JDK should be overridden... " >&6; }
15927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15928$as_echo "yes with $JDK_TOPDIR" >&6; }
15929fi
15930
15931
15932
15933BUILD_OUTPUT="$OUTPUT_ROOT"
15934
15935
15936HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15937BUILD_HOTSPOT=true
15938
15939
15940
15941# Check whether --with-import-hotspot was given.
15942if test "${with_import_hotspot+set}" = set; then :
15943  withval=$with_import_hotspot;
15944fi
15945
15946if test "x$with_import_hotspot" != x; then
15947    CURDIR="$PWD"
15948    cd "$with_import_hotspot"
15949    HOTSPOT_DIST="`pwd`"
15950    cd "$CURDIR"
15951    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15952        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15953    fi
15954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15955$as_echo_n "checking if hotspot should be imported... " >&6; }
15956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15957$as_echo "yes from $HOTSPOT_DIST" >&6; }
15958    BUILD_HOTSPOT=false
15959fi
15960
15961JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15962
15963
15964###############################################################################
15965#
15966# Setup the toolchain (compilers etc), i.e. the tools that need to be
15967# cross-compilation aware.
15968#
15969###############################################################################
15970
15971
15972###############################################################################
15973#
15974# Configure the development tool paths and potential sysroot.
15975#
15976ac_ext=cpp
15977ac_cpp='$CXXCPP $CPPFLAGS'
15978ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15979ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15980ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15981
15982
15983# The option used to specify the target .o,.a or .so file.
15984# When compiling, how to specify the to be created object file.
15985CC_OUT_OPTION='-o$(SPACE)'
15986# When linking, how to specify the to be created executable.
15987EXE_OUT_OPTION='-o$(SPACE)'
15988# When linking, how to specify the to be created dynamically linkable library.
15989LD_OUT_OPTION='-o$(SPACE)'
15990# When archiving, how to specify the to be create static archive for object files.
15991AR_OUT_OPTION='rcs$(SPACE)'
15992
15993
15994
15995
15996
15997# Locate the actual tools
15998
15999if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16000
16001  # Store path to cygwin link.exe to help excluding it when searching for
16002  # VS linker. This must be done before changing the PATH when looking for VS.
16003  # Extract the first word of "link", so it can be a program name with args.
16004set dummy link; ac_word=$2
16005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16006$as_echo_n "checking for $ac_word... " >&6; }
16007if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16008  $as_echo_n "(cached) " >&6
16009else
16010  case $CYGWIN_LINK in
16011  [\\/]* | ?:[\\/]*)
16012  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16013  ;;
16014  *)
16015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16016for as_dir in $PATH
16017do
16018  IFS=$as_save_IFS
16019  test -z "$as_dir" && as_dir=.
16020    for ac_exec_ext in '' $ac_executable_extensions; do
16021  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16022    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16024    break 2
16025  fi
16026done
16027  done
16028IFS=$as_save_IFS
16029
16030  ;;
16031esac
16032fi
16033CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16034if test -n "$CYGWIN_LINK"; then
16035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16036$as_echo "$CYGWIN_LINK" >&6; }
16037else
16038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16039$as_echo "no" >&6; }
16040fi
16041
16042
16043  if test "x$CYGWIN_LINK" != x; then
16044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16045$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16046    "$CYGWIN_LINK" --version > /dev/null
16047    if test $? -eq 0 ; then
16048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16049$as_echo "yes" >&6; }
16050    else
16051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16052$as_echo "no" >&6; }
16053      # This might be the VS linker. Don't exclude it later on.
16054      CYGWIN_LINK=""
16055    fi
16056  fi
16057
16058  # First-hand choice is to locate and run the vsvars bat file.
16059
16060  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16061    VCVARSFILE="vc/bin/vcvars32.bat"
16062  else
16063    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16064  fi
16065
16066  VS_ENV_CMD=""
16067  VS_ENV_ARGS=""
16068  if test "x$with_toolsdir" != x; then
16069
16070  if test "x$VS_ENV_CMD" = x; then
16071    VS100BASE="$with_toolsdir/../.."
16072    METHOD="--with-tools-dir"
16073
16074  windows_path="$VS100BASE"
16075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16076    unix_path=`$CYGPATH -u "$windows_path"`
16077    VS100BASE="$unix_path"
16078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16080    VS100BASE="$unix_path"
16081  fi
16082
16083    if test -d "$VS100BASE"; then
16084      if test -f "$VS100BASE/$VCVARSFILE"; then
16085        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16086$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16087        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16088      else
16089        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16090$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16091        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16092$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16093      fi
16094    fi
16095  fi
16096
16097  fi
16098
16099  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16100    # Having specified an argument which is incorrect will produce an instant failure;
16101    # we should not go on looking
16102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16103$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16104    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16105$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16106    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16107  fi
16108
16109  if test "x$ProgramW6432" != x; then
16110
16111  if test "x$VS_ENV_CMD" = x; then
16112    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16113    METHOD="well-known name"
16114
16115  windows_path="$WIN_SDK_BASE"
16116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16117    unix_path=`$CYGPATH -u "$windows_path"`
16118    WIN_SDK_BASE="$unix_path"
16119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16121    WIN_SDK_BASE="$unix_path"
16122  fi
16123
16124    if test -d "$WIN_SDK_BASE"; then
16125      # There have been cases of partial or broken SDK installations. A missing
16126      # lib dir is not going to work.
16127      if test ! -d "$WIN_SDK_BASE/../lib"; then
16128        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16129$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16130        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16131$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16132      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16133        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16134$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16135        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16136        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16137          VS_ENV_ARGS="/x86"
16138        else
16139          VS_ENV_ARGS="/x64"
16140        fi
16141      else
16142        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16143$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16144        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16145$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16146      fi
16147    fi
16148  fi
16149
16150  fi
16151  if test "x$PROGRAMW6432" != x; then
16152
16153  if test "x$VS_ENV_CMD" = x; then
16154    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16155    METHOD="well-known name"
16156
16157  windows_path="$WIN_SDK_BASE"
16158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16159    unix_path=`$CYGPATH -u "$windows_path"`
16160    WIN_SDK_BASE="$unix_path"
16161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16163    WIN_SDK_BASE="$unix_path"
16164  fi
16165
16166    if test -d "$WIN_SDK_BASE"; then
16167      # There have been cases of partial or broken SDK installations. A missing
16168      # lib dir is not going to work.
16169      if test ! -d "$WIN_SDK_BASE/../lib"; then
16170        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16171$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16172        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16173$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16174      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16175        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16176$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16177        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16178        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16179          VS_ENV_ARGS="/x86"
16180        else
16181          VS_ENV_ARGS="/x64"
16182        fi
16183      else
16184        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16185$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16186        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16187$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16188      fi
16189    fi
16190  fi
16191
16192  fi
16193  if test "x$PROGRAMFILES" != x; then
16194
16195  if test "x$VS_ENV_CMD" = x; then
16196    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16197    METHOD="well-known name"
16198
16199  windows_path="$WIN_SDK_BASE"
16200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16201    unix_path=`$CYGPATH -u "$windows_path"`
16202    WIN_SDK_BASE="$unix_path"
16203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16205    WIN_SDK_BASE="$unix_path"
16206  fi
16207
16208    if test -d "$WIN_SDK_BASE"; then
16209      # There have been cases of partial or broken SDK installations. A missing
16210      # lib dir is not going to work.
16211      if test ! -d "$WIN_SDK_BASE/../lib"; then
16212        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16213$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16214        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16215$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16216      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16217        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16218$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16219        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16220        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16221          VS_ENV_ARGS="/x86"
16222        else
16223          VS_ENV_ARGS="/x64"
16224        fi
16225      else
16226        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16227$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16228        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16229$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16230      fi
16231    fi
16232  fi
16233
16234  fi
16235
16236  if test "x$VS_ENV_CMD" = x; then
16237    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16238    METHOD="well-known name"
16239
16240  windows_path="$WIN_SDK_BASE"
16241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16242    unix_path=`$CYGPATH -u "$windows_path"`
16243    WIN_SDK_BASE="$unix_path"
16244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16246    WIN_SDK_BASE="$unix_path"
16247  fi
16248
16249    if test -d "$WIN_SDK_BASE"; then
16250      # There have been cases of partial or broken SDK installations. A missing
16251      # lib dir is not going to work.
16252      if test ! -d "$WIN_SDK_BASE/../lib"; then
16253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16254$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16255        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16256$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16257      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16258        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16259$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16260        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16261        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16262          VS_ENV_ARGS="/x86"
16263        else
16264          VS_ENV_ARGS="/x64"
16265        fi
16266      else
16267        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16268$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16269        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16270$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16271      fi
16272    fi
16273  fi
16274
16275
16276  if test "x$VS_ENV_CMD" = x; then
16277    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16278    METHOD="well-known name"
16279
16280  windows_path="$WIN_SDK_BASE"
16281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16282    unix_path=`$CYGPATH -u "$windows_path"`
16283    WIN_SDK_BASE="$unix_path"
16284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16286    WIN_SDK_BASE="$unix_path"
16287  fi
16288
16289    if test -d "$WIN_SDK_BASE"; then
16290      # There have been cases of partial or broken SDK installations. A missing
16291      # lib dir is not going to work.
16292      if test ! -d "$WIN_SDK_BASE/../lib"; then
16293        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16294$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16295        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16296$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16297      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16298        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16299$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16300        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16301        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16302          VS_ENV_ARGS="/x86"
16303        else
16304          VS_ENV_ARGS="/x64"
16305        fi
16306      else
16307        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16308$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16309        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16310$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16311      fi
16312    fi
16313  fi
16314
16315
16316  if test "x$VS100COMNTOOLS" != x; then
16317
16318  if test "x$VS_ENV_CMD" = x; then
16319    VS100BASE="$VS100COMNTOOLS/../.."
16320    METHOD="VS100COMNTOOLS variable"
16321
16322  windows_path="$VS100BASE"
16323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16324    unix_path=`$CYGPATH -u "$windows_path"`
16325    VS100BASE="$unix_path"
16326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16328    VS100BASE="$unix_path"
16329  fi
16330
16331    if test -d "$VS100BASE"; then
16332      if test -f "$VS100BASE/$VCVARSFILE"; then
16333        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16334$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16335        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16336      else
16337        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16338$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16339        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16340$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16341      fi
16342    fi
16343  fi
16344
16345  fi
16346  if test "x$PROGRAMFILES" != x; then
16347
16348  if test "x$VS_ENV_CMD" = x; then
16349    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16350    METHOD="well-known name"
16351
16352  windows_path="$VS100BASE"
16353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16354    unix_path=`$CYGPATH -u "$windows_path"`
16355    VS100BASE="$unix_path"
16356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16358    VS100BASE="$unix_path"
16359  fi
16360
16361    if test -d "$VS100BASE"; then
16362      if test -f "$VS100BASE/$VCVARSFILE"; then
16363        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16364$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16365        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16366      else
16367        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16368$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16369        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16370$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16371      fi
16372    fi
16373  fi
16374
16375  fi
16376
16377  if test "x$VS_ENV_CMD" = x; then
16378    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16379    METHOD="well-known name"
16380
16381  windows_path="$VS100BASE"
16382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16383    unix_path=`$CYGPATH -u "$windows_path"`
16384    VS100BASE="$unix_path"
16385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16387    VS100BASE="$unix_path"
16388  fi
16389
16390    if test -d "$VS100BASE"; then
16391      if test -f "$VS100BASE/$VCVARSFILE"; then
16392        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16393$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16394        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16395      else
16396        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16397$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16398        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16399$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16400      fi
16401    fi
16402  fi
16403
16404
16405  if test "x$VS_ENV_CMD" = x; then
16406    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16407    METHOD="well-known name"
16408
16409  windows_path="$VS100BASE"
16410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16411    unix_path=`$CYGPATH -u "$windows_path"`
16412    VS100BASE="$unix_path"
16413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16415    VS100BASE="$unix_path"
16416  fi
16417
16418    if test -d "$VS100BASE"; then
16419      if test -f "$VS100BASE/$VCVARSFILE"; then
16420        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16421$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16422        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16423      else
16424        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16425$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16426        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16427$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16428      fi
16429    fi
16430  fi
16431
16432
16433  if test "x$VS_ENV_CMD" != x; then
16434    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16435
16436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16437
16438  # First separate the path from the arguments. This will split at the first
16439  # space.
16440  complete="$VS_ENV_CMD"
16441  path="${complete%% *}"
16442  tmp="$complete EOL"
16443  arguments="${tmp#* }"
16444
16445  # Input might be given as Windows format, start by converting to
16446  # unix format.
16447  new_path=`$CYGPATH -u "$path"`
16448
16449  # Now try to locate executable using which
16450  new_path=`$WHICH "$new_path" 2> /dev/null`
16451  # bat and cmd files are not always considered executable in cygwin causing which
16452  # to not find them
16453  if test "x$new_path" = x \
16454           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16455           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16456    new_path=`$CYGPATH -u "$path"`
16457  fi
16458  if test "x$new_path" = x; then
16459    # Oops. Which didn't find the executable.
16460    # The splitting of arguments from the executable at a space might have been incorrect,
16461    # since paths with space are more likely in Windows. Give it another try with the whole
16462    # argument.
16463    path="$complete"
16464    arguments="EOL"
16465    new_path=`$CYGPATH -u "$path"`
16466    new_path=`$WHICH "$new_path" 2> /dev/null`
16467    # bat and cmd files are not always considered executable in cygwin causing which
16468    # to not find them
16469    if test "x$new_path" = x \
16470             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16471             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16472      new_path=`$CYGPATH -u "$path"`
16473    fi
16474    if test "x$new_path" = x; then
16475      # It's still not found. Now this is an unrecoverable error.
16476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16477$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16478      has_space=`$ECHO "$complete" | $GREP " "`
16479      if test "x$has_space" != x; then
16480        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16481$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16482      fi
16483      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16484    fi
16485  fi
16486
16487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16490  # "foo.exe" is OK but "foo" is an error.
16491  #
16492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16493  # It is also a way to make sure we got the proper file name for the real test later on.
16494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16495  if test "x$test_shortpath" = x; then
16496    # Short path failed, file does not exist as specified.
16497    # Try adding .exe or .cmd
16498    if test -f "${new_path}.exe"; then
16499       input_to_shortpath="${new_path}.exe"
16500    elif test -f "${new_path}.cmd"; then
16501       input_to_shortpath="${new_path}.cmd"
16502    else
16503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16504$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16505      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16506$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16507      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16508    fi
16509  else
16510    input_to_shortpath="$new_path"
16511  fi
16512
16513  # Call helper function which possibly converts this using DOS-style short mode.
16514  # If so, the updated path is stored in $new_path.
16515  new_path="$input_to_shortpath"
16516
16517  input_path="$input_to_shortpath"
16518  # Check if we need to convert this using DOS-style short mode. If the path
16519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16520  # take no chances and rewrite it.
16521  # Note: m4 eats our [], so we need to use [ and ] instead.
16522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16523  if test "x$has_forbidden_chars" != x; then
16524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16528      # Going to short mode and back again did indeed matter. Since short mode is
16529      # case insensitive, let's make it lowercase to improve readability.
16530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16531      # Now convert it back to Unix-stile (cygpath)
16532      input_path=`$CYGPATH -u "$shortmode_path"`
16533      new_path="$input_path"
16534    fi
16535  fi
16536
16537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16538  if test "x$test_cygdrive_prefix" = x; then
16539    # As a simple fix, exclude /usr/bin since it's not a real path.
16540    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16542      # a path prefixed by /cygdrive for fixpath to work.
16543      new_path="$CYGWIN_ROOT_PATH$input_path"
16544    fi
16545  fi
16546
16547  # remove trailing .exe if any
16548  new_path="${new_path/%.exe/}"
16549
16550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16551
16552  # First separate the path from the arguments. This will split at the first
16553  # space.
16554  complete="$VS_ENV_CMD"
16555  path="${complete%% *}"
16556  tmp="$complete EOL"
16557  arguments="${tmp#* }"
16558
16559  # Input might be given as Windows format, start by converting to
16560  # unix format.
16561  new_path="$path"
16562
16563  windows_path="$new_path"
16564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16565    unix_path=`$CYGPATH -u "$windows_path"`
16566    new_path="$unix_path"
16567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16569    new_path="$unix_path"
16570  fi
16571
16572
16573  # Now try to locate executable using which
16574  new_path=`$WHICH "$new_path" 2> /dev/null`
16575
16576  if test "x$new_path" = x; then
16577    # Oops. Which didn't find the executable.
16578    # The splitting of arguments from the executable at a space might have been incorrect,
16579    # since paths with space are more likely in Windows. Give it another try with the whole
16580    # argument.
16581    path="$complete"
16582    arguments="EOL"
16583    new_path="$path"
16584
16585  windows_path="$new_path"
16586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16587    unix_path=`$CYGPATH -u "$windows_path"`
16588    new_path="$unix_path"
16589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16591    new_path="$unix_path"
16592  fi
16593
16594
16595    new_path=`$WHICH "$new_path" 2> /dev/null`
16596
16597    if test "x$new_path" = x; then
16598      # It's still not found. Now this is an unrecoverable error.
16599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16600$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16601      has_space=`$ECHO "$complete" | $GREP " "`
16602      if test "x$has_space" != x; then
16603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16605      fi
16606      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16607    fi
16608  fi
16609
16610  # Now new_path has a complete unix path to the binary
16611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16612    # Keep paths in /bin as-is, but remove trailing .exe if any
16613    new_path="${new_path/%.exe/}"
16614    # Do not save /bin paths to all_fixpath_prefixes!
16615  else
16616    # Not in mixed or Windows style, start by that.
16617    new_path=`cmd //c echo $new_path`
16618
16619  input_path="$new_path"
16620  # Check if we need to convert this using DOS-style short mode. If the path
16621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16622  # take no chances and rewrite it.
16623  # Note: m4 eats our [], so we need to use [ and ] instead.
16624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16625  if test "x$has_forbidden_chars" != x; then
16626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16628  fi
16629
16630    # Output is in $new_path
16631
16632  windows_path="$new_path"
16633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16634    unix_path=`$CYGPATH -u "$windows_path"`
16635    new_path="$unix_path"
16636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16638    new_path="$unix_path"
16639  fi
16640
16641    # remove trailing .exe if any
16642    new_path="${new_path/%.exe/}"
16643
16644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16646  fi
16647
16648  else
16649    # We're on a posix platform. Hooray! :)
16650    # First separate the path from the arguments. This will split at the first
16651    # space.
16652    complete="$VS_ENV_CMD"
16653    path="${complete%% *}"
16654    tmp="$complete EOL"
16655    arguments="${tmp#* }"
16656
16657    # Cannot rely on the command "which" here since it doesn't always work.
16658    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16659    if test -z "$is_absolute_path"; then
16660      # Path to executable is not absolute. Find it.
16661      IFS_save="$IFS"
16662      IFS=:
16663      for p in $PATH; do
16664        if test -f "$p/$path" && test -x "$p/$path"; then
16665          new_path="$p/$path"
16666          break
16667        fi
16668      done
16669      IFS="$IFS_save"
16670    else
16671      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16672$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16673      new_path="$path"
16674    fi
16675
16676    if test "x$new_path" = x; then
16677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16678$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16679        has_space=`$ECHO "$complete" | $GREP " "`
16680        if test "x$has_space" != x; then
16681          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16682$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16683        fi
16684        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16685      fi
16686  fi
16687
16688      # Now join together the path and the arguments once again
16689      if test "x$arguments" != xEOL; then
16690        new_complete="$new_path ${arguments% *}"
16691      else
16692        new_complete="$new_path"
16693      fi
16694
16695  if test "x$complete" != "x$new_complete"; then
16696      VS_ENV_CMD="$new_complete"
16697      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16698$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16699    fi
16700
16701
16702    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16703    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16704$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16705    cd $OUTPUT_ROOT
16706    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16707    # to autoconf standards.
16708
16709    #----
16710
16711    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16712    # but calculate the difference in Cygwin environment before/after running it and then
16713    # apply the diff.
16714
16715    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16716      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16717      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16718      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16719    else
16720      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16721      _dosbash=`cmd //c echo \`which bash\``
16722    fi
16723
16724    # generate the set of exported vars before/after the vs10 setup
16725    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16726    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16727    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16728    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16729
16730    # Now execute the newly created bat file.
16731    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16732    cmd /c localdevenvtmp.bat | cat
16733
16734    # apply the diff (less some non-vs10 vars named by "!")
16735    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16736    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16737    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16738
16739    # cleanup
16740    $RM localdevenvtmp*
16741    #----
16742    cd $CURDIR
16743    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16745$as_echo "no" >&6; }
16746      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16747$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16748      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16749$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16750      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16751$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16752      as_fn_error $? "Cannot continue" "$LINENO" 5
16753    fi
16754
16755    # Now set all paths and other env variables. This will allow the rest of
16756    # the configure script to find and run the compiler in the proper way.
16757    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16758$as_echo "$as_me: Setting extracted environment variables" >&6;}
16759    . $OUTPUT_ROOT/localdevenv.sh
16760  else
16761    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16762    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16763$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16764  fi
16765
16766  # At this point, we should have corrent variables in the environment, or we can't continue.
16767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16768$as_echo_n "checking for Visual Studio variables... " >&6; }
16769
16770  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16771    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16773$as_echo "present but broken" >&6; }
16774      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16775    else
16776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16777$as_echo "ok" >&6; }
16778      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16779      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16780      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16781      VS_PATH="$PATH"
16782
16783
16784
16785    fi
16786  else
16787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16788$as_echo "not found" >&6; }
16789
16790    if test "x$VS_ENV_CMD" = x; then
16791      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16792$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16793      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16794$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16795    else
16796      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16797$as_echo "$as_me: Running the extraction script failed." >&6;}
16798    fi
16799    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16800$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16801    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16802$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16803    as_fn_error $? "Cannot continue" "$LINENO" 5
16804  fi
16805
16806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16807$as_echo_n "checking for msvcr100.dll... " >&6; }
16808
16809# Check whether --with-msvcr-dll was given.
16810if test "${with_msvcr_dll+set}" = set; then :
16811  withval=$with_msvcr_dll;
16812fi
16813
16814  if test "x$with_msvcr_dll" != x; then
16815    MSVCR_DLL="$with_msvcr_dll"
16816  else
16817    if test "x$VCINSTALLDIR" != x; then
16818      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16819        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16820      else
16821        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16822        if test "x$MSVCR_DLL" = x; then
16823          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16824        fi
16825      fi
16826      if test "x$MSVCR_DLL" != x; then
16827        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16828$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16829      else
16830        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16831$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16832      fi
16833    fi
16834    if test "x$MSVCR_DLL" = x; then
16835      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16836        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16837$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16838        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16839      fi
16840    fi
16841  fi
16842  if test "x$MSVCR_DLL" = x; then
16843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16844$as_echo "no" >&6; }
16845    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16846  fi
16847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16848$as_echo "$MSVCR_DLL" >&6; }
16849
16850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16851
16852  # Input might be given as Windows format, start by converting to
16853  # unix format.
16854  path="$MSVCR_DLL"
16855  new_path=`$CYGPATH -u "$path"`
16856
16857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16860  # "foo.exe" is OK but "foo" is an error.
16861  #
16862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16863  # It is also a way to make sure we got the proper file name for the real test later on.
16864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16865  if test "x$test_shortpath" = x; then
16866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16867$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16868    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16869  fi
16870
16871  # Call helper function which possibly converts this using DOS-style short mode.
16872  # If so, the updated path is stored in $new_path.
16873
16874  input_path="$new_path"
16875  # Check if we need to convert this using DOS-style short mode. If the path
16876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16877  # take no chances and rewrite it.
16878  # Note: m4 eats our [], so we need to use [ and ] instead.
16879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16880  if test "x$has_forbidden_chars" != x; then
16881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16885      # Going to short mode and back again did indeed matter. Since short mode is
16886      # case insensitive, let's make it lowercase to improve readability.
16887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16888      # Now convert it back to Unix-stile (cygpath)
16889      input_path=`$CYGPATH -u "$shortmode_path"`
16890      new_path="$input_path"
16891    fi
16892  fi
16893
16894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16895  if test "x$test_cygdrive_prefix" = x; then
16896    # As a simple fix, exclude /usr/bin since it's not a real path.
16897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16899      # a path prefixed by /cygdrive for fixpath to work.
16900      new_path="$CYGWIN_ROOT_PATH$input_path"
16901    fi
16902  fi
16903
16904
16905  if test "x$path" != "x$new_path"; then
16906    MSVCR_DLL="$new_path"
16907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16908$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16909  fi
16910
16911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16912
16913  path="$MSVCR_DLL"
16914  has_colon=`$ECHO $path | $GREP ^.:`
16915  new_path="$path"
16916  if test "x$has_colon" = x; then
16917    # Not in mixed or Windows style, start by that.
16918    new_path=`cmd //c echo $path`
16919  fi
16920
16921
16922  input_path="$new_path"
16923  # Check if we need to convert this using DOS-style short mode. If the path
16924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16925  # take no chances and rewrite it.
16926  # Note: m4 eats our [], so we need to use [ and ] instead.
16927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16928  if test "x$has_forbidden_chars" != x; then
16929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16931  fi
16932
16933
16934  windows_path="$new_path"
16935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16936    unix_path=`$CYGPATH -u "$windows_path"`
16937    new_path="$unix_path"
16938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16940    new_path="$unix_path"
16941  fi
16942
16943  if test "x$path" != "x$new_path"; then
16944    MSVCR_DLL="$new_path"
16945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16946$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16947  fi
16948
16949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16951
16952  else
16953    # We're on a posix platform. Hooray! :)
16954    path="$MSVCR_DLL"
16955
16956    if test ! -f "$path" && test ! -d "$path"; then
16957      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16958    fi
16959
16960    has_space=`$ECHO "$path" | $GREP " "`
16961    if test "x$has_space" != x; then
16962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16963$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16964      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16965    fi
16966  fi
16967
16968
16969
16970
16971# Check whether --with-dxsdk was given.
16972if test "${with_dxsdk+set}" = set; then :
16973  withval=$with_dxsdk;
16974fi
16975
16976
16977# Check whether --with-dxsdk-lib was given.
16978if test "${with_dxsdk_lib+set}" = set; then :
16979  withval=$with_dxsdk_lib;
16980fi
16981
16982
16983# Check whether --with-dxsdk-include was given.
16984if test "${with_dxsdk_include+set}" = set; then :
16985  withval=$with_dxsdk_include;
16986fi
16987
16988
16989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
16990$as_echo_n "checking for DirectX SDK... " >&6; }
16991
16992  if test "x$with_dxsdk" != x; then
16993    dxsdk_path="$with_dxsdk"
16994  elif test "x$DXSDK_DIR" != x; then
16995    dxsdk_path="$DXSDK_DIR"
16996  else
16997    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
16998  fi
16999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17000$as_echo "$dxsdk_path" >&6; }
17001
17002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17003
17004  # Input might be given as Windows format, start by converting to
17005  # unix format.
17006  path="$dxsdk_path"
17007  new_path=`$CYGPATH -u "$path"`
17008
17009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17012  # "foo.exe" is OK but "foo" is an error.
17013  #
17014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17015  # It is also a way to make sure we got the proper file name for the real test later on.
17016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17017  if test "x$test_shortpath" = x; then
17018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17019$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17020    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17021  fi
17022
17023  # Call helper function which possibly converts this using DOS-style short mode.
17024  # If so, the updated path is stored in $new_path.
17025
17026  input_path="$new_path"
17027  # Check if we need to convert this using DOS-style short mode. If the path
17028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17029  # take no chances and rewrite it.
17030  # Note: m4 eats our [], so we need to use [ and ] instead.
17031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17032  if test "x$has_forbidden_chars" != x; then
17033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17037      # Going to short mode and back again did indeed matter. Since short mode is
17038      # case insensitive, let's make it lowercase to improve readability.
17039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17040      # Now convert it back to Unix-stile (cygpath)
17041      input_path=`$CYGPATH -u "$shortmode_path"`
17042      new_path="$input_path"
17043    fi
17044  fi
17045
17046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17047  if test "x$test_cygdrive_prefix" = x; then
17048    # As a simple fix, exclude /usr/bin since it's not a real path.
17049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17051      # a path prefixed by /cygdrive for fixpath to work.
17052      new_path="$CYGWIN_ROOT_PATH$input_path"
17053    fi
17054  fi
17055
17056
17057  if test "x$path" != "x$new_path"; then
17058    dxsdk_path="$new_path"
17059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17060$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17061  fi
17062
17063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17064
17065  path="$dxsdk_path"
17066  has_colon=`$ECHO $path | $GREP ^.:`
17067  new_path="$path"
17068  if test "x$has_colon" = x; then
17069    # Not in mixed or Windows style, start by that.
17070    new_path=`cmd //c echo $path`
17071  fi
17072
17073
17074  input_path="$new_path"
17075  # Check if we need to convert this using DOS-style short mode. If the path
17076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17077  # take no chances and rewrite it.
17078  # Note: m4 eats our [], so we need to use [ and ] instead.
17079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17080  if test "x$has_forbidden_chars" != x; then
17081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17083  fi
17084
17085
17086  windows_path="$new_path"
17087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17088    unix_path=`$CYGPATH -u "$windows_path"`
17089    new_path="$unix_path"
17090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17092    new_path="$unix_path"
17093  fi
17094
17095  if test "x$path" != "x$new_path"; then
17096    dxsdk_path="$new_path"
17097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17098$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17099  fi
17100
17101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17103
17104  else
17105    # We're on a posix platform. Hooray! :)
17106    path="$dxsdk_path"
17107
17108    if test ! -f "$path" && test ! -d "$path"; then
17109      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17110    fi
17111
17112    has_space=`$ECHO "$path" | $GREP " "`
17113    if test "x$has_space" != x; then
17114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17115$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17116      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17117    fi
17118  fi
17119
17120
17121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17122$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17123  if test "x$with_dxsdk_lib" != x; then
17124    DXSDK_LIB_PATH="$with_dxsdk_lib"
17125  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17126    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17127  else
17128    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17129  fi
17130  # dsound.lib is linked to in jsoundds
17131  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17132    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17133  fi
17134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17135$as_echo "$DXSDK_LIB_PATH" >&6; }
17136
17137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17138
17139  # Input might be given as Windows format, start by converting to
17140  # unix format.
17141  path="$DXSDK_LIB_PATH"
17142  new_path=`$CYGPATH -u "$path"`
17143
17144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17147  # "foo.exe" is OK but "foo" is an error.
17148  #
17149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17150  # It is also a way to make sure we got the proper file name for the real test later on.
17151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17152  if test "x$test_shortpath" = x; then
17153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17154$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17155    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17156  fi
17157
17158  # Call helper function which possibly converts this using DOS-style short mode.
17159  # If so, the updated path is stored in $new_path.
17160
17161  input_path="$new_path"
17162  # Check if we need to convert this using DOS-style short mode. If the path
17163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17164  # take no chances and rewrite it.
17165  # Note: m4 eats our [], so we need to use [ and ] instead.
17166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17167  if test "x$has_forbidden_chars" != x; then
17168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17172      # Going to short mode and back again did indeed matter. Since short mode is
17173      # case insensitive, let's make it lowercase to improve readability.
17174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17175      # Now convert it back to Unix-stile (cygpath)
17176      input_path=`$CYGPATH -u "$shortmode_path"`
17177      new_path="$input_path"
17178    fi
17179  fi
17180
17181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17182  if test "x$test_cygdrive_prefix" = x; then
17183    # As a simple fix, exclude /usr/bin since it's not a real path.
17184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17186      # a path prefixed by /cygdrive for fixpath to work.
17187      new_path="$CYGWIN_ROOT_PATH$input_path"
17188    fi
17189  fi
17190
17191
17192  if test "x$path" != "x$new_path"; then
17193    DXSDK_LIB_PATH="$new_path"
17194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17195$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17196  fi
17197
17198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17199
17200  path="$DXSDK_LIB_PATH"
17201  has_colon=`$ECHO $path | $GREP ^.:`
17202  new_path="$path"
17203  if test "x$has_colon" = x; then
17204    # Not in mixed or Windows style, start by that.
17205    new_path=`cmd //c echo $path`
17206  fi
17207
17208
17209  input_path="$new_path"
17210  # Check if we need to convert this using DOS-style short mode. If the path
17211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17212  # take no chances and rewrite it.
17213  # Note: m4 eats our [], so we need to use [ and ] instead.
17214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17215  if test "x$has_forbidden_chars" != x; then
17216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17218  fi
17219
17220
17221  windows_path="$new_path"
17222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17223    unix_path=`$CYGPATH -u "$windows_path"`
17224    new_path="$unix_path"
17225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17227    new_path="$unix_path"
17228  fi
17229
17230  if test "x$path" != "x$new_path"; then
17231    DXSDK_LIB_PATH="$new_path"
17232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17233$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17234  fi
17235
17236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17238
17239  else
17240    # We're on a posix platform. Hooray! :)
17241    path="$DXSDK_LIB_PATH"
17242
17243    if test ! -f "$path" && test ! -d "$path"; then
17244      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17245    fi
17246
17247    has_space=`$ECHO "$path" | $GREP " "`
17248    if test "x$has_space" != x; then
17249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17250$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17251      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17252    fi
17253  fi
17254
17255
17256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17257$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17258  if test "x$with_dxsdk_include" != x; then
17259    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17260  else
17261    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17262  fi
17263  # dsound.h is included in jsoundds
17264  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17265    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17266  fi
17267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17268$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17269
17270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17271
17272  # Input might be given as Windows format, start by converting to
17273  # unix format.
17274  path="$DXSDK_INCLUDE_PATH"
17275  new_path=`$CYGPATH -u "$path"`
17276
17277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17280  # "foo.exe" is OK but "foo" is an error.
17281  #
17282  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17283  # It is also a way to make sure we got the proper file name for the real test later on.
17284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17285  if test "x$test_shortpath" = x; then
17286    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17287$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17288    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17289  fi
17290
17291  # Call helper function which possibly converts this using DOS-style short mode.
17292  # If so, the updated path is stored in $new_path.
17293
17294  input_path="$new_path"
17295  # Check if we need to convert this using DOS-style short mode. If the path
17296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17297  # take no chances and rewrite it.
17298  # Note: m4 eats our [], so we need to use [ and ] instead.
17299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17300  if test "x$has_forbidden_chars" != x; then
17301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17305      # Going to short mode and back again did indeed matter. Since short mode is
17306      # case insensitive, let's make it lowercase to improve readability.
17307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17308      # Now convert it back to Unix-stile (cygpath)
17309      input_path=`$CYGPATH -u "$shortmode_path"`
17310      new_path="$input_path"
17311    fi
17312  fi
17313
17314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17315  if test "x$test_cygdrive_prefix" = x; then
17316    # As a simple fix, exclude /usr/bin since it's not a real path.
17317    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17319      # a path prefixed by /cygdrive for fixpath to work.
17320      new_path="$CYGWIN_ROOT_PATH$input_path"
17321    fi
17322  fi
17323
17324
17325  if test "x$path" != "x$new_path"; then
17326    DXSDK_INCLUDE_PATH="$new_path"
17327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17328$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17329  fi
17330
17331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17332
17333  path="$DXSDK_INCLUDE_PATH"
17334  has_colon=`$ECHO $path | $GREP ^.:`
17335  new_path="$path"
17336  if test "x$has_colon" = x; then
17337    # Not in mixed or Windows style, start by that.
17338    new_path=`cmd //c echo $path`
17339  fi
17340
17341
17342  input_path="$new_path"
17343  # Check if we need to convert this using DOS-style short mode. If the path
17344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17345  # take no chances and rewrite it.
17346  # Note: m4 eats our [], so we need to use [ and ] instead.
17347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17348  if test "x$has_forbidden_chars" != x; then
17349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17351  fi
17352
17353
17354  windows_path="$new_path"
17355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17356    unix_path=`$CYGPATH -u "$windows_path"`
17357    new_path="$unix_path"
17358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17360    new_path="$unix_path"
17361  fi
17362
17363  if test "x$path" != "x$new_path"; then
17364    DXSDK_INCLUDE_PATH="$new_path"
17365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17366$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17367  fi
17368
17369  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17370  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17371
17372  else
17373    # We're on a posix platform. Hooray! :)
17374    path="$DXSDK_INCLUDE_PATH"
17375
17376    if test ! -f "$path" && test ! -d "$path"; then
17377      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17378    fi
17379
17380    has_space=`$ECHO "$path" | $GREP " "`
17381    if test "x$has_space" != x; then
17382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17383$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17384      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17385    fi
17386  fi
17387
17388
17389
17390
17391  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17392
17393fi
17394
17395
17396
17397# If --build AND --host is set, then the configure script will find any
17398# cross compilation tools in the PATH. Cross compilation tools
17399# follows the cross compilation standard where they are prefixed with ${host}.
17400# For example the binary i686-sun-solaris2.10-gcc
17401# will cross compile for i686-sun-solaris2.10
17402# If neither of build and host is not set, then build=host and the
17403# default compiler found in the path will be used.
17404# Setting only --host, does not seem to be really supported.
17405# Please set both --build and --host if you want to cross compile.
17406
17407if test "x$COMPILE_TYPE" = "xcross"; then
17408    # Now we to find a C/C++ compiler that can build executables for the build
17409    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17410    # once. Also, we need to do this before adding a tools dir to the path,
17411    # otherwise we might pick up cross-compilers which don't use standard naming.
17412    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17413    # to wait until they are properly discovered.
17414    for ac_prog in cl cc gcc
17415do
17416  # Extract the first word of "$ac_prog", so it can be a program name with args.
17417set dummy $ac_prog; ac_word=$2
17418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17419$as_echo_n "checking for $ac_word... " >&6; }
17420if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17421  $as_echo_n "(cached) " >&6
17422else
17423  case $BUILD_CC in
17424  [\\/]* | ?:[\\/]*)
17425  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17426  ;;
17427  *)
17428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17429for as_dir in $PATH
17430do
17431  IFS=$as_save_IFS
17432  test -z "$as_dir" && as_dir=.
17433    for ac_exec_ext in '' $ac_executable_extensions; do
17434  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17435    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17437    break 2
17438  fi
17439done
17440  done
17441IFS=$as_save_IFS
17442
17443  ;;
17444esac
17445fi
17446BUILD_CC=$ac_cv_path_BUILD_CC
17447if test -n "$BUILD_CC"; then
17448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17449$as_echo "$BUILD_CC" >&6; }
17450else
17451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17452$as_echo "no" >&6; }
17453fi
17454
17455
17456  test -n "$BUILD_CC" && break
17457done
17458
17459
17460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17461
17462  # First separate the path from the arguments. This will split at the first
17463  # space.
17464  complete="$BUILD_CC"
17465  path="${complete%% *}"
17466  tmp="$complete EOL"
17467  arguments="${tmp#* }"
17468
17469  # Input might be given as Windows format, start by converting to
17470  # unix format.
17471  new_path=`$CYGPATH -u "$path"`
17472
17473  # Now try to locate executable using which
17474  new_path=`$WHICH "$new_path" 2> /dev/null`
17475  # bat and cmd files are not always considered executable in cygwin causing which
17476  # to not find them
17477  if test "x$new_path" = x \
17478           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17479           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17480    new_path=`$CYGPATH -u "$path"`
17481  fi
17482  if test "x$new_path" = x; then
17483    # Oops. Which didn't find the executable.
17484    # The splitting of arguments from the executable at a space might have been incorrect,
17485    # since paths with space are more likely in Windows. Give it another try with the whole
17486    # argument.
17487    path="$complete"
17488    arguments="EOL"
17489    new_path=`$CYGPATH -u "$path"`
17490    new_path=`$WHICH "$new_path" 2> /dev/null`
17491    # bat and cmd files are not always considered executable in cygwin causing which
17492    # to not find them
17493    if test "x$new_path" = x \
17494             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17495             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17496      new_path=`$CYGPATH -u "$path"`
17497    fi
17498    if test "x$new_path" = x; then
17499      # It's still not found. Now this is an unrecoverable error.
17500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17501$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17502      has_space=`$ECHO "$complete" | $GREP " "`
17503      if test "x$has_space" != x; then
17504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17506      fi
17507      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17508    fi
17509  fi
17510
17511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17514  # "foo.exe" is OK but "foo" is an error.
17515  #
17516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17517  # It is also a way to make sure we got the proper file name for the real test later on.
17518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17519  if test "x$test_shortpath" = x; then
17520    # Short path failed, file does not exist as specified.
17521    # Try adding .exe or .cmd
17522    if test -f "${new_path}.exe"; then
17523       input_to_shortpath="${new_path}.exe"
17524    elif test -f "${new_path}.cmd"; then
17525       input_to_shortpath="${new_path}.cmd"
17526    else
17527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17528$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17529      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17530$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17531      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17532    fi
17533  else
17534    input_to_shortpath="$new_path"
17535  fi
17536
17537  # Call helper function which possibly converts this using DOS-style short mode.
17538  # If so, the updated path is stored in $new_path.
17539  new_path="$input_to_shortpath"
17540
17541  input_path="$input_to_shortpath"
17542  # Check if we need to convert this using DOS-style short mode. If the path
17543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17544  # take no chances and rewrite it.
17545  # Note: m4 eats our [], so we need to use [ and ] instead.
17546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17547  if test "x$has_forbidden_chars" != x; then
17548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17552      # Going to short mode and back again did indeed matter. Since short mode is
17553      # case insensitive, let's make it lowercase to improve readability.
17554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17555      # Now convert it back to Unix-stile (cygpath)
17556      input_path=`$CYGPATH -u "$shortmode_path"`
17557      new_path="$input_path"
17558    fi
17559  fi
17560
17561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17562  if test "x$test_cygdrive_prefix" = x; then
17563    # As a simple fix, exclude /usr/bin since it's not a real path.
17564    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17566      # a path prefixed by /cygdrive for fixpath to work.
17567      new_path="$CYGWIN_ROOT_PATH$input_path"
17568    fi
17569  fi
17570
17571  # remove trailing .exe if any
17572  new_path="${new_path/%.exe/}"
17573
17574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17575
17576  # First separate the path from the arguments. This will split at the first
17577  # space.
17578  complete="$BUILD_CC"
17579  path="${complete%% *}"
17580  tmp="$complete EOL"
17581  arguments="${tmp#* }"
17582
17583  # Input might be given as Windows format, start by converting to
17584  # unix format.
17585  new_path="$path"
17586
17587  windows_path="$new_path"
17588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17589    unix_path=`$CYGPATH -u "$windows_path"`
17590    new_path="$unix_path"
17591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17593    new_path="$unix_path"
17594  fi
17595
17596
17597  # Now try to locate executable using which
17598  new_path=`$WHICH "$new_path" 2> /dev/null`
17599
17600  if test "x$new_path" = x; then
17601    # Oops. Which didn't find the executable.
17602    # The splitting of arguments from the executable at a space might have been incorrect,
17603    # since paths with space are more likely in Windows. Give it another try with the whole
17604    # argument.
17605    path="$complete"
17606    arguments="EOL"
17607    new_path="$path"
17608
17609  windows_path="$new_path"
17610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17611    unix_path=`$CYGPATH -u "$windows_path"`
17612    new_path="$unix_path"
17613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17615    new_path="$unix_path"
17616  fi
17617
17618
17619    new_path=`$WHICH "$new_path" 2> /dev/null`
17620
17621    if test "x$new_path" = x; then
17622      # It's still not found. Now this is an unrecoverable error.
17623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17624$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17625      has_space=`$ECHO "$complete" | $GREP " "`
17626      if test "x$has_space" != x; then
17627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17629      fi
17630      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17631    fi
17632  fi
17633
17634  # Now new_path has a complete unix path to the binary
17635  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17636    # Keep paths in /bin as-is, but remove trailing .exe if any
17637    new_path="${new_path/%.exe/}"
17638    # Do not save /bin paths to all_fixpath_prefixes!
17639  else
17640    # Not in mixed or Windows style, start by that.
17641    new_path=`cmd //c echo $new_path`
17642
17643  input_path="$new_path"
17644  # Check if we need to convert this using DOS-style short mode. If the path
17645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17646  # take no chances and rewrite it.
17647  # Note: m4 eats our [], so we need to use [ and ] instead.
17648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17649  if test "x$has_forbidden_chars" != x; then
17650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17652  fi
17653
17654    # Output is in $new_path
17655
17656  windows_path="$new_path"
17657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17658    unix_path=`$CYGPATH -u "$windows_path"`
17659    new_path="$unix_path"
17660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17662    new_path="$unix_path"
17663  fi
17664
17665    # remove trailing .exe if any
17666    new_path="${new_path/%.exe/}"
17667
17668    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17669    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17670  fi
17671
17672  else
17673    # We're on a posix platform. Hooray! :)
17674    # First separate the path from the arguments. This will split at the first
17675    # space.
17676    complete="$BUILD_CC"
17677    path="${complete%% *}"
17678    tmp="$complete EOL"
17679    arguments="${tmp#* }"
17680
17681    # Cannot rely on the command "which" here since it doesn't always work.
17682    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17683    if test -z "$is_absolute_path"; then
17684      # Path to executable is not absolute. Find it.
17685      IFS_save="$IFS"
17686      IFS=:
17687      for p in $PATH; do
17688        if test -f "$p/$path" && test -x "$p/$path"; then
17689          new_path="$p/$path"
17690          break
17691        fi
17692      done
17693      IFS="$IFS_save"
17694    else
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17696$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17697      new_path="$path"
17698    fi
17699
17700    if test "x$new_path" = x; then
17701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17702$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17703        has_space=`$ECHO "$complete" | $GREP " "`
17704        if test "x$has_space" != x; then
17705          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17706$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17707        fi
17708        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17709      fi
17710  fi
17711
17712      # Now join together the path and the arguments once again
17713      if test "x$arguments" != xEOL; then
17714        new_complete="$new_path ${arguments% *}"
17715      else
17716        new_complete="$new_path"
17717      fi
17718
17719  if test "x$complete" != "x$new_complete"; then
17720      BUILD_CC="$new_complete"
17721      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17722$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17723    fi
17724
17725    for ac_prog in cl CC g++
17726do
17727  # Extract the first word of "$ac_prog", so it can be a program name with args.
17728set dummy $ac_prog; ac_word=$2
17729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17730$as_echo_n "checking for $ac_word... " >&6; }
17731if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17732  $as_echo_n "(cached) " >&6
17733else
17734  case $BUILD_CXX in
17735  [\\/]* | ?:[\\/]*)
17736  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17737  ;;
17738  *)
17739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17740for as_dir in $PATH
17741do
17742  IFS=$as_save_IFS
17743  test -z "$as_dir" && as_dir=.
17744    for ac_exec_ext in '' $ac_executable_extensions; do
17745  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17746    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17748    break 2
17749  fi
17750done
17751  done
17752IFS=$as_save_IFS
17753
17754  ;;
17755esac
17756fi
17757BUILD_CXX=$ac_cv_path_BUILD_CXX
17758if test -n "$BUILD_CXX"; then
17759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17760$as_echo "$BUILD_CXX" >&6; }
17761else
17762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17763$as_echo "no" >&6; }
17764fi
17765
17766
17767  test -n "$BUILD_CXX" && break
17768done
17769
17770
17771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17772
17773  # First separate the path from the arguments. This will split at the first
17774  # space.
17775  complete="$BUILD_CXX"
17776  path="${complete%% *}"
17777  tmp="$complete EOL"
17778  arguments="${tmp#* }"
17779
17780  # Input might be given as Windows format, start by converting to
17781  # unix format.
17782  new_path=`$CYGPATH -u "$path"`
17783
17784  # Now try to locate executable using which
17785  new_path=`$WHICH "$new_path" 2> /dev/null`
17786  # bat and cmd files are not always considered executable in cygwin causing which
17787  # to not find them
17788  if test "x$new_path" = x \
17789           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17790           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17791    new_path=`$CYGPATH -u "$path"`
17792  fi
17793  if test "x$new_path" = x; then
17794    # Oops. Which didn't find the executable.
17795    # The splitting of arguments from the executable at a space might have been incorrect,
17796    # since paths with space are more likely in Windows. Give it another try with the whole
17797    # argument.
17798    path="$complete"
17799    arguments="EOL"
17800    new_path=`$CYGPATH -u "$path"`
17801    new_path=`$WHICH "$new_path" 2> /dev/null`
17802    # bat and cmd files are not always considered executable in cygwin causing which
17803    # to not find them
17804    if test "x$new_path" = x \
17805             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17806             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17807      new_path=`$CYGPATH -u "$path"`
17808    fi
17809    if test "x$new_path" = x; then
17810      # It's still not found. Now this is an unrecoverable error.
17811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17812$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17813      has_space=`$ECHO "$complete" | $GREP " "`
17814      if test "x$has_space" != x; then
17815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17817      fi
17818      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17819    fi
17820  fi
17821
17822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17825  # "foo.exe" is OK but "foo" is an error.
17826  #
17827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17828  # It is also a way to make sure we got the proper file name for the real test later on.
17829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17830  if test "x$test_shortpath" = x; then
17831    # Short path failed, file does not exist as specified.
17832    # Try adding .exe or .cmd
17833    if test -f "${new_path}.exe"; then
17834       input_to_shortpath="${new_path}.exe"
17835    elif test -f "${new_path}.cmd"; then
17836       input_to_shortpath="${new_path}.cmd"
17837    else
17838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17839$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17842      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17843    fi
17844  else
17845    input_to_shortpath="$new_path"
17846  fi
17847
17848  # Call helper function which possibly converts this using DOS-style short mode.
17849  # If so, the updated path is stored in $new_path.
17850  new_path="$input_to_shortpath"
17851
17852  input_path="$input_to_shortpath"
17853  # Check if we need to convert this using DOS-style short mode. If the path
17854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17855  # take no chances and rewrite it.
17856  # Note: m4 eats our [], so we need to use [ and ] instead.
17857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17858  if test "x$has_forbidden_chars" != x; then
17859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17863      # Going to short mode and back again did indeed matter. Since short mode is
17864      # case insensitive, let's make it lowercase to improve readability.
17865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17866      # Now convert it back to Unix-stile (cygpath)
17867      input_path=`$CYGPATH -u "$shortmode_path"`
17868      new_path="$input_path"
17869    fi
17870  fi
17871
17872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17873  if test "x$test_cygdrive_prefix" = x; then
17874    # As a simple fix, exclude /usr/bin since it's not a real path.
17875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17877      # a path prefixed by /cygdrive for fixpath to work.
17878      new_path="$CYGWIN_ROOT_PATH$input_path"
17879    fi
17880  fi
17881
17882  # remove trailing .exe if any
17883  new_path="${new_path/%.exe/}"
17884
17885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17886
17887  # First separate the path from the arguments. This will split at the first
17888  # space.
17889  complete="$BUILD_CXX"
17890  path="${complete%% *}"
17891  tmp="$complete EOL"
17892  arguments="${tmp#* }"
17893
17894  # Input might be given as Windows format, start by converting to
17895  # unix format.
17896  new_path="$path"
17897
17898  windows_path="$new_path"
17899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17900    unix_path=`$CYGPATH -u "$windows_path"`
17901    new_path="$unix_path"
17902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17904    new_path="$unix_path"
17905  fi
17906
17907
17908  # Now try to locate executable using which
17909  new_path=`$WHICH "$new_path" 2> /dev/null`
17910
17911  if test "x$new_path" = x; then
17912    # Oops. Which didn't find the executable.
17913    # The splitting of arguments from the executable at a space might have been incorrect,
17914    # since paths with space are more likely in Windows. Give it another try with the whole
17915    # argument.
17916    path="$complete"
17917    arguments="EOL"
17918    new_path="$path"
17919
17920  windows_path="$new_path"
17921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17922    unix_path=`$CYGPATH -u "$windows_path"`
17923    new_path="$unix_path"
17924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17926    new_path="$unix_path"
17927  fi
17928
17929
17930    new_path=`$WHICH "$new_path" 2> /dev/null`
17931
17932    if test "x$new_path" = x; then
17933      # It's still not found. Now this is an unrecoverable error.
17934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17935$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17936      has_space=`$ECHO "$complete" | $GREP " "`
17937      if test "x$has_space" != x; then
17938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17940      fi
17941      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17942    fi
17943  fi
17944
17945  # Now new_path has a complete unix path to the binary
17946  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17947    # Keep paths in /bin as-is, but remove trailing .exe if any
17948    new_path="${new_path/%.exe/}"
17949    # Do not save /bin paths to all_fixpath_prefixes!
17950  else
17951    # Not in mixed or Windows style, start by that.
17952    new_path=`cmd //c echo $new_path`
17953
17954  input_path="$new_path"
17955  # Check if we need to convert this using DOS-style short mode. If the path
17956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17957  # take no chances and rewrite it.
17958  # Note: m4 eats our [], so we need to use [ and ] instead.
17959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17960  if test "x$has_forbidden_chars" != x; then
17961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17963  fi
17964
17965    # Output is in $new_path
17966
17967  windows_path="$new_path"
17968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17969    unix_path=`$CYGPATH -u "$windows_path"`
17970    new_path="$unix_path"
17971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17973    new_path="$unix_path"
17974  fi
17975
17976    # remove trailing .exe if any
17977    new_path="${new_path/%.exe/}"
17978
17979    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17980    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17981  fi
17982
17983  else
17984    # We're on a posix platform. Hooray! :)
17985    # First separate the path from the arguments. This will split at the first
17986    # space.
17987    complete="$BUILD_CXX"
17988    path="${complete%% *}"
17989    tmp="$complete EOL"
17990    arguments="${tmp#* }"
17991
17992    # Cannot rely on the command "which" here since it doesn't always work.
17993    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17994    if test -z "$is_absolute_path"; then
17995      # Path to executable is not absolute. Find it.
17996      IFS_save="$IFS"
17997      IFS=:
17998      for p in $PATH; do
17999        if test -f "$p/$path" && test -x "$p/$path"; then
18000          new_path="$p/$path"
18001          break
18002        fi
18003      done
18004      IFS="$IFS_save"
18005    else
18006      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18007$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18008      new_path="$path"
18009    fi
18010
18011    if test "x$new_path" = x; then
18012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18013$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18014        has_space=`$ECHO "$complete" | $GREP " "`
18015        if test "x$has_space" != x; then
18016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18018        fi
18019        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18020      fi
18021  fi
18022
18023      # Now join together the path and the arguments once again
18024      if test "x$arguments" != xEOL; then
18025        new_complete="$new_path ${arguments% *}"
18026      else
18027        new_complete="$new_path"
18028      fi
18029
18030  if test "x$complete" != "x$new_complete"; then
18031      BUILD_CXX="$new_complete"
18032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18033$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18034    fi
18035
18036    # Extract the first word of "ld", so it can be a program name with args.
18037set dummy ld; ac_word=$2
18038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18039$as_echo_n "checking for $ac_word... " >&6; }
18040if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18041  $as_echo_n "(cached) " >&6
18042else
18043  case $BUILD_LD in
18044  [\\/]* | ?:[\\/]*)
18045  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18046  ;;
18047  *)
18048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18049for as_dir in $PATH
18050do
18051  IFS=$as_save_IFS
18052  test -z "$as_dir" && as_dir=.
18053    for ac_exec_ext in '' $ac_executable_extensions; do
18054  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18055    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18057    break 2
18058  fi
18059done
18060  done
18061IFS=$as_save_IFS
18062
18063  ;;
18064esac
18065fi
18066BUILD_LD=$ac_cv_path_BUILD_LD
18067if test -n "$BUILD_LD"; then
18068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18069$as_echo "$BUILD_LD" >&6; }
18070else
18071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18072$as_echo "no" >&6; }
18073fi
18074
18075
18076
18077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18078
18079  # First separate the path from the arguments. This will split at the first
18080  # space.
18081  complete="$BUILD_LD"
18082  path="${complete%% *}"
18083  tmp="$complete EOL"
18084  arguments="${tmp#* }"
18085
18086  # Input might be given as Windows format, start by converting to
18087  # unix format.
18088  new_path=`$CYGPATH -u "$path"`
18089
18090  # Now try to locate executable using which
18091  new_path=`$WHICH "$new_path" 2> /dev/null`
18092  # bat and cmd files are not always considered executable in cygwin causing which
18093  # to not find them
18094  if test "x$new_path" = x \
18095           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18096           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18097    new_path=`$CYGPATH -u "$path"`
18098  fi
18099  if test "x$new_path" = x; then
18100    # Oops. Which didn't find the executable.
18101    # The splitting of arguments from the executable at a space might have been incorrect,
18102    # since paths with space are more likely in Windows. Give it another try with the whole
18103    # argument.
18104    path="$complete"
18105    arguments="EOL"
18106    new_path=`$CYGPATH -u "$path"`
18107    new_path=`$WHICH "$new_path" 2> /dev/null`
18108    # bat and cmd files are not always considered executable in cygwin causing which
18109    # to not find them
18110    if test "x$new_path" = x \
18111             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18112             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18113      new_path=`$CYGPATH -u "$path"`
18114    fi
18115    if test "x$new_path" = x; then
18116      # It's still not found. Now this is an unrecoverable error.
18117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18118$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18119      has_space=`$ECHO "$complete" | $GREP " "`
18120      if test "x$has_space" != x; then
18121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18123      fi
18124      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18125    fi
18126  fi
18127
18128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18131  # "foo.exe" is OK but "foo" is an error.
18132  #
18133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18134  # It is also a way to make sure we got the proper file name for the real test later on.
18135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18136  if test "x$test_shortpath" = x; then
18137    # Short path failed, file does not exist as specified.
18138    # Try adding .exe or .cmd
18139    if test -f "${new_path}.exe"; then
18140       input_to_shortpath="${new_path}.exe"
18141    elif test -f "${new_path}.cmd"; then
18142       input_to_shortpath="${new_path}.cmd"
18143    else
18144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18145$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18146      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18147$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18148      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18149    fi
18150  else
18151    input_to_shortpath="$new_path"
18152  fi
18153
18154  # Call helper function which possibly converts this using DOS-style short mode.
18155  # If so, the updated path is stored in $new_path.
18156  new_path="$input_to_shortpath"
18157
18158  input_path="$input_to_shortpath"
18159  # Check if we need to convert this using DOS-style short mode. If the path
18160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18161  # take no chances and rewrite it.
18162  # Note: m4 eats our [], so we need to use [ and ] instead.
18163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18164  if test "x$has_forbidden_chars" != x; then
18165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18169      # Going to short mode and back again did indeed matter. Since short mode is
18170      # case insensitive, let's make it lowercase to improve readability.
18171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18172      # Now convert it back to Unix-stile (cygpath)
18173      input_path=`$CYGPATH -u "$shortmode_path"`
18174      new_path="$input_path"
18175    fi
18176  fi
18177
18178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18179  if test "x$test_cygdrive_prefix" = x; then
18180    # As a simple fix, exclude /usr/bin since it's not a real path.
18181    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18183      # a path prefixed by /cygdrive for fixpath to work.
18184      new_path="$CYGWIN_ROOT_PATH$input_path"
18185    fi
18186  fi
18187
18188  # remove trailing .exe if any
18189  new_path="${new_path/%.exe/}"
18190
18191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18192
18193  # First separate the path from the arguments. This will split at the first
18194  # space.
18195  complete="$BUILD_LD"
18196  path="${complete%% *}"
18197  tmp="$complete EOL"
18198  arguments="${tmp#* }"
18199
18200  # Input might be given as Windows format, start by converting to
18201  # unix format.
18202  new_path="$path"
18203
18204  windows_path="$new_path"
18205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18206    unix_path=`$CYGPATH -u "$windows_path"`
18207    new_path="$unix_path"
18208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18210    new_path="$unix_path"
18211  fi
18212
18213
18214  # Now try to locate executable using which
18215  new_path=`$WHICH "$new_path" 2> /dev/null`
18216
18217  if test "x$new_path" = x; then
18218    # Oops. Which didn't find the executable.
18219    # The splitting of arguments from the executable at a space might have been incorrect,
18220    # since paths with space are more likely in Windows. Give it another try with the whole
18221    # argument.
18222    path="$complete"
18223    arguments="EOL"
18224    new_path="$path"
18225
18226  windows_path="$new_path"
18227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18228    unix_path=`$CYGPATH -u "$windows_path"`
18229    new_path="$unix_path"
18230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18232    new_path="$unix_path"
18233  fi
18234
18235
18236    new_path=`$WHICH "$new_path" 2> /dev/null`
18237
18238    if test "x$new_path" = x; then
18239      # It's still not found. Now this is an unrecoverable error.
18240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18241$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18242      has_space=`$ECHO "$complete" | $GREP " "`
18243      if test "x$has_space" != x; then
18244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18246      fi
18247      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18248    fi
18249  fi
18250
18251  # Now new_path has a complete unix path to the binary
18252  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18253    # Keep paths in /bin as-is, but remove trailing .exe if any
18254    new_path="${new_path/%.exe/}"
18255    # Do not save /bin paths to all_fixpath_prefixes!
18256  else
18257    # Not in mixed or Windows style, start by that.
18258    new_path=`cmd //c echo $new_path`
18259
18260  input_path="$new_path"
18261  # Check if we need to convert this using DOS-style short mode. If the path
18262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18263  # take no chances and rewrite it.
18264  # Note: m4 eats our [], so we need to use [ and ] instead.
18265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18266  if test "x$has_forbidden_chars" != x; then
18267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18269  fi
18270
18271    # Output is in $new_path
18272
18273  windows_path="$new_path"
18274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18275    unix_path=`$CYGPATH -u "$windows_path"`
18276    new_path="$unix_path"
18277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18279    new_path="$unix_path"
18280  fi
18281
18282    # remove trailing .exe if any
18283    new_path="${new_path/%.exe/}"
18284
18285    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18286    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18287  fi
18288
18289  else
18290    # We're on a posix platform. Hooray! :)
18291    # First separate the path from the arguments. This will split at the first
18292    # space.
18293    complete="$BUILD_LD"
18294    path="${complete%% *}"
18295    tmp="$complete EOL"
18296    arguments="${tmp#* }"
18297
18298    # Cannot rely on the command "which" here since it doesn't always work.
18299    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18300    if test -z "$is_absolute_path"; then
18301      # Path to executable is not absolute. Find it.
18302      IFS_save="$IFS"
18303      IFS=:
18304      for p in $PATH; do
18305        if test -f "$p/$path" && test -x "$p/$path"; then
18306          new_path="$p/$path"
18307          break
18308        fi
18309      done
18310      IFS="$IFS_save"
18311    else
18312      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18313$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18314      new_path="$path"
18315    fi
18316
18317    if test "x$new_path" = x; then
18318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18319$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18320        has_space=`$ECHO "$complete" | $GREP " "`
18321        if test "x$has_space" != x; then
18322          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18323$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18324        fi
18325        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18326      fi
18327  fi
18328
18329      # Now join together the path and the arguments once again
18330      if test "x$arguments" != xEOL; then
18331        new_complete="$new_path ${arguments% *}"
18332      else
18333        new_complete="$new_path"
18334      fi
18335
18336  if test "x$complete" != "x$new_complete"; then
18337      BUILD_LD="$new_complete"
18338      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18339$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18340    fi
18341
18342fi
18343
18344
18345
18346
18347# If a devkit is found on the builddeps server, then prepend its path to the
18348# PATH variable. If there are cross compilers available in the devkit, these
18349# will be found by AC_PROG_CC et al.
18350DEVKIT=
18351
18352
18353    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18354        # Source the builddeps file again, to make sure it uses the latest variables!
18355        . $builddepsfile
18356        # Look for a target and build machine specific resource!
18357        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18358        if test "x$resource" = x; then
18359            # Ok, lets instead look for a target specific resource
18360            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18361        fi
18362        if test "x$resource" = x; then
18363            # Ok, lets instead look for a build specific resource
18364            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18365        fi
18366        if test "x$resource" = x; then
18367            # Ok, lets instead look for a generic resource
18368            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18369            resource=${builddep_devkit}
18370        fi
18371        if test "x$resource" != x; then
18372            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18373$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18374	    # If the resource in the builddeps.conf file is an existing directory,
18375	    # for example /java/linux/cups
18376	    if test -d ${resource}; then
18377	       depdir=${resource}
18378	    else
18379
18380# devkit is for example mymodule
18381# $resource is for example libs/general/libmymod_1_2_3.zip
18382# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18383# $with_builddeps_dir is for example /localhome/builddeps
18384# depdir is the name of the variable into which we store the depdir, eg MYMOD
18385# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18386# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18387    filename=`basename $resource`
18388    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18389    filebase=${filename%%.*}
18390    extension=${filename#*.}
18391    installdir=$with_builddeps_dir/$filebase
18392    if test ! -f $installdir/$filename.unpacked; then
18393        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18394$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18395        if test ! -d $installdir; then
18396            mkdir -p $installdir
18397        fi
18398        if test ! -d $installdir; then
18399            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18400        fi
18401        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18402        touch $tmpfile
18403        if test ! -f $tmpfile; then
18404            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18405        fi
18406
18407    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18408    # $tmpfile is the local file name for the downloaded file.
18409    VALID_TOOL=no
18410    if test "x$BDEPS_FTP" = xwget; then
18411       VALID_TOOL=yes
18412       wget -O $tmpfile $with_builddeps_server/$resource
18413    fi
18414    if test "x$BDEPS_FTP" = xlftp; then
18415       VALID_TOOL=yes
18416       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18417    fi
18418    if test "x$BDEPS_FTP" = xftp; then
18419        VALID_TOOL=yes
18420        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18421        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18422        FTPUSERPWD=${FTPSERVER%%@*}
18423        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18424            FTPUSER=${userpwd%%:*}
18425            FTPPWD=${userpwd#*@}
18426            FTPSERVER=${FTPSERVER#*@}
18427        else
18428            FTPUSER=ftp
18429            FTPPWD=ftp
18430        fi
18431        # the "pass" command does not work on some
18432        # ftp clients (read ftp.exe) but if it works,
18433        # passive mode is better!
18434        (\
18435            echo "user $FTPUSER $FTPPWD"        ;\
18436            echo "pass"                         ;\
18437            echo "bin"                          ;\
18438            echo "get $FTPPATH $tmpfile"              ;\
18439        ) | ftp -in $FTPSERVER
18440    fi
18441    if test "x$VALID_TOOL" != xyes; then
18442       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18443    fi
18444
18445        mv $tmpfile $installdir/$filename
18446        if test ! -s $installdir/$filename; then
18447            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18448        fi
18449        case "$extension" in
18450            zip)  echo "Unzipping $installdir/$filename..."
18451               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18452            ;;
18453            tar.gz) echo "Untaring $installdir/$filename..."
18454               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18455            ;;
18456            tgz) echo "Untaring $installdir/$filename..."
18457               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18458            ;;
18459            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18460            ;;
18461        esac
18462    fi
18463    if test -f $installdir/$filename.unpacked; then
18464        depdir=$installdir
18465    fi
18466
18467	    fi
18468            # Source the builddeps file again, because in the previous command, the depdir
18469            # was updated to point at the current build dependency install directory.
18470            . $builddepsfile
18471            # Now extract variables from the builddeps.conf files.
18472            theroot=${builddep_devkit_ROOT}
18473            thecflags=${builddep_devkit_CFLAGS}
18474            thelibs=${builddep_devkit_LIBS}
18475            if test "x$depdir" = x; then
18476                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18477            fi
18478            DEVKIT=$depdir
18479            if test "x$theroot" != x; then
18480               DEVKIT="$theroot"
18481            fi
18482            if test "x$thecflags" != x; then
18483               DEVKIT_CFLAGS="$thecflags"
18484            fi
18485            if test "x$thelibs" != x; then
18486               DEVKIT_LIBS="$thelibs"
18487            fi
18488            # Found devkit
18489                     PATH="$DEVKIT/bin:$PATH"
18490                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18491                     if test "x$x_includes" = "xNONE"; then
18492                         x_includes="$SYS_ROOT/usr/include/X11"
18493                     fi
18494                     if test "x$x_libraries" = "xNONE"; then
18495                         x_libraries="$SYS_ROOT/usr/lib"
18496                     fi
18497
18498
18499        fi
18500
18501    fi
18502
18503
18504if test "x$SYS_ROOT" != "x/" ; then
18505    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18506    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18507    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18508    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18509    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18510    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18511fi
18512
18513# Store the CFLAGS etal passed to the configure script.
18514ORG_CFLAGS="$CFLAGS"
18515ORG_CXXFLAGS="$CXXFLAGS"
18516ORG_OBJCFLAGS="$OBJCFLAGS"
18517
18518# autoconf magic only relies on PATH, so update it if tools dir is specified
18519OLD_PATH="$PATH"
18520if test "x$TOOLS_DIR" != x; then
18521  PATH=$TOOLS_DIR:$PATH
18522fi
18523
18524
18525### Locate C compiler (CC)
18526
18527# gcc is almost always present, but on Windows we
18528# prefer cl.exe and on Solaris we prefer CC.
18529# Thus test for them in this order.
18530if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18531  # Do not probe for cc on MacOSX.
18532  COMPILER_CHECK_LIST="cl gcc"
18533else
18534  COMPILER_CHECK_LIST="cl cc gcc"
18535fi
18536
18537
18538  COMPILER_NAME=C
18539
18540  CC=
18541  # If TOOLS_DIR is set, check for all compiler names in there first
18542  # before checking the rest of the PATH.
18543  if test -n "$TOOLS_DIR"; then
18544    PATH_save="$PATH"
18545    PATH="$TOOLS_DIR"
18546    for ac_prog in $COMPILER_CHECK_LIST
18547do
18548  # Extract the first word of "$ac_prog", so it can be a program name with args.
18549set dummy $ac_prog; ac_word=$2
18550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18551$as_echo_n "checking for $ac_word... " >&6; }
18552if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18553  $as_echo_n "(cached) " >&6
18554else
18555  case $TOOLS_DIR_CC in
18556  [\\/]* | ?:[\\/]*)
18557  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18558  ;;
18559  *)
18560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18561for as_dir in $PATH
18562do
18563  IFS=$as_save_IFS
18564  test -z "$as_dir" && as_dir=.
18565    for ac_exec_ext in '' $ac_executable_extensions; do
18566  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18567    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18569    break 2
18570  fi
18571done
18572  done
18573IFS=$as_save_IFS
18574
18575  ;;
18576esac
18577fi
18578TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18579if test -n "$TOOLS_DIR_CC"; then
18580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18581$as_echo "$TOOLS_DIR_CC" >&6; }
18582else
18583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18584$as_echo "no" >&6; }
18585fi
18586
18587
18588  test -n "$TOOLS_DIR_CC" && break
18589done
18590
18591    CC=$TOOLS_DIR_CC
18592    PATH="$PATH_save"
18593  fi
18594
18595  # AC_PATH_PROGS can't be run multiple times with the same variable,
18596  # so create a new name for this run.
18597  if test "x$CC" = x; then
18598    for ac_prog in $COMPILER_CHECK_LIST
18599do
18600  # Extract the first word of "$ac_prog", so it can be a program name with args.
18601set dummy $ac_prog; ac_word=$2
18602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18603$as_echo_n "checking for $ac_word... " >&6; }
18604if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18605  $as_echo_n "(cached) " >&6
18606else
18607  case $POTENTIAL_CC in
18608  [\\/]* | ?:[\\/]*)
18609  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18610  ;;
18611  *)
18612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18613for as_dir in $PATH
18614do
18615  IFS=$as_save_IFS
18616  test -z "$as_dir" && as_dir=.
18617    for ac_exec_ext in '' $ac_executable_extensions; do
18618  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18619    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18621    break 2
18622  fi
18623done
18624  done
18625IFS=$as_save_IFS
18626
18627  ;;
18628esac
18629fi
18630POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18631if test -n "$POTENTIAL_CC"; then
18632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18633$as_echo "$POTENTIAL_CC" >&6; }
18634else
18635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18636$as_echo "no" >&6; }
18637fi
18638
18639
18640  test -n "$POTENTIAL_CC" && break
18641done
18642
18643    CC=$POTENTIAL_CC
18644  fi
18645
18646  if test "x$CC" = x; then
18647
18648    # Print a helpful message on how to acquire the necessary build dependency.
18649    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18650    MISSING_DEPENDENCY=devkit
18651    PKGHANDLER_COMMAND=
18652
18653    case $PKGHANDLER in
18654	apt-get)
18655                apt_help     $MISSING_DEPENDENCY ;;
18656    yum)
18657                yum_help     $MISSING_DEPENDENCY ;;
18658	port)
18659                port_help    $MISSING_DEPENDENCY ;;
18660	pkgutil)
18661                pkgutil_help $MISSING_DEPENDENCY ;;
18662	pkgadd)
18663                pkgadd_help  $MISSING_DEPENDENCY ;;
18664    * )
18665      break ;;
18666    esac
18667
18668    if test "x$PKGHANDLER_COMMAND" != x; then
18669        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18670    fi
18671
18672      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18673  fi
18674
18675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18676
18677  # First separate the path from the arguments. This will split at the first
18678  # space.
18679  complete="$CC"
18680  path="${complete%% *}"
18681  tmp="$complete EOL"
18682  arguments="${tmp#* }"
18683
18684  # Input might be given as Windows format, start by converting to
18685  # unix format.
18686  new_path=`$CYGPATH -u "$path"`
18687
18688  # Now try to locate executable using which
18689  new_path=`$WHICH "$new_path" 2> /dev/null`
18690  # bat and cmd files are not always considered executable in cygwin causing which
18691  # to not find them
18692  if test "x$new_path" = x \
18693           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18694           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18695    new_path=`$CYGPATH -u "$path"`
18696  fi
18697  if test "x$new_path" = x; then
18698    # Oops. Which didn't find the executable.
18699    # The splitting of arguments from the executable at a space might have been incorrect,
18700    # since paths with space are more likely in Windows. Give it another try with the whole
18701    # argument.
18702    path="$complete"
18703    arguments="EOL"
18704    new_path=`$CYGPATH -u "$path"`
18705    new_path=`$WHICH "$new_path" 2> /dev/null`
18706    # bat and cmd files are not always considered executable in cygwin causing which
18707    # to not find them
18708    if test "x$new_path" = x \
18709             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18710             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18711      new_path=`$CYGPATH -u "$path"`
18712    fi
18713    if test "x$new_path" = x; then
18714      # It's still not found. Now this is an unrecoverable error.
18715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18716$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18717      has_space=`$ECHO "$complete" | $GREP " "`
18718      if test "x$has_space" != x; then
18719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18721      fi
18722      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18723    fi
18724  fi
18725
18726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18729  # "foo.exe" is OK but "foo" is an error.
18730  #
18731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18732  # It is also a way to make sure we got the proper file name for the real test later on.
18733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18734  if test "x$test_shortpath" = x; then
18735    # Short path failed, file does not exist as specified.
18736    # Try adding .exe or .cmd
18737    if test -f "${new_path}.exe"; then
18738       input_to_shortpath="${new_path}.exe"
18739    elif test -f "${new_path}.cmd"; then
18740       input_to_shortpath="${new_path}.cmd"
18741    else
18742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18743$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18744      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18745$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18746      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18747    fi
18748  else
18749    input_to_shortpath="$new_path"
18750  fi
18751
18752  # Call helper function which possibly converts this using DOS-style short mode.
18753  # If so, the updated path is stored in $new_path.
18754  new_path="$input_to_shortpath"
18755
18756  input_path="$input_to_shortpath"
18757  # Check if we need to convert this using DOS-style short mode. If the path
18758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18759  # take no chances and rewrite it.
18760  # Note: m4 eats our [], so we need to use [ and ] instead.
18761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18762  if test "x$has_forbidden_chars" != x; then
18763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18767      # Going to short mode and back again did indeed matter. Since short mode is
18768      # case insensitive, let's make it lowercase to improve readability.
18769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18770      # Now convert it back to Unix-stile (cygpath)
18771      input_path=`$CYGPATH -u "$shortmode_path"`
18772      new_path="$input_path"
18773    fi
18774  fi
18775
18776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18777  if test "x$test_cygdrive_prefix" = x; then
18778    # As a simple fix, exclude /usr/bin since it's not a real path.
18779    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18781      # a path prefixed by /cygdrive for fixpath to work.
18782      new_path="$CYGWIN_ROOT_PATH$input_path"
18783    fi
18784  fi
18785
18786  # remove trailing .exe if any
18787  new_path="${new_path/%.exe/}"
18788
18789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18790
18791  # First separate the path from the arguments. This will split at the first
18792  # space.
18793  complete="$CC"
18794  path="${complete%% *}"
18795  tmp="$complete EOL"
18796  arguments="${tmp#* }"
18797
18798  # Input might be given as Windows format, start by converting to
18799  # unix format.
18800  new_path="$path"
18801
18802  windows_path="$new_path"
18803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18804    unix_path=`$CYGPATH -u "$windows_path"`
18805    new_path="$unix_path"
18806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18808    new_path="$unix_path"
18809  fi
18810
18811
18812  # Now try to locate executable using which
18813  new_path=`$WHICH "$new_path" 2> /dev/null`
18814
18815  if test "x$new_path" = x; then
18816    # Oops. Which didn't find the executable.
18817    # The splitting of arguments from the executable at a space might have been incorrect,
18818    # since paths with space are more likely in Windows. Give it another try with the whole
18819    # argument.
18820    path="$complete"
18821    arguments="EOL"
18822    new_path="$path"
18823
18824  windows_path="$new_path"
18825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18826    unix_path=`$CYGPATH -u "$windows_path"`
18827    new_path="$unix_path"
18828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18830    new_path="$unix_path"
18831  fi
18832
18833
18834    new_path=`$WHICH "$new_path" 2> /dev/null`
18835
18836    if test "x$new_path" = x; then
18837      # It's still not found. Now this is an unrecoverable error.
18838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18839$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18840      has_space=`$ECHO "$complete" | $GREP " "`
18841      if test "x$has_space" != x; then
18842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18844      fi
18845      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18846    fi
18847  fi
18848
18849  # Now new_path has a complete unix path to the binary
18850  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18851    # Keep paths in /bin as-is, but remove trailing .exe if any
18852    new_path="${new_path/%.exe/}"
18853    # Do not save /bin paths to all_fixpath_prefixes!
18854  else
18855    # Not in mixed or Windows style, start by that.
18856    new_path=`cmd //c echo $new_path`
18857
18858  input_path="$new_path"
18859  # Check if we need to convert this using DOS-style short mode. If the path
18860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18861  # take no chances and rewrite it.
18862  # Note: m4 eats our [], so we need to use [ and ] instead.
18863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18864  if test "x$has_forbidden_chars" != x; then
18865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18867  fi
18868
18869    # Output is in $new_path
18870
18871  windows_path="$new_path"
18872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18873    unix_path=`$CYGPATH -u "$windows_path"`
18874    new_path="$unix_path"
18875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18877    new_path="$unix_path"
18878  fi
18879
18880    # remove trailing .exe if any
18881    new_path="${new_path/%.exe/}"
18882
18883    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18884    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18885  fi
18886
18887  else
18888    # We're on a posix platform. Hooray! :)
18889    # First separate the path from the arguments. This will split at the first
18890    # space.
18891    complete="$CC"
18892    path="${complete%% *}"
18893    tmp="$complete EOL"
18894    arguments="${tmp#* }"
18895
18896    # Cannot rely on the command "which" here since it doesn't always work.
18897    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18898    if test -z "$is_absolute_path"; then
18899      # Path to executable is not absolute. Find it.
18900      IFS_save="$IFS"
18901      IFS=:
18902      for p in $PATH; do
18903        if test -f "$p/$path" && test -x "$p/$path"; then
18904          new_path="$p/$path"
18905          break
18906        fi
18907      done
18908      IFS="$IFS_save"
18909    else
18910      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18911$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18912      new_path="$path"
18913    fi
18914
18915    if test "x$new_path" = x; then
18916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18917$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18918        has_space=`$ECHO "$complete" | $GREP " "`
18919        if test "x$has_space" != x; then
18920          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18921$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18922        fi
18923        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18924      fi
18925  fi
18926
18927      # Now join together the path and the arguments once again
18928      if test "x$arguments" != xEOL; then
18929        new_complete="$new_path ${arguments% *}"
18930      else
18931        new_complete="$new_path"
18932      fi
18933
18934  if test "x$complete" != "x$new_complete"; then
18935      CC="$new_complete"
18936      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18937$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18938    fi
18939
18940  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18941$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18942  TEST_COMPILER="$CC"
18943
18944    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18945        # Follow a chain of symbolic links. Use readlink
18946        # where it exists, else fall back to horribly
18947        # complicated shell code.
18948        if test "x$READLINK_TESTED" != yes; then
18949            # On MacOSX there is a readlink tool with a different
18950            # purpose than the GNU readlink tool. Check the found readlink.
18951            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18952            if test "x$ISGNU" = x; then
18953                 # A readlink that we do not know how to use.
18954                 # Are there other non-GNU readlinks out there?
18955                 READLINK_TESTED=yes
18956                 READLINK=
18957            fi
18958        fi
18959
18960        if test "x$READLINK" != x; then
18961            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18962        else
18963            # Save the current directory for restoring afterwards
18964            STARTDIR=$PWD
18965            COUNTER=0
18966            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18967            sym_link_file=`$BASENAME $TEST_COMPILER`
18968            # Use the system pwd and not the shell builtin to resolve directory symlinks
18969            cd $sym_link_dir
18970            cd `$THEPWDCMD`
18971            sym_link_dir=`$THEPWDCMD`
18972            # Resolve file symlinks
18973            while test $COUNTER -lt 20; do
18974                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18975                if test "x$ISLINK" == x; then
18976                    # This is not a symbolic link! We are done!
18977                    break
18978                fi
18979                # Again resolve directory symlinks since the target of the just found
18980                # link could be in a different directory
18981                cd `$DIRNAME $ISLINK`
18982                sym_link_dir=`$THEPWDCMD`
18983                sym_link_file=`$BASENAME $ISLINK`
18984                let COUNTER=COUNTER+1
18985            done
18986            cd $STARTDIR
18987            TEST_COMPILER=$sym_link_dir/$sym_link_file
18988        fi
18989    fi
18990
18991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18992$as_echo "$TEST_COMPILER" >&6; }
18993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18994$as_echo_n "checking if CC is disguised ccache... " >&6; }
18995
18996  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18997  if test "x$COMPILER_BASENAME" = "xccache"; then
18998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18999$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19000    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19001    # We want to control ccache invocation ourselves, so ignore this cc and try
19002    # searching again.
19003
19004    # Remove the path to the fake ccache cc from the PATH
19005    RETRY_COMPILER_SAVED_PATH="$PATH"
19006    COMPILER_DIRNAME=`$DIRNAME $CC`
19007    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19008
19009    # Try again looking for our compiler
19010    if test -n "$ac_tool_prefix"; then
19011  for ac_prog in $COMPILER_CHECK_LIST
19012  do
19013    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19014set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19016$as_echo_n "checking for $ac_word... " >&6; }
19017if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19018  $as_echo_n "(cached) " >&6
19019else
19020  if test -n "$PROPER_COMPILER_CC"; then
19021  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19022else
19023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19024for as_dir in $PATH
19025do
19026  IFS=$as_save_IFS
19027  test -z "$as_dir" && as_dir=.
19028    for ac_exec_ext in '' $ac_executable_extensions; do
19029  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19030    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19032    break 2
19033  fi
19034done
19035  done
19036IFS=$as_save_IFS
19037
19038fi
19039fi
19040PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19041if test -n "$PROPER_COMPILER_CC"; then
19042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19043$as_echo "$PROPER_COMPILER_CC" >&6; }
19044else
19045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19046$as_echo "no" >&6; }
19047fi
19048
19049
19050    test -n "$PROPER_COMPILER_CC" && break
19051  done
19052fi
19053if test -z "$PROPER_COMPILER_CC"; then
19054  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19055  for ac_prog in $COMPILER_CHECK_LIST
19056do
19057  # Extract the first word of "$ac_prog", so it can be a program name with args.
19058set dummy $ac_prog; ac_word=$2
19059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19060$as_echo_n "checking for $ac_word... " >&6; }
19061if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19062  $as_echo_n "(cached) " >&6
19063else
19064  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19065  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19066else
19067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19068for as_dir in $PATH
19069do
19070  IFS=$as_save_IFS
19071  test -z "$as_dir" && as_dir=.
19072    for ac_exec_ext in '' $ac_executable_extensions; do
19073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19074    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19076    break 2
19077  fi
19078done
19079  done
19080IFS=$as_save_IFS
19081
19082fi
19083fi
19084ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19085if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19087$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19088else
19089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19090$as_echo "no" >&6; }
19091fi
19092
19093
19094  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19095done
19096
19097  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19098    PROPER_COMPILER_CC=""
19099  else
19100    case $cross_compiling:$ac_tool_warned in
19101yes:)
19102{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19103$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19104ac_tool_warned=yes ;;
19105esac
19106    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19107  fi
19108fi
19109
19110
19111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19112
19113  # First separate the path from the arguments. This will split at the first
19114  # space.
19115  complete="$PROPER_COMPILER_CC"
19116  path="${complete%% *}"
19117  tmp="$complete EOL"
19118  arguments="${tmp#* }"
19119
19120  # Input might be given as Windows format, start by converting to
19121  # unix format.
19122  new_path=`$CYGPATH -u "$path"`
19123
19124  # Now try to locate executable using which
19125  new_path=`$WHICH "$new_path" 2> /dev/null`
19126  # bat and cmd files are not always considered executable in cygwin causing which
19127  # to not find them
19128  if test "x$new_path" = x \
19129           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19130           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19131    new_path=`$CYGPATH -u "$path"`
19132  fi
19133  if test "x$new_path" = x; then
19134    # Oops. Which didn't find the executable.
19135    # The splitting of arguments from the executable at a space might have been incorrect,
19136    # since paths with space are more likely in Windows. Give it another try with the whole
19137    # argument.
19138    path="$complete"
19139    arguments="EOL"
19140    new_path=`$CYGPATH -u "$path"`
19141    new_path=`$WHICH "$new_path" 2> /dev/null`
19142    # bat and cmd files are not always considered executable in cygwin causing which
19143    # to not find them
19144    if test "x$new_path" = x \
19145             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19146             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19147      new_path=`$CYGPATH -u "$path"`
19148    fi
19149    if test "x$new_path" = x; then
19150      # It's still not found. Now this is an unrecoverable error.
19151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19152$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19153      has_space=`$ECHO "$complete" | $GREP " "`
19154      if test "x$has_space" != x; then
19155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19157      fi
19158      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19159    fi
19160  fi
19161
19162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19165  # "foo.exe" is OK but "foo" is an error.
19166  #
19167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19168  # It is also a way to make sure we got the proper file name for the real test later on.
19169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19170  if test "x$test_shortpath" = x; then
19171    # Short path failed, file does not exist as specified.
19172    # Try adding .exe or .cmd
19173    if test -f "${new_path}.exe"; then
19174       input_to_shortpath="${new_path}.exe"
19175    elif test -f "${new_path}.cmd"; then
19176       input_to_shortpath="${new_path}.cmd"
19177    else
19178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19179$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19180      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19181$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19182      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19183    fi
19184  else
19185    input_to_shortpath="$new_path"
19186  fi
19187
19188  # Call helper function which possibly converts this using DOS-style short mode.
19189  # If so, the updated path is stored in $new_path.
19190  new_path="$input_to_shortpath"
19191
19192  input_path="$input_to_shortpath"
19193  # Check if we need to convert this using DOS-style short mode. If the path
19194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19195  # take no chances and rewrite it.
19196  # Note: m4 eats our [], so we need to use [ and ] instead.
19197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19198  if test "x$has_forbidden_chars" != x; then
19199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19203      # Going to short mode and back again did indeed matter. Since short mode is
19204      # case insensitive, let's make it lowercase to improve readability.
19205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19206      # Now convert it back to Unix-stile (cygpath)
19207      input_path=`$CYGPATH -u "$shortmode_path"`
19208      new_path="$input_path"
19209    fi
19210  fi
19211
19212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19213  if test "x$test_cygdrive_prefix" = x; then
19214    # As a simple fix, exclude /usr/bin since it's not a real path.
19215    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19217      # a path prefixed by /cygdrive for fixpath to work.
19218      new_path="$CYGWIN_ROOT_PATH$input_path"
19219    fi
19220  fi
19221
19222  # remove trailing .exe if any
19223  new_path="${new_path/%.exe/}"
19224
19225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19226
19227  # First separate the path from the arguments. This will split at the first
19228  # space.
19229  complete="$PROPER_COMPILER_CC"
19230  path="${complete%% *}"
19231  tmp="$complete EOL"
19232  arguments="${tmp#* }"
19233
19234  # Input might be given as Windows format, start by converting to
19235  # unix format.
19236  new_path="$path"
19237
19238  windows_path="$new_path"
19239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19240    unix_path=`$CYGPATH -u "$windows_path"`
19241    new_path="$unix_path"
19242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19244    new_path="$unix_path"
19245  fi
19246
19247
19248  # Now try to locate executable using which
19249  new_path=`$WHICH "$new_path" 2> /dev/null`
19250
19251  if test "x$new_path" = x; then
19252    # Oops. Which didn't find the executable.
19253    # The splitting of arguments from the executable at a space might have been incorrect,
19254    # since paths with space are more likely in Windows. Give it another try with the whole
19255    # argument.
19256    path="$complete"
19257    arguments="EOL"
19258    new_path="$path"
19259
19260  windows_path="$new_path"
19261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19262    unix_path=`$CYGPATH -u "$windows_path"`
19263    new_path="$unix_path"
19264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19266    new_path="$unix_path"
19267  fi
19268
19269
19270    new_path=`$WHICH "$new_path" 2> /dev/null`
19271
19272    if test "x$new_path" = x; then
19273      # It's still not found. Now this is an unrecoverable error.
19274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19275$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19276      has_space=`$ECHO "$complete" | $GREP " "`
19277      if test "x$has_space" != x; then
19278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19280      fi
19281      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19282    fi
19283  fi
19284
19285  # Now new_path has a complete unix path to the binary
19286  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19287    # Keep paths in /bin as-is, but remove trailing .exe if any
19288    new_path="${new_path/%.exe/}"
19289    # Do not save /bin paths to all_fixpath_prefixes!
19290  else
19291    # Not in mixed or Windows style, start by that.
19292    new_path=`cmd //c echo $new_path`
19293
19294  input_path="$new_path"
19295  # Check if we need to convert this using DOS-style short mode. If the path
19296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19297  # take no chances and rewrite it.
19298  # Note: m4 eats our [], so we need to use [ and ] instead.
19299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19300  if test "x$has_forbidden_chars" != x; then
19301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19303  fi
19304
19305    # Output is in $new_path
19306
19307  windows_path="$new_path"
19308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19309    unix_path=`$CYGPATH -u "$windows_path"`
19310    new_path="$unix_path"
19311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19313    new_path="$unix_path"
19314  fi
19315
19316    # remove trailing .exe if any
19317    new_path="${new_path/%.exe/}"
19318
19319    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19320    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19321  fi
19322
19323  else
19324    # We're on a posix platform. Hooray! :)
19325    # First separate the path from the arguments. This will split at the first
19326    # space.
19327    complete="$PROPER_COMPILER_CC"
19328    path="${complete%% *}"
19329    tmp="$complete EOL"
19330    arguments="${tmp#* }"
19331
19332    # Cannot rely on the command "which" here since it doesn't always work.
19333    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19334    if test -z "$is_absolute_path"; then
19335      # Path to executable is not absolute. Find it.
19336      IFS_save="$IFS"
19337      IFS=:
19338      for p in $PATH; do
19339        if test -f "$p/$path" && test -x "$p/$path"; then
19340          new_path="$p/$path"
19341          break
19342        fi
19343      done
19344      IFS="$IFS_save"
19345    else
19346      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19347$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19348      new_path="$path"
19349    fi
19350
19351    if test "x$new_path" = x; then
19352        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19353$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19354        has_space=`$ECHO "$complete" | $GREP " "`
19355        if test "x$has_space" != x; then
19356          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19357$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19358        fi
19359        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19360      fi
19361  fi
19362
19363      # Now join together the path and the arguments once again
19364      if test "x$arguments" != xEOL; then
19365        new_complete="$new_path ${arguments% *}"
19366      else
19367        new_complete="$new_path"
19368      fi
19369
19370  if test "x$complete" != "x$new_complete"; then
19371      PROPER_COMPILER_CC="$new_complete"
19372      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19373$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19374    fi
19375
19376    PATH="$RETRY_COMPILER_SAVED_PATH"
19377
19378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19379$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19380
19381    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19382        # Follow a chain of symbolic links. Use readlink
19383        # where it exists, else fall back to horribly
19384        # complicated shell code.
19385        if test "x$READLINK_TESTED" != yes; then
19386            # On MacOSX there is a readlink tool with a different
19387            # purpose than the GNU readlink tool. Check the found readlink.
19388            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19389            if test "x$ISGNU" = x; then
19390                 # A readlink that we do not know how to use.
19391                 # Are there other non-GNU readlinks out there?
19392                 READLINK_TESTED=yes
19393                 READLINK=
19394            fi
19395        fi
19396
19397        if test "x$READLINK" != x; then
19398            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19399        else
19400            # Save the current directory for restoring afterwards
19401            STARTDIR=$PWD
19402            COUNTER=0
19403            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19404            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19405            # Use the system pwd and not the shell builtin to resolve directory symlinks
19406            cd $sym_link_dir
19407            cd `$THEPWDCMD`
19408            sym_link_dir=`$THEPWDCMD`
19409            # Resolve file symlinks
19410            while test $COUNTER -lt 20; do
19411                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19412                if test "x$ISLINK" == x; then
19413                    # This is not a symbolic link! We are done!
19414                    break
19415                fi
19416                # Again resolve directory symlinks since the target of the just found
19417                # link could be in a different directory
19418                cd `$DIRNAME $ISLINK`
19419                sym_link_dir=`$THEPWDCMD`
19420                sym_link_file=`$BASENAME $ISLINK`
19421                let COUNTER=COUNTER+1
19422            done
19423            cd $STARTDIR
19424            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19425        fi
19426    fi
19427
19428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19429$as_echo "$PROPER_COMPILER_CC" >&6; }
19430    CC="$PROPER_COMPILER_CC"
19431  else
19432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19433$as_echo "no, keeping CC" >&6; }
19434    CC="$TEST_COMPILER"
19435  fi
19436
19437  COMPILER=$CC
19438  COMPILER_NAME=$COMPILER_NAME
19439
19440  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19441    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19442    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19443    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19444    if test $? -ne 0; then
19445      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19446
19447      { $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
19448$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19449      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19450$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19451      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19452    else
19453      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19454      COMPILER_VENDOR="Sun Studio"
19455    fi
19456  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19457    # First line typically looks something like:
19458    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19459    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19460    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19461    COMPILER_VENDOR="Microsoft CL.EXE"
19462    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19463    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19464      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19465        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19466      fi
19467    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19468      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19469        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19470      fi
19471    fi
19472  else
19473    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19474    # Check that this is likely to be GCC.
19475    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19476    if test $? -ne 0; then
19477      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19478$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19479      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19480$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19481      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19482    fi
19483
19484    # First line typically looks something like:
19485    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19486    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19487    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19488  fi
19489  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19490  CC_VERSION="$COMPILER_VERSION"
19491  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19492  CC_VENDOR="$COMPILER_VENDOR"
19493
19494  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19495$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19496
19497
19498# Now that we have resolved CC ourself, let autoconf have it's go at it
19499ac_ext=c
19500ac_cpp='$CPP $CPPFLAGS'
19501ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19502ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19503ac_compiler_gnu=$ac_cv_c_compiler_gnu
19504if test -n "$ac_tool_prefix"; then
19505  for ac_prog in $CC
19506  do
19507    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19508set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19510$as_echo_n "checking for $ac_word... " >&6; }
19511if test "${ac_cv_prog_CC+set}" = set; then :
19512  $as_echo_n "(cached) " >&6
19513else
19514  if test -n "$CC"; then
19515  ac_cv_prog_CC="$CC" # Let the user override the test.
19516else
19517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19518for as_dir in $PATH
19519do
19520  IFS=$as_save_IFS
19521  test -z "$as_dir" && as_dir=.
19522    for ac_exec_ext in '' $ac_executable_extensions; do
19523  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19524    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19526    break 2
19527  fi
19528done
19529  done
19530IFS=$as_save_IFS
19531
19532fi
19533fi
19534CC=$ac_cv_prog_CC
19535if test -n "$CC"; then
19536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19537$as_echo "$CC" >&6; }
19538else
19539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19540$as_echo "no" >&6; }
19541fi
19542
19543
19544    test -n "$CC" && break
19545  done
19546fi
19547if test -z "$CC"; then
19548  ac_ct_CC=$CC
19549  for ac_prog in $CC
19550do
19551  # Extract the first word of "$ac_prog", so it can be a program name with args.
19552set dummy $ac_prog; ac_word=$2
19553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19554$as_echo_n "checking for $ac_word... " >&6; }
19555if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19556  $as_echo_n "(cached) " >&6
19557else
19558  if test -n "$ac_ct_CC"; then
19559  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19560else
19561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19562for as_dir in $PATH
19563do
19564  IFS=$as_save_IFS
19565  test -z "$as_dir" && as_dir=.
19566    for ac_exec_ext in '' $ac_executable_extensions; do
19567  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19568    ac_cv_prog_ac_ct_CC="$ac_prog"
19569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19570    break 2
19571  fi
19572done
19573  done
19574IFS=$as_save_IFS
19575
19576fi
19577fi
19578ac_ct_CC=$ac_cv_prog_ac_ct_CC
19579if test -n "$ac_ct_CC"; then
19580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19581$as_echo "$ac_ct_CC" >&6; }
19582else
19583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19584$as_echo "no" >&6; }
19585fi
19586
19587
19588  test -n "$ac_ct_CC" && break
19589done
19590
19591  if test "x$ac_ct_CC" = x; then
19592    CC=""
19593  else
19594    case $cross_compiling:$ac_tool_warned in
19595yes:)
19596{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19597$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19598ac_tool_warned=yes ;;
19599esac
19600    CC=$ac_ct_CC
19601  fi
19602fi
19603
19604
19605test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19607as_fn_error $? "no acceptable C compiler found in \$PATH
19608See \`config.log' for more details" "$LINENO" 5 ; }
19609
19610# Provide some information about the compiler.
19611$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19612set X $ac_compile
19613ac_compiler=$2
19614for ac_option in --version -v -V -qversion; do
19615  { { ac_try="$ac_compiler $ac_option >&5"
19616case "(($ac_try" in
19617  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19618  *) ac_try_echo=$ac_try;;
19619esac
19620eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19621$as_echo "$ac_try_echo"; } >&5
19622  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19623  ac_status=$?
19624  if test -s conftest.err; then
19625    sed '10a\
19626... rest of stderr output deleted ...
19627         10q' conftest.err >conftest.er1
19628    cat conftest.er1 >&5
19629  fi
19630  rm -f conftest.er1 conftest.err
19631  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19632  test $ac_status = 0; }
19633done
19634
19635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19636/* end confdefs.h.  */
19637
19638int
19639main ()
19640{
19641
19642  ;
19643  return 0;
19644}
19645_ACEOF
19646ac_clean_files_save=$ac_clean_files
19647ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19648# Try to create an executable without -o first, disregard a.out.
19649# It will help us diagnose broken compilers, and finding out an intuition
19650# of exeext.
19651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19652$as_echo_n "checking whether the C compiler works... " >&6; }
19653ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19654
19655# The possible output files:
19656ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19657
19658ac_rmfiles=
19659for ac_file in $ac_files
19660do
19661  case $ac_file in
19662    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19663    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19664  esac
19665done
19666rm -f $ac_rmfiles
19667
19668if { { ac_try="$ac_link_default"
19669case "(($ac_try" in
19670  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19671  *) ac_try_echo=$ac_try;;
19672esac
19673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19674$as_echo "$ac_try_echo"; } >&5
19675  (eval "$ac_link_default") 2>&5
19676  ac_status=$?
19677  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19678  test $ac_status = 0; }; then :
19679  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19680# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19681# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19682# so that the user can short-circuit this test for compilers unknown to
19683# Autoconf.
19684for ac_file in $ac_files ''
19685do
19686  test -f "$ac_file" || continue
19687  case $ac_file in
19688    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19689	;;
19690    [ab].out )
19691	# We found the default executable, but exeext='' is most
19692	# certainly right.
19693	break;;
19694    *.* )
19695	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19696	then :; else
19697	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19698	fi
19699	# We set ac_cv_exeext here because the later test for it is not
19700	# safe: cross compilers may not add the suffix if given an `-o'
19701	# argument, so we may need to know it at that point already.
19702	# Even if this section looks crufty: it has the advantage of
19703	# actually working.
19704	break;;
19705    * )
19706	break;;
19707  esac
19708done
19709test "$ac_cv_exeext" = no && ac_cv_exeext=
19710
19711else
19712  ac_file=''
19713fi
19714if test -z "$ac_file"; then :
19715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19716$as_echo "no" >&6; }
19717$as_echo "$as_me: failed program was:" >&5
19718sed 's/^/| /' conftest.$ac_ext >&5
19719
19720{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19722as_fn_error 77 "C compiler cannot create executables
19723See \`config.log' for more details" "$LINENO" 5 ; }
19724else
19725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19726$as_echo "yes" >&6; }
19727fi
19728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19729$as_echo_n "checking for C compiler default output file name... " >&6; }
19730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19731$as_echo "$ac_file" >&6; }
19732ac_exeext=$ac_cv_exeext
19733
19734rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19735ac_clean_files=$ac_clean_files_save
19736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19737$as_echo_n "checking for suffix of executables... " >&6; }
19738if { { ac_try="$ac_link"
19739case "(($ac_try" in
19740  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19741  *) ac_try_echo=$ac_try;;
19742esac
19743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19744$as_echo "$ac_try_echo"; } >&5
19745  (eval "$ac_link") 2>&5
19746  ac_status=$?
19747  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19748  test $ac_status = 0; }; then :
19749  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19750# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19751# work properly (i.e., refer to `conftest.exe'), while it won't with
19752# `rm'.
19753for ac_file in conftest.exe conftest conftest.*; do
19754  test -f "$ac_file" || continue
19755  case $ac_file in
19756    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19757    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19758	  break;;
19759    * ) break;;
19760  esac
19761done
19762else
19763  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19765as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19766See \`config.log' for more details" "$LINENO" 5 ; }
19767fi
19768rm -f conftest conftest$ac_cv_exeext
19769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19770$as_echo "$ac_cv_exeext" >&6; }
19771
19772rm -f conftest.$ac_ext
19773EXEEXT=$ac_cv_exeext
19774ac_exeext=$EXEEXT
19775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19776/* end confdefs.h.  */
19777#include <stdio.h>
19778int
19779main ()
19780{
19781FILE *f = fopen ("conftest.out", "w");
19782 return ferror (f) || fclose (f) != 0;
19783
19784  ;
19785  return 0;
19786}
19787_ACEOF
19788ac_clean_files="$ac_clean_files conftest.out"
19789# Check that the compiler produces executables we can run.  If not, either
19790# the compiler is broken, or we cross compile.
19791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19792$as_echo_n "checking whether we are cross compiling... " >&6; }
19793if test "$cross_compiling" != yes; then
19794  { { ac_try="$ac_link"
19795case "(($ac_try" in
19796  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19797  *) ac_try_echo=$ac_try;;
19798esac
19799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19800$as_echo "$ac_try_echo"; } >&5
19801  (eval "$ac_link") 2>&5
19802  ac_status=$?
19803  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19804  test $ac_status = 0; }
19805  if { ac_try='./conftest$ac_cv_exeext'
19806  { { case "(($ac_try" in
19807  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19808  *) ac_try_echo=$ac_try;;
19809esac
19810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19811$as_echo "$ac_try_echo"; } >&5
19812  (eval "$ac_try") 2>&5
19813  ac_status=$?
19814  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19815  test $ac_status = 0; }; }; then
19816    cross_compiling=no
19817  else
19818    if test "$cross_compiling" = maybe; then
19819	cross_compiling=yes
19820    else
19821	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19823as_fn_error $? "cannot run C compiled programs.
19824If you meant to cross compile, use \`--host'.
19825See \`config.log' for more details" "$LINENO" 5 ; }
19826    fi
19827  fi
19828fi
19829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19830$as_echo "$cross_compiling" >&6; }
19831
19832rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19833ac_clean_files=$ac_clean_files_save
19834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19835$as_echo_n "checking for suffix of object files... " >&6; }
19836if test "${ac_cv_objext+set}" = set; then :
19837  $as_echo_n "(cached) " >&6
19838else
19839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19840/* end confdefs.h.  */
19841
19842int
19843main ()
19844{
19845
19846  ;
19847  return 0;
19848}
19849_ACEOF
19850rm -f conftest.o conftest.obj
19851if { { ac_try="$ac_compile"
19852case "(($ac_try" in
19853  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19854  *) ac_try_echo=$ac_try;;
19855esac
19856eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19857$as_echo "$ac_try_echo"; } >&5
19858  (eval "$ac_compile") 2>&5
19859  ac_status=$?
19860  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19861  test $ac_status = 0; }; then :
19862  for ac_file in conftest.o conftest.obj conftest.*; do
19863  test -f "$ac_file" || continue;
19864  case $ac_file in
19865    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19866    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19867       break;;
19868  esac
19869done
19870else
19871  $as_echo "$as_me: failed program was:" >&5
19872sed 's/^/| /' conftest.$ac_ext >&5
19873
19874{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19876as_fn_error $? "cannot compute suffix of object files: cannot compile
19877See \`config.log' for more details" "$LINENO" 5 ; }
19878fi
19879rm -f conftest.$ac_cv_objext conftest.$ac_ext
19880fi
19881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19882$as_echo "$ac_cv_objext" >&6; }
19883OBJEXT=$ac_cv_objext
19884ac_objext=$OBJEXT
19885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19886$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19887if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19888  $as_echo_n "(cached) " >&6
19889else
19890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19891/* end confdefs.h.  */
19892
19893int
19894main ()
19895{
19896#ifndef __GNUC__
19897       choke me
19898#endif
19899
19900  ;
19901  return 0;
19902}
19903_ACEOF
19904if ac_fn_c_try_compile "$LINENO"; then :
19905  ac_compiler_gnu=yes
19906else
19907  ac_compiler_gnu=no
19908fi
19909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19910ac_cv_c_compiler_gnu=$ac_compiler_gnu
19911
19912fi
19913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19914$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19915if test $ac_compiler_gnu = yes; then
19916  GCC=yes
19917else
19918  GCC=
19919fi
19920ac_test_CFLAGS=${CFLAGS+set}
19921ac_save_CFLAGS=$CFLAGS
19922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19923$as_echo_n "checking whether $CC accepts -g... " >&6; }
19924if test "${ac_cv_prog_cc_g+set}" = set; then :
19925  $as_echo_n "(cached) " >&6
19926else
19927  ac_save_c_werror_flag=$ac_c_werror_flag
19928   ac_c_werror_flag=yes
19929   ac_cv_prog_cc_g=no
19930   CFLAGS="-g"
19931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19932/* end confdefs.h.  */
19933
19934int
19935main ()
19936{
19937
19938  ;
19939  return 0;
19940}
19941_ACEOF
19942if ac_fn_c_try_compile "$LINENO"; then :
19943  ac_cv_prog_cc_g=yes
19944else
19945  CFLAGS=""
19946      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19947/* end confdefs.h.  */
19948
19949int
19950main ()
19951{
19952
19953  ;
19954  return 0;
19955}
19956_ACEOF
19957if ac_fn_c_try_compile "$LINENO"; then :
19958
19959else
19960  ac_c_werror_flag=$ac_save_c_werror_flag
19961	 CFLAGS="-g"
19962	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19963/* end confdefs.h.  */
19964
19965int
19966main ()
19967{
19968
19969  ;
19970  return 0;
19971}
19972_ACEOF
19973if ac_fn_c_try_compile "$LINENO"; then :
19974  ac_cv_prog_cc_g=yes
19975fi
19976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19977fi
19978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19979fi
19980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19981   ac_c_werror_flag=$ac_save_c_werror_flag
19982fi
19983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19984$as_echo "$ac_cv_prog_cc_g" >&6; }
19985if test "$ac_test_CFLAGS" = set; then
19986  CFLAGS=$ac_save_CFLAGS
19987elif test $ac_cv_prog_cc_g = yes; then
19988  if test "$GCC" = yes; then
19989    CFLAGS="-g -O2"
19990  else
19991    CFLAGS="-g"
19992  fi
19993else
19994  if test "$GCC" = yes; then
19995    CFLAGS="-O2"
19996  else
19997    CFLAGS=
19998  fi
19999fi
20000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20001$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20002if test "${ac_cv_prog_cc_c89+set}" = set; then :
20003  $as_echo_n "(cached) " >&6
20004else
20005  ac_cv_prog_cc_c89=no
20006ac_save_CC=$CC
20007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20008/* end confdefs.h.  */
20009#include <stdarg.h>
20010#include <stdio.h>
20011#include <sys/types.h>
20012#include <sys/stat.h>
20013/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20014struct buf { int x; };
20015FILE * (*rcsopen) (struct buf *, struct stat *, int);
20016static char *e (p, i)
20017     char **p;
20018     int i;
20019{
20020  return p[i];
20021}
20022static char *f (char * (*g) (char **, int), char **p, ...)
20023{
20024  char *s;
20025  va_list v;
20026  va_start (v,p);
20027  s = g (p, va_arg (v,int));
20028  va_end (v);
20029  return s;
20030}
20031
20032/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20033   function prototypes and stuff, but not '\xHH' hex character constants.
20034   These don't provoke an error unfortunately, instead are silently treated
20035   as 'x'.  The following induces an error, until -std is added to get
20036   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20037   array size at least.  It's necessary to write '\x00'==0 to get something
20038   that's true only with -std.  */
20039int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20040
20041/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20042   inside strings and character constants.  */
20043#define FOO(x) 'x'
20044int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20045
20046int test (int i, double x);
20047struct s1 {int (*f) (int a);};
20048struct s2 {int (*f) (double a);};
20049int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20050int argc;
20051char **argv;
20052int
20053main ()
20054{
20055return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20056  ;
20057  return 0;
20058}
20059_ACEOF
20060for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20061	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20062do
20063  CC="$ac_save_CC $ac_arg"
20064  if ac_fn_c_try_compile "$LINENO"; then :
20065  ac_cv_prog_cc_c89=$ac_arg
20066fi
20067rm -f core conftest.err conftest.$ac_objext
20068  test "x$ac_cv_prog_cc_c89" != "xno" && break
20069done
20070rm -f conftest.$ac_ext
20071CC=$ac_save_CC
20072
20073fi
20074# AC_CACHE_VAL
20075case "x$ac_cv_prog_cc_c89" in
20076  x)
20077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20078$as_echo "none needed" >&6; } ;;
20079  xno)
20080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20081$as_echo "unsupported" >&6; } ;;
20082  *)
20083    CC="$CC $ac_cv_prog_cc_c89"
20084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20085$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20086esac
20087if test "x$ac_cv_prog_cc_c89" != xno; then :
20088
20089fi
20090
20091ac_ext=cpp
20092ac_cpp='$CXXCPP $CPPFLAGS'
20093ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20094ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20095ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20096
20097
20098### Locate C++ compiler (CXX)
20099
20100if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20101  # Do not probe for CC on MacOSX.
20102  COMPILER_CHECK_LIST="cl g++"
20103else
20104  COMPILER_CHECK_LIST="cl CC g++"
20105fi
20106
20107  COMPILER_NAME=C++
20108
20109  CXX=
20110  # If TOOLS_DIR is set, check for all compiler names in there first
20111  # before checking the rest of the PATH.
20112  if test -n "$TOOLS_DIR"; then
20113    PATH_save="$PATH"
20114    PATH="$TOOLS_DIR"
20115    for ac_prog in $COMPILER_CHECK_LIST
20116do
20117  # Extract the first word of "$ac_prog", so it can be a program name with args.
20118set dummy $ac_prog; ac_word=$2
20119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20120$as_echo_n "checking for $ac_word... " >&6; }
20121if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20122  $as_echo_n "(cached) " >&6
20123else
20124  case $TOOLS_DIR_CXX in
20125  [\\/]* | ?:[\\/]*)
20126  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20127  ;;
20128  *)
20129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20130for as_dir in $PATH
20131do
20132  IFS=$as_save_IFS
20133  test -z "$as_dir" && as_dir=.
20134    for ac_exec_ext in '' $ac_executable_extensions; do
20135  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20136    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20138    break 2
20139  fi
20140done
20141  done
20142IFS=$as_save_IFS
20143
20144  ;;
20145esac
20146fi
20147TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20148if test -n "$TOOLS_DIR_CXX"; then
20149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20150$as_echo "$TOOLS_DIR_CXX" >&6; }
20151else
20152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20153$as_echo "no" >&6; }
20154fi
20155
20156
20157  test -n "$TOOLS_DIR_CXX" && break
20158done
20159
20160    CXX=$TOOLS_DIR_CXX
20161    PATH="$PATH_save"
20162  fi
20163
20164  # AC_PATH_PROGS can't be run multiple times with the same variable,
20165  # so create a new name for this run.
20166  if test "x$CXX" = x; then
20167    for ac_prog in $COMPILER_CHECK_LIST
20168do
20169  # Extract the first word of "$ac_prog", so it can be a program name with args.
20170set dummy $ac_prog; ac_word=$2
20171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20172$as_echo_n "checking for $ac_word... " >&6; }
20173if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20174  $as_echo_n "(cached) " >&6
20175else
20176  case $POTENTIAL_CXX in
20177  [\\/]* | ?:[\\/]*)
20178  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20179  ;;
20180  *)
20181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20182for as_dir in $PATH
20183do
20184  IFS=$as_save_IFS
20185  test -z "$as_dir" && as_dir=.
20186    for ac_exec_ext in '' $ac_executable_extensions; do
20187  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20188    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20190    break 2
20191  fi
20192done
20193  done
20194IFS=$as_save_IFS
20195
20196  ;;
20197esac
20198fi
20199POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20200if test -n "$POTENTIAL_CXX"; then
20201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20202$as_echo "$POTENTIAL_CXX" >&6; }
20203else
20204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20205$as_echo "no" >&6; }
20206fi
20207
20208
20209  test -n "$POTENTIAL_CXX" && break
20210done
20211
20212    CXX=$POTENTIAL_CXX
20213  fi
20214
20215  if test "x$CXX" = x; then
20216
20217    # Print a helpful message on how to acquire the necessary build dependency.
20218    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20219    MISSING_DEPENDENCY=devkit
20220    PKGHANDLER_COMMAND=
20221
20222    case $PKGHANDLER in
20223	apt-get)
20224                apt_help     $MISSING_DEPENDENCY ;;
20225    yum)
20226                yum_help     $MISSING_DEPENDENCY ;;
20227	port)
20228                port_help    $MISSING_DEPENDENCY ;;
20229	pkgutil)
20230                pkgutil_help $MISSING_DEPENDENCY ;;
20231	pkgadd)
20232                pkgadd_help  $MISSING_DEPENDENCY ;;
20233    * )
20234      break ;;
20235    esac
20236
20237    if test "x$PKGHANDLER_COMMAND" != x; then
20238        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20239    fi
20240
20241      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20242  fi
20243
20244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20245
20246  # First separate the path from the arguments. This will split at the first
20247  # space.
20248  complete="$CXX"
20249  path="${complete%% *}"
20250  tmp="$complete EOL"
20251  arguments="${tmp#* }"
20252
20253  # Input might be given as Windows format, start by converting to
20254  # unix format.
20255  new_path=`$CYGPATH -u "$path"`
20256
20257  # Now try to locate executable using which
20258  new_path=`$WHICH "$new_path" 2> /dev/null`
20259  # bat and cmd files are not always considered executable in cygwin causing which
20260  # to not find them
20261  if test "x$new_path" = x \
20262           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20263           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20264    new_path=`$CYGPATH -u "$path"`
20265  fi
20266  if test "x$new_path" = x; then
20267    # Oops. Which didn't find the executable.
20268    # The splitting of arguments from the executable at a space might have been incorrect,
20269    # since paths with space are more likely in Windows. Give it another try with the whole
20270    # argument.
20271    path="$complete"
20272    arguments="EOL"
20273    new_path=`$CYGPATH -u "$path"`
20274    new_path=`$WHICH "$new_path" 2> /dev/null`
20275    # bat and cmd files are not always considered executable in cygwin causing which
20276    # to not find them
20277    if test "x$new_path" = x \
20278             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20279             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20280      new_path=`$CYGPATH -u "$path"`
20281    fi
20282    if test "x$new_path" = x; then
20283      # It's still not found. Now this is an unrecoverable error.
20284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20285$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20286      has_space=`$ECHO "$complete" | $GREP " "`
20287      if test "x$has_space" != x; then
20288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20290      fi
20291      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20292    fi
20293  fi
20294
20295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20298  # "foo.exe" is OK but "foo" is an error.
20299  #
20300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20301  # It is also a way to make sure we got the proper file name for the real test later on.
20302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20303  if test "x$test_shortpath" = x; then
20304    # Short path failed, file does not exist as specified.
20305    # Try adding .exe or .cmd
20306    if test -f "${new_path}.exe"; then
20307       input_to_shortpath="${new_path}.exe"
20308    elif test -f "${new_path}.cmd"; then
20309       input_to_shortpath="${new_path}.cmd"
20310    else
20311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20312$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20315      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20316    fi
20317  else
20318    input_to_shortpath="$new_path"
20319  fi
20320
20321  # Call helper function which possibly converts this using DOS-style short mode.
20322  # If so, the updated path is stored in $new_path.
20323  new_path="$input_to_shortpath"
20324
20325  input_path="$input_to_shortpath"
20326  # Check if we need to convert this using DOS-style short mode. If the path
20327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20328  # take no chances and rewrite it.
20329  # Note: m4 eats our [], so we need to use [ and ] instead.
20330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20331  if test "x$has_forbidden_chars" != x; then
20332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20336      # Going to short mode and back again did indeed matter. Since short mode is
20337      # case insensitive, let's make it lowercase to improve readability.
20338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20339      # Now convert it back to Unix-stile (cygpath)
20340      input_path=`$CYGPATH -u "$shortmode_path"`
20341      new_path="$input_path"
20342    fi
20343  fi
20344
20345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20346  if test "x$test_cygdrive_prefix" = x; then
20347    # As a simple fix, exclude /usr/bin since it's not a real path.
20348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20350      # a path prefixed by /cygdrive for fixpath to work.
20351      new_path="$CYGWIN_ROOT_PATH$input_path"
20352    fi
20353  fi
20354
20355  # remove trailing .exe if any
20356  new_path="${new_path/%.exe/}"
20357
20358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20359
20360  # First separate the path from the arguments. This will split at the first
20361  # space.
20362  complete="$CXX"
20363  path="${complete%% *}"
20364  tmp="$complete EOL"
20365  arguments="${tmp#* }"
20366
20367  # Input might be given as Windows format, start by converting to
20368  # unix format.
20369  new_path="$path"
20370
20371  windows_path="$new_path"
20372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20373    unix_path=`$CYGPATH -u "$windows_path"`
20374    new_path="$unix_path"
20375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20377    new_path="$unix_path"
20378  fi
20379
20380
20381  # Now try to locate executable using which
20382  new_path=`$WHICH "$new_path" 2> /dev/null`
20383
20384  if test "x$new_path" = x; then
20385    # Oops. Which didn't find the executable.
20386    # The splitting of arguments from the executable at a space might have been incorrect,
20387    # since paths with space are more likely in Windows. Give it another try with the whole
20388    # argument.
20389    path="$complete"
20390    arguments="EOL"
20391    new_path="$path"
20392
20393  windows_path="$new_path"
20394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20395    unix_path=`$CYGPATH -u "$windows_path"`
20396    new_path="$unix_path"
20397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20399    new_path="$unix_path"
20400  fi
20401
20402
20403    new_path=`$WHICH "$new_path" 2> /dev/null`
20404
20405    if test "x$new_path" = x; then
20406      # It's still not found. Now this is an unrecoverable error.
20407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20408$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20409      has_space=`$ECHO "$complete" | $GREP " "`
20410      if test "x$has_space" != x; then
20411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20413      fi
20414      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20415    fi
20416  fi
20417
20418  # Now new_path has a complete unix path to the binary
20419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20420    # Keep paths in /bin as-is, but remove trailing .exe if any
20421    new_path="${new_path/%.exe/}"
20422    # Do not save /bin paths to all_fixpath_prefixes!
20423  else
20424    # Not in mixed or Windows style, start by that.
20425    new_path=`cmd //c echo $new_path`
20426
20427  input_path="$new_path"
20428  # Check if we need to convert this using DOS-style short mode. If the path
20429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20430  # take no chances and rewrite it.
20431  # Note: m4 eats our [], so we need to use [ and ] instead.
20432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20433  if test "x$has_forbidden_chars" != x; then
20434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20436  fi
20437
20438    # Output is in $new_path
20439
20440  windows_path="$new_path"
20441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20442    unix_path=`$CYGPATH -u "$windows_path"`
20443    new_path="$unix_path"
20444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20446    new_path="$unix_path"
20447  fi
20448
20449    # remove trailing .exe if any
20450    new_path="${new_path/%.exe/}"
20451
20452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20454  fi
20455
20456  else
20457    # We're on a posix platform. Hooray! :)
20458    # First separate the path from the arguments. This will split at the first
20459    # space.
20460    complete="$CXX"
20461    path="${complete%% *}"
20462    tmp="$complete EOL"
20463    arguments="${tmp#* }"
20464
20465    # Cannot rely on the command "which" here since it doesn't always work.
20466    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20467    if test -z "$is_absolute_path"; then
20468      # Path to executable is not absolute. Find it.
20469      IFS_save="$IFS"
20470      IFS=:
20471      for p in $PATH; do
20472        if test -f "$p/$path" && test -x "$p/$path"; then
20473          new_path="$p/$path"
20474          break
20475        fi
20476      done
20477      IFS="$IFS_save"
20478    else
20479      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20480$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20481      new_path="$path"
20482    fi
20483
20484    if test "x$new_path" = x; then
20485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20486$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20487        has_space=`$ECHO "$complete" | $GREP " "`
20488        if test "x$has_space" != x; then
20489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20491        fi
20492        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20493      fi
20494  fi
20495
20496      # Now join together the path and the arguments once again
20497      if test "x$arguments" != xEOL; then
20498        new_complete="$new_path ${arguments% *}"
20499      else
20500        new_complete="$new_path"
20501      fi
20502
20503  if test "x$complete" != "x$new_complete"; then
20504      CXX="$new_complete"
20505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20506$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20507    fi
20508
20509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20510$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20511  TEST_COMPILER="$CXX"
20512
20513    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20514        # Follow a chain of symbolic links. Use readlink
20515        # where it exists, else fall back to horribly
20516        # complicated shell code.
20517        if test "x$READLINK_TESTED" != yes; then
20518            # On MacOSX there is a readlink tool with a different
20519            # purpose than the GNU readlink tool. Check the found readlink.
20520            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20521            if test "x$ISGNU" = x; then
20522                 # A readlink that we do not know how to use.
20523                 # Are there other non-GNU readlinks out there?
20524                 READLINK_TESTED=yes
20525                 READLINK=
20526            fi
20527        fi
20528
20529        if test "x$READLINK" != x; then
20530            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20531        else
20532            # Save the current directory for restoring afterwards
20533            STARTDIR=$PWD
20534            COUNTER=0
20535            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20536            sym_link_file=`$BASENAME $TEST_COMPILER`
20537            # Use the system pwd and not the shell builtin to resolve directory symlinks
20538            cd $sym_link_dir
20539            cd `$THEPWDCMD`
20540            sym_link_dir=`$THEPWDCMD`
20541            # Resolve file symlinks
20542            while test $COUNTER -lt 20; do
20543                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20544                if test "x$ISLINK" == x; then
20545                    # This is not a symbolic link! We are done!
20546                    break
20547                fi
20548                # Again resolve directory symlinks since the target of the just found
20549                # link could be in a different directory
20550                cd `$DIRNAME $ISLINK`
20551                sym_link_dir=`$THEPWDCMD`
20552                sym_link_file=`$BASENAME $ISLINK`
20553                let COUNTER=COUNTER+1
20554            done
20555            cd $STARTDIR
20556            TEST_COMPILER=$sym_link_dir/$sym_link_file
20557        fi
20558    fi
20559
20560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20561$as_echo "$TEST_COMPILER" >&6; }
20562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20563$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20564
20565  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20566  if test "x$COMPILER_BASENAME" = "xccache"; then
20567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20568$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20569    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20570    # We want to control ccache invocation ourselves, so ignore this cc and try
20571    # searching again.
20572
20573    # Remove the path to the fake ccache cc from the PATH
20574    RETRY_COMPILER_SAVED_PATH="$PATH"
20575    COMPILER_DIRNAME=`$DIRNAME $CXX`
20576    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20577
20578    # Try again looking for our compiler
20579    if test -n "$ac_tool_prefix"; then
20580  for ac_prog in $COMPILER_CHECK_LIST
20581  do
20582    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20583set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20585$as_echo_n "checking for $ac_word... " >&6; }
20586if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20587  $as_echo_n "(cached) " >&6
20588else
20589  if test -n "$PROPER_COMPILER_CXX"; then
20590  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20591else
20592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20593for as_dir in $PATH
20594do
20595  IFS=$as_save_IFS
20596  test -z "$as_dir" && as_dir=.
20597    for ac_exec_ext in '' $ac_executable_extensions; do
20598  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20599    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20601    break 2
20602  fi
20603done
20604  done
20605IFS=$as_save_IFS
20606
20607fi
20608fi
20609PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20610if test -n "$PROPER_COMPILER_CXX"; then
20611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20612$as_echo "$PROPER_COMPILER_CXX" >&6; }
20613else
20614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20615$as_echo "no" >&6; }
20616fi
20617
20618
20619    test -n "$PROPER_COMPILER_CXX" && break
20620  done
20621fi
20622if test -z "$PROPER_COMPILER_CXX"; then
20623  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20624  for ac_prog in $COMPILER_CHECK_LIST
20625do
20626  # Extract the first word of "$ac_prog", so it can be a program name with args.
20627set dummy $ac_prog; ac_word=$2
20628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20629$as_echo_n "checking for $ac_word... " >&6; }
20630if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20631  $as_echo_n "(cached) " >&6
20632else
20633  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20634  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20635else
20636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20637for as_dir in $PATH
20638do
20639  IFS=$as_save_IFS
20640  test -z "$as_dir" && as_dir=.
20641    for ac_exec_ext in '' $ac_executable_extensions; do
20642  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20643    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20645    break 2
20646  fi
20647done
20648  done
20649IFS=$as_save_IFS
20650
20651fi
20652fi
20653ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20654if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20656$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20657else
20658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20659$as_echo "no" >&6; }
20660fi
20661
20662
20663  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20664done
20665
20666  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20667    PROPER_COMPILER_CXX=""
20668  else
20669    case $cross_compiling:$ac_tool_warned in
20670yes:)
20671{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20672$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20673ac_tool_warned=yes ;;
20674esac
20675    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20676  fi
20677fi
20678
20679
20680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20681
20682  # First separate the path from the arguments. This will split at the first
20683  # space.
20684  complete="$PROPER_COMPILER_CXX"
20685  path="${complete%% *}"
20686  tmp="$complete EOL"
20687  arguments="${tmp#* }"
20688
20689  # Input might be given as Windows format, start by converting to
20690  # unix format.
20691  new_path=`$CYGPATH -u "$path"`
20692
20693  # Now try to locate executable using which
20694  new_path=`$WHICH "$new_path" 2> /dev/null`
20695  # bat and cmd files are not always considered executable in cygwin causing which
20696  # to not find them
20697  if test "x$new_path" = x \
20698           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20699           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20700    new_path=`$CYGPATH -u "$path"`
20701  fi
20702  if test "x$new_path" = x; then
20703    # Oops. Which didn't find the executable.
20704    # The splitting of arguments from the executable at a space might have been incorrect,
20705    # since paths with space are more likely in Windows. Give it another try with the whole
20706    # argument.
20707    path="$complete"
20708    arguments="EOL"
20709    new_path=`$CYGPATH -u "$path"`
20710    new_path=`$WHICH "$new_path" 2> /dev/null`
20711    # bat and cmd files are not always considered executable in cygwin causing which
20712    # to not find them
20713    if test "x$new_path" = x \
20714             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20715             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20716      new_path=`$CYGPATH -u "$path"`
20717    fi
20718    if test "x$new_path" = x; then
20719      # It's still not found. Now this is an unrecoverable error.
20720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20721$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20722      has_space=`$ECHO "$complete" | $GREP " "`
20723      if test "x$has_space" != x; then
20724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20726      fi
20727      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20728    fi
20729  fi
20730
20731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20734  # "foo.exe" is OK but "foo" is an error.
20735  #
20736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20737  # It is also a way to make sure we got the proper file name for the real test later on.
20738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20739  if test "x$test_shortpath" = x; then
20740    # Short path failed, file does not exist as specified.
20741    # Try adding .exe or .cmd
20742    if test -f "${new_path}.exe"; then
20743       input_to_shortpath="${new_path}.exe"
20744    elif test -f "${new_path}.cmd"; then
20745       input_to_shortpath="${new_path}.cmd"
20746    else
20747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20748$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20751      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20752    fi
20753  else
20754    input_to_shortpath="$new_path"
20755  fi
20756
20757  # Call helper function which possibly converts this using DOS-style short mode.
20758  # If so, the updated path is stored in $new_path.
20759  new_path="$input_to_shortpath"
20760
20761  input_path="$input_to_shortpath"
20762  # Check if we need to convert this using DOS-style short mode. If the path
20763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20764  # take no chances and rewrite it.
20765  # Note: m4 eats our [], so we need to use [ and ] instead.
20766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20767  if test "x$has_forbidden_chars" != x; then
20768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20772      # Going to short mode and back again did indeed matter. Since short mode is
20773      # case insensitive, let's make it lowercase to improve readability.
20774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20775      # Now convert it back to Unix-stile (cygpath)
20776      input_path=`$CYGPATH -u "$shortmode_path"`
20777      new_path="$input_path"
20778    fi
20779  fi
20780
20781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20782  if test "x$test_cygdrive_prefix" = x; then
20783    # As a simple fix, exclude /usr/bin since it's not a real path.
20784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20786      # a path prefixed by /cygdrive for fixpath to work.
20787      new_path="$CYGWIN_ROOT_PATH$input_path"
20788    fi
20789  fi
20790
20791  # remove trailing .exe if any
20792  new_path="${new_path/%.exe/}"
20793
20794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20795
20796  # First separate the path from the arguments. This will split at the first
20797  # space.
20798  complete="$PROPER_COMPILER_CXX"
20799  path="${complete%% *}"
20800  tmp="$complete EOL"
20801  arguments="${tmp#* }"
20802
20803  # Input might be given as Windows format, start by converting to
20804  # unix format.
20805  new_path="$path"
20806
20807  windows_path="$new_path"
20808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20809    unix_path=`$CYGPATH -u "$windows_path"`
20810    new_path="$unix_path"
20811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20813    new_path="$unix_path"
20814  fi
20815
20816
20817  # Now try to locate executable using which
20818  new_path=`$WHICH "$new_path" 2> /dev/null`
20819
20820  if test "x$new_path" = x; then
20821    # Oops. Which didn't find the executable.
20822    # The splitting of arguments from the executable at a space might have been incorrect,
20823    # since paths with space are more likely in Windows. Give it another try with the whole
20824    # argument.
20825    path="$complete"
20826    arguments="EOL"
20827    new_path="$path"
20828
20829  windows_path="$new_path"
20830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20831    unix_path=`$CYGPATH -u "$windows_path"`
20832    new_path="$unix_path"
20833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20835    new_path="$unix_path"
20836  fi
20837
20838
20839    new_path=`$WHICH "$new_path" 2> /dev/null`
20840
20841    if test "x$new_path" = x; then
20842      # It's still not found. Now this is an unrecoverable error.
20843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20844$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20845      has_space=`$ECHO "$complete" | $GREP " "`
20846      if test "x$has_space" != x; then
20847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20849      fi
20850      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20851    fi
20852  fi
20853
20854  # Now new_path has a complete unix path to the binary
20855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20856    # Keep paths in /bin as-is, but remove trailing .exe if any
20857    new_path="${new_path/%.exe/}"
20858    # Do not save /bin paths to all_fixpath_prefixes!
20859  else
20860    # Not in mixed or Windows style, start by that.
20861    new_path=`cmd //c echo $new_path`
20862
20863  input_path="$new_path"
20864  # Check if we need to convert this using DOS-style short mode. If the path
20865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20866  # take no chances and rewrite it.
20867  # Note: m4 eats our [], so we need to use [ and ] instead.
20868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20869  if test "x$has_forbidden_chars" != x; then
20870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20872  fi
20873
20874    # Output is in $new_path
20875
20876  windows_path="$new_path"
20877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20878    unix_path=`$CYGPATH -u "$windows_path"`
20879    new_path="$unix_path"
20880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20882    new_path="$unix_path"
20883  fi
20884
20885    # remove trailing .exe if any
20886    new_path="${new_path/%.exe/}"
20887
20888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20890  fi
20891
20892  else
20893    # We're on a posix platform. Hooray! :)
20894    # First separate the path from the arguments. This will split at the first
20895    # space.
20896    complete="$PROPER_COMPILER_CXX"
20897    path="${complete%% *}"
20898    tmp="$complete EOL"
20899    arguments="${tmp#* }"
20900
20901    # Cannot rely on the command "which" here since it doesn't always work.
20902    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20903    if test -z "$is_absolute_path"; then
20904      # Path to executable is not absolute. Find it.
20905      IFS_save="$IFS"
20906      IFS=:
20907      for p in $PATH; do
20908        if test -f "$p/$path" && test -x "$p/$path"; then
20909          new_path="$p/$path"
20910          break
20911        fi
20912      done
20913      IFS="$IFS_save"
20914    else
20915      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20916$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20917      new_path="$path"
20918    fi
20919
20920    if test "x$new_path" = x; then
20921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20922$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20923        has_space=`$ECHO "$complete" | $GREP " "`
20924        if test "x$has_space" != x; then
20925          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20926$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20927        fi
20928        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20929      fi
20930  fi
20931
20932      # Now join together the path and the arguments once again
20933      if test "x$arguments" != xEOL; then
20934        new_complete="$new_path ${arguments% *}"
20935      else
20936        new_complete="$new_path"
20937      fi
20938
20939  if test "x$complete" != "x$new_complete"; then
20940      PROPER_COMPILER_CXX="$new_complete"
20941      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20942$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20943    fi
20944
20945    PATH="$RETRY_COMPILER_SAVED_PATH"
20946
20947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20948$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20949
20950    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20951        # Follow a chain of symbolic links. Use readlink
20952        # where it exists, else fall back to horribly
20953        # complicated shell code.
20954        if test "x$READLINK_TESTED" != yes; then
20955            # On MacOSX there is a readlink tool with a different
20956            # purpose than the GNU readlink tool. Check the found readlink.
20957            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20958            if test "x$ISGNU" = x; then
20959                 # A readlink that we do not know how to use.
20960                 # Are there other non-GNU readlinks out there?
20961                 READLINK_TESTED=yes
20962                 READLINK=
20963            fi
20964        fi
20965
20966        if test "x$READLINK" != x; then
20967            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20968        else
20969            # Save the current directory for restoring afterwards
20970            STARTDIR=$PWD
20971            COUNTER=0
20972            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20973            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20974            # Use the system pwd and not the shell builtin to resolve directory symlinks
20975            cd $sym_link_dir
20976            cd `$THEPWDCMD`
20977            sym_link_dir=`$THEPWDCMD`
20978            # Resolve file symlinks
20979            while test $COUNTER -lt 20; do
20980                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20981                if test "x$ISLINK" == x; then
20982                    # This is not a symbolic link! We are done!
20983                    break
20984                fi
20985                # Again resolve directory symlinks since the target of the just found
20986                # link could be in a different directory
20987                cd `$DIRNAME $ISLINK`
20988                sym_link_dir=`$THEPWDCMD`
20989                sym_link_file=`$BASENAME $ISLINK`
20990                let COUNTER=COUNTER+1
20991            done
20992            cd $STARTDIR
20993            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20994        fi
20995    fi
20996
20997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20998$as_echo "$PROPER_COMPILER_CXX" >&6; }
20999    CXX="$PROPER_COMPILER_CXX"
21000  else
21001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21002$as_echo "no, keeping CXX" >&6; }
21003    CXX="$TEST_COMPILER"
21004  fi
21005
21006  COMPILER=$CXX
21007  COMPILER_NAME=$COMPILER_NAME
21008
21009  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21010    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21011    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21012    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21013    if test $? -ne 0; then
21014      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21015
21016      { $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
21017$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21018      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21019$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21020      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21021    else
21022      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21023      COMPILER_VENDOR="Sun Studio"
21024    fi
21025  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21026    # First line typically looks something like:
21027    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21028    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21029    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21030    COMPILER_VENDOR="Microsoft CL.EXE"
21031    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21032    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21033      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21034        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21035      fi
21036    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21037      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21038        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21039      fi
21040    fi
21041  else
21042    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21043    # Check that this is likely to be GCC.
21044    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21045    if test $? -ne 0; then
21046      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21047$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21048      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21049$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21050      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21051    fi
21052
21053    # First line typically looks something like:
21054    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21055    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21056    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21057  fi
21058  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21059  CXX_VERSION="$COMPILER_VERSION"
21060  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21061  CXX_VENDOR="$COMPILER_VENDOR"
21062
21063  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21064$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21065
21066
21067# Now that we have resolved CXX ourself, let autoconf have it's go at it
21068ac_ext=cpp
21069ac_cpp='$CXXCPP $CPPFLAGS'
21070ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21071ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21072ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21073if test -z "$CXX"; then
21074  if test -n "$CCC"; then
21075    CXX=$CCC
21076  else
21077    if test -n "$ac_tool_prefix"; then
21078  for ac_prog in $CXX
21079  do
21080    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21083$as_echo_n "checking for $ac_word... " >&6; }
21084if test "${ac_cv_prog_CXX+set}" = set; then :
21085  $as_echo_n "(cached) " >&6
21086else
21087  if test -n "$CXX"; then
21088  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21089else
21090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21091for as_dir in $PATH
21092do
21093  IFS=$as_save_IFS
21094  test -z "$as_dir" && as_dir=.
21095    for ac_exec_ext in '' $ac_executable_extensions; do
21096  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21097    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21099    break 2
21100  fi
21101done
21102  done
21103IFS=$as_save_IFS
21104
21105fi
21106fi
21107CXX=$ac_cv_prog_CXX
21108if test -n "$CXX"; then
21109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21110$as_echo "$CXX" >&6; }
21111else
21112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21113$as_echo "no" >&6; }
21114fi
21115
21116
21117    test -n "$CXX" && break
21118  done
21119fi
21120if test -z "$CXX"; then
21121  ac_ct_CXX=$CXX
21122  for ac_prog in $CXX
21123do
21124  # Extract the first word of "$ac_prog", so it can be a program name with args.
21125set dummy $ac_prog; ac_word=$2
21126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21127$as_echo_n "checking for $ac_word... " >&6; }
21128if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21129  $as_echo_n "(cached) " >&6
21130else
21131  if test -n "$ac_ct_CXX"; then
21132  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21133else
21134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21135for as_dir in $PATH
21136do
21137  IFS=$as_save_IFS
21138  test -z "$as_dir" && as_dir=.
21139    for ac_exec_ext in '' $ac_executable_extensions; do
21140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21141    ac_cv_prog_ac_ct_CXX="$ac_prog"
21142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21143    break 2
21144  fi
21145done
21146  done
21147IFS=$as_save_IFS
21148
21149fi
21150fi
21151ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21152if test -n "$ac_ct_CXX"; then
21153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21154$as_echo "$ac_ct_CXX" >&6; }
21155else
21156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21157$as_echo "no" >&6; }
21158fi
21159
21160
21161  test -n "$ac_ct_CXX" && break
21162done
21163
21164  if test "x$ac_ct_CXX" = x; then
21165    CXX="g++"
21166  else
21167    case $cross_compiling:$ac_tool_warned in
21168yes:)
21169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21171ac_tool_warned=yes ;;
21172esac
21173    CXX=$ac_ct_CXX
21174  fi
21175fi
21176
21177  fi
21178fi
21179# Provide some information about the compiler.
21180$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21181set X $ac_compile
21182ac_compiler=$2
21183for ac_option in --version -v -V -qversion; do
21184  { { ac_try="$ac_compiler $ac_option >&5"
21185case "(($ac_try" in
21186  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21187  *) ac_try_echo=$ac_try;;
21188esac
21189eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21190$as_echo "$ac_try_echo"; } >&5
21191  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21192  ac_status=$?
21193  if test -s conftest.err; then
21194    sed '10a\
21195... rest of stderr output deleted ...
21196         10q' conftest.err >conftest.er1
21197    cat conftest.er1 >&5
21198  fi
21199  rm -f conftest.er1 conftest.err
21200  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21201  test $ac_status = 0; }
21202done
21203
21204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21205$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21206if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21207  $as_echo_n "(cached) " >&6
21208else
21209  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21210/* end confdefs.h.  */
21211
21212int
21213main ()
21214{
21215#ifndef __GNUC__
21216       choke me
21217#endif
21218
21219  ;
21220  return 0;
21221}
21222_ACEOF
21223if ac_fn_cxx_try_compile "$LINENO"; then :
21224  ac_compiler_gnu=yes
21225else
21226  ac_compiler_gnu=no
21227fi
21228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21229ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21230
21231fi
21232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21233$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21234if test $ac_compiler_gnu = yes; then
21235  GXX=yes
21236else
21237  GXX=
21238fi
21239ac_test_CXXFLAGS=${CXXFLAGS+set}
21240ac_save_CXXFLAGS=$CXXFLAGS
21241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21242$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21243if test "${ac_cv_prog_cxx_g+set}" = set; then :
21244  $as_echo_n "(cached) " >&6
21245else
21246  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21247   ac_cxx_werror_flag=yes
21248   ac_cv_prog_cxx_g=no
21249   CXXFLAGS="-g"
21250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21251/* end confdefs.h.  */
21252
21253int
21254main ()
21255{
21256
21257  ;
21258  return 0;
21259}
21260_ACEOF
21261if ac_fn_cxx_try_compile "$LINENO"; then :
21262  ac_cv_prog_cxx_g=yes
21263else
21264  CXXFLAGS=""
21265      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21266/* end confdefs.h.  */
21267
21268int
21269main ()
21270{
21271
21272  ;
21273  return 0;
21274}
21275_ACEOF
21276if ac_fn_cxx_try_compile "$LINENO"; then :
21277
21278else
21279  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21280	 CXXFLAGS="-g"
21281	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21282/* end confdefs.h.  */
21283
21284int
21285main ()
21286{
21287
21288  ;
21289  return 0;
21290}
21291_ACEOF
21292if ac_fn_cxx_try_compile "$LINENO"; then :
21293  ac_cv_prog_cxx_g=yes
21294fi
21295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21296fi
21297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21298fi
21299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21300   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21301fi
21302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21303$as_echo "$ac_cv_prog_cxx_g" >&6; }
21304if test "$ac_test_CXXFLAGS" = set; then
21305  CXXFLAGS=$ac_save_CXXFLAGS
21306elif test $ac_cv_prog_cxx_g = yes; then
21307  if test "$GXX" = yes; then
21308    CXXFLAGS="-g -O2"
21309  else
21310    CXXFLAGS="-g"
21311  fi
21312else
21313  if test "$GXX" = yes; then
21314    CXXFLAGS="-O2"
21315  else
21316    CXXFLAGS=
21317  fi
21318fi
21319ac_ext=cpp
21320ac_cpp='$CXXCPP $CPPFLAGS'
21321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21324
21325
21326### Locate other tools
21327
21328if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21329    ac_ext=m
21330ac_cpp='$OBJCPP $CPPFLAGS'
21331ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21332ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21333ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21334if test -n "$ac_tool_prefix"; then
21335  for ac_prog in gcc objcc objc cc CC
21336  do
21337    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21338set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21340$as_echo_n "checking for $ac_word... " >&6; }
21341if test "${ac_cv_prog_OBJC+set}" = set; then :
21342  $as_echo_n "(cached) " >&6
21343else
21344  if test -n "$OBJC"; then
21345  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21346else
21347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21348for as_dir in $PATH
21349do
21350  IFS=$as_save_IFS
21351  test -z "$as_dir" && as_dir=.
21352    for ac_exec_ext in '' $ac_executable_extensions; do
21353  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21354    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21356    break 2
21357  fi
21358done
21359  done
21360IFS=$as_save_IFS
21361
21362fi
21363fi
21364OBJC=$ac_cv_prog_OBJC
21365if test -n "$OBJC"; then
21366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21367$as_echo "$OBJC" >&6; }
21368else
21369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21370$as_echo "no" >&6; }
21371fi
21372
21373
21374    test -n "$OBJC" && break
21375  done
21376fi
21377if test -z "$OBJC"; then
21378  ac_ct_OBJC=$OBJC
21379  for ac_prog in gcc objcc objc cc CC
21380do
21381  # Extract the first word of "$ac_prog", so it can be a program name with args.
21382set dummy $ac_prog; ac_word=$2
21383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21384$as_echo_n "checking for $ac_word... " >&6; }
21385if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21386  $as_echo_n "(cached) " >&6
21387else
21388  if test -n "$ac_ct_OBJC"; then
21389  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21390else
21391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21392for as_dir in $PATH
21393do
21394  IFS=$as_save_IFS
21395  test -z "$as_dir" && as_dir=.
21396    for ac_exec_ext in '' $ac_executable_extensions; do
21397  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21398    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21400    break 2
21401  fi
21402done
21403  done
21404IFS=$as_save_IFS
21405
21406fi
21407fi
21408ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21409if test -n "$ac_ct_OBJC"; then
21410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21411$as_echo "$ac_ct_OBJC" >&6; }
21412else
21413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21414$as_echo "no" >&6; }
21415fi
21416
21417
21418  test -n "$ac_ct_OBJC" && break
21419done
21420
21421  if test "x$ac_ct_OBJC" = x; then
21422    OBJC="gcc"
21423  else
21424    case $cross_compiling:$ac_tool_warned in
21425yes:)
21426{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21427$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21428ac_tool_warned=yes ;;
21429esac
21430    OBJC=$ac_ct_OBJC
21431  fi
21432fi
21433
21434# Provide some information about the compiler.
21435$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21436set X $ac_compile
21437ac_compiler=$2
21438for ac_option in --version -v -V -qversion; do
21439  { { ac_try="$ac_compiler $ac_option >&5"
21440case "(($ac_try" in
21441  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21442  *) ac_try_echo=$ac_try;;
21443esac
21444eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21445$as_echo "$ac_try_echo"; } >&5
21446  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21447  ac_status=$?
21448  if test -s conftest.err; then
21449    sed '10a\
21450... rest of stderr output deleted ...
21451         10q' conftest.err >conftest.er1
21452    cat conftest.er1 >&5
21453  fi
21454  rm -f conftest.er1 conftest.err
21455  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21456  test $ac_status = 0; }
21457done
21458
21459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21460$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21461if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21462  $as_echo_n "(cached) " >&6
21463else
21464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21465/* end confdefs.h.  */
21466
21467int
21468main ()
21469{
21470#ifndef __GNUC__
21471       choke me
21472#endif
21473
21474  ;
21475  return 0;
21476}
21477_ACEOF
21478if ac_fn_objc_try_compile "$LINENO"; then :
21479  ac_compiler_gnu=yes
21480else
21481  ac_compiler_gnu=no
21482fi
21483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21484ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21485
21486fi
21487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21488$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21489if test $ac_compiler_gnu = yes; then
21490  GOBJC=yes
21491else
21492  GOBJC=
21493fi
21494ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21495ac_save_OBJCFLAGS=$OBJCFLAGS
21496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21497$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21498if test "${ac_cv_prog_objc_g+set}" = set; then :
21499  $as_echo_n "(cached) " >&6
21500else
21501  ac_save_objc_werror_flag=$ac_objc_werror_flag
21502   ac_objc_werror_flag=yes
21503   ac_cv_prog_objc_g=no
21504   OBJCFLAGS="-g"
21505   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21506/* end confdefs.h.  */
21507
21508int
21509main ()
21510{
21511
21512  ;
21513  return 0;
21514}
21515_ACEOF
21516if ac_fn_objc_try_compile "$LINENO"; then :
21517  ac_cv_prog_objc_g=yes
21518else
21519  OBJCFLAGS=""
21520      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21521/* end confdefs.h.  */
21522
21523int
21524main ()
21525{
21526
21527  ;
21528  return 0;
21529}
21530_ACEOF
21531if ac_fn_objc_try_compile "$LINENO"; then :
21532
21533else
21534  ac_objc_werror_flag=$ac_save_objc_werror_flag
21535	 OBJCFLAGS="-g"
21536	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21537/* end confdefs.h.  */
21538
21539int
21540main ()
21541{
21542
21543  ;
21544  return 0;
21545}
21546_ACEOF
21547if ac_fn_objc_try_compile "$LINENO"; then :
21548  ac_cv_prog_objc_g=yes
21549fi
21550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21551fi
21552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21553fi
21554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21555   ac_objc_werror_flag=$ac_save_objc_werror_flag
21556fi
21557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21558$as_echo "$ac_cv_prog_objc_g" >&6; }
21559if test "$ac_test_OBJCFLAGS" = set; then
21560  OBJCFLAGS=$ac_save_OBJCFLAGS
21561elif test $ac_cv_prog_objc_g = yes; then
21562  if test "$GOBJC" = yes; then
21563    OBJCFLAGS="-g -O2"
21564  else
21565    OBJCFLAGS="-g"
21566  fi
21567else
21568  if test "$GOBJC" = yes; then
21569    OBJCFLAGS="-O2"
21570  else
21571    OBJCFLAGS=
21572  fi
21573fi
21574ac_ext=cpp
21575ac_cpp='$CXXCPP $CPPFLAGS'
21576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21579
21580
21581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21582
21583  # First separate the path from the arguments. This will split at the first
21584  # space.
21585  complete="$OBJC"
21586  path="${complete%% *}"
21587  tmp="$complete EOL"
21588  arguments="${tmp#* }"
21589
21590  # Input might be given as Windows format, start by converting to
21591  # unix format.
21592  new_path=`$CYGPATH -u "$path"`
21593
21594  # Now try to locate executable using which
21595  new_path=`$WHICH "$new_path" 2> /dev/null`
21596  # bat and cmd files are not always considered executable in cygwin causing which
21597  # to not find them
21598  if test "x$new_path" = x \
21599           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21600           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21601    new_path=`$CYGPATH -u "$path"`
21602  fi
21603  if test "x$new_path" = x; then
21604    # Oops. Which didn't find the executable.
21605    # The splitting of arguments from the executable at a space might have been incorrect,
21606    # since paths with space are more likely in Windows. Give it another try with the whole
21607    # argument.
21608    path="$complete"
21609    arguments="EOL"
21610    new_path=`$CYGPATH -u "$path"`
21611    new_path=`$WHICH "$new_path" 2> /dev/null`
21612    # bat and cmd files are not always considered executable in cygwin causing which
21613    # to not find them
21614    if test "x$new_path" = x \
21615             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21616             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21617      new_path=`$CYGPATH -u "$path"`
21618    fi
21619    if test "x$new_path" = x; then
21620      # It's still not found. Now this is an unrecoverable error.
21621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21622$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21623      has_space=`$ECHO "$complete" | $GREP " "`
21624      if test "x$has_space" != x; then
21625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21627      fi
21628      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21629    fi
21630  fi
21631
21632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21635  # "foo.exe" is OK but "foo" is an error.
21636  #
21637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21638  # It is also a way to make sure we got the proper file name for the real test later on.
21639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21640  if test "x$test_shortpath" = x; then
21641    # Short path failed, file does not exist as specified.
21642    # Try adding .exe or .cmd
21643    if test -f "${new_path}.exe"; then
21644       input_to_shortpath="${new_path}.exe"
21645    elif test -f "${new_path}.cmd"; then
21646       input_to_shortpath="${new_path}.cmd"
21647    else
21648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21649$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21650      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21651$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21652      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21653    fi
21654  else
21655    input_to_shortpath="$new_path"
21656  fi
21657
21658  # Call helper function which possibly converts this using DOS-style short mode.
21659  # If so, the updated path is stored in $new_path.
21660  new_path="$input_to_shortpath"
21661
21662  input_path="$input_to_shortpath"
21663  # Check if we need to convert this using DOS-style short mode. If the path
21664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21665  # take no chances and rewrite it.
21666  # Note: m4 eats our [], so we need to use [ and ] instead.
21667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21668  if test "x$has_forbidden_chars" != x; then
21669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21673      # Going to short mode and back again did indeed matter. Since short mode is
21674      # case insensitive, let's make it lowercase to improve readability.
21675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21676      # Now convert it back to Unix-stile (cygpath)
21677      input_path=`$CYGPATH -u "$shortmode_path"`
21678      new_path="$input_path"
21679    fi
21680  fi
21681
21682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21683  if test "x$test_cygdrive_prefix" = x; then
21684    # As a simple fix, exclude /usr/bin since it's not a real path.
21685    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21687      # a path prefixed by /cygdrive for fixpath to work.
21688      new_path="$CYGWIN_ROOT_PATH$input_path"
21689    fi
21690  fi
21691
21692  # remove trailing .exe if any
21693  new_path="${new_path/%.exe/}"
21694
21695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21696
21697  # First separate the path from the arguments. This will split at the first
21698  # space.
21699  complete="$OBJC"
21700  path="${complete%% *}"
21701  tmp="$complete EOL"
21702  arguments="${tmp#* }"
21703
21704  # Input might be given as Windows format, start by converting to
21705  # unix format.
21706  new_path="$path"
21707
21708  windows_path="$new_path"
21709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21710    unix_path=`$CYGPATH -u "$windows_path"`
21711    new_path="$unix_path"
21712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21714    new_path="$unix_path"
21715  fi
21716
21717
21718  # Now try to locate executable using which
21719  new_path=`$WHICH "$new_path" 2> /dev/null`
21720
21721  if test "x$new_path" = x; then
21722    # Oops. Which didn't find the executable.
21723    # The splitting of arguments from the executable at a space might have been incorrect,
21724    # since paths with space are more likely in Windows. Give it another try with the whole
21725    # argument.
21726    path="$complete"
21727    arguments="EOL"
21728    new_path="$path"
21729
21730  windows_path="$new_path"
21731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21732    unix_path=`$CYGPATH -u "$windows_path"`
21733    new_path="$unix_path"
21734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21736    new_path="$unix_path"
21737  fi
21738
21739
21740    new_path=`$WHICH "$new_path" 2> /dev/null`
21741
21742    if test "x$new_path" = x; then
21743      # It's still not found. Now this is an unrecoverable error.
21744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21745$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21746      has_space=`$ECHO "$complete" | $GREP " "`
21747      if test "x$has_space" != x; then
21748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21750      fi
21751      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21752    fi
21753  fi
21754
21755  # Now new_path has a complete unix path to the binary
21756  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21757    # Keep paths in /bin as-is, but remove trailing .exe if any
21758    new_path="${new_path/%.exe/}"
21759    # Do not save /bin paths to all_fixpath_prefixes!
21760  else
21761    # Not in mixed or Windows style, start by that.
21762    new_path=`cmd //c echo $new_path`
21763
21764  input_path="$new_path"
21765  # Check if we need to convert this using DOS-style short mode. If the path
21766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21767  # take no chances and rewrite it.
21768  # Note: m4 eats our [], so we need to use [ and ] instead.
21769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21770  if test "x$has_forbidden_chars" != x; then
21771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21773  fi
21774
21775    # Output is in $new_path
21776
21777  windows_path="$new_path"
21778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21779    unix_path=`$CYGPATH -u "$windows_path"`
21780    new_path="$unix_path"
21781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21783    new_path="$unix_path"
21784  fi
21785
21786    # remove trailing .exe if any
21787    new_path="${new_path/%.exe/}"
21788
21789    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21790    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21791  fi
21792
21793  else
21794    # We're on a posix platform. Hooray! :)
21795    # First separate the path from the arguments. This will split at the first
21796    # space.
21797    complete="$OBJC"
21798    path="${complete%% *}"
21799    tmp="$complete EOL"
21800    arguments="${tmp#* }"
21801
21802    # Cannot rely on the command "which" here since it doesn't always work.
21803    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21804    if test -z "$is_absolute_path"; then
21805      # Path to executable is not absolute. Find it.
21806      IFS_save="$IFS"
21807      IFS=:
21808      for p in $PATH; do
21809        if test -f "$p/$path" && test -x "$p/$path"; then
21810          new_path="$p/$path"
21811          break
21812        fi
21813      done
21814      IFS="$IFS_save"
21815    else
21816      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21817$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21818      new_path="$path"
21819    fi
21820
21821    if test "x$new_path" = x; then
21822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21823$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21824        has_space=`$ECHO "$complete" | $GREP " "`
21825        if test "x$has_space" != x; then
21826          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21827$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21828        fi
21829        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21830      fi
21831  fi
21832
21833      # Now join together the path and the arguments once again
21834      if test "x$arguments" != xEOL; then
21835        new_complete="$new_path ${arguments% *}"
21836      else
21837        new_complete="$new_path"
21838      fi
21839
21840  if test "x$complete" != "x$new_complete"; then
21841      OBJC="$new_complete"
21842      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21843$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21844    fi
21845
21846else
21847    OBJC=
21848fi
21849
21850# Restore the flags to the user specified values.
21851# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21852CFLAGS="$ORG_CFLAGS"
21853CXXFLAGS="$ORG_CXXFLAGS"
21854OBJCFLAGS="$ORG_OBJCFLAGS"
21855
21856LD="$CC"
21857LDEXE="$CC"
21858LDCXX="$CXX"
21859LDEXECXX="$CXX"
21860
21861# LDEXE is the linker to use, when creating executables.
21862
21863# Linking C++ libraries.
21864
21865# Linking C++ executables.
21866
21867
21868if test "x$OPENJDK_TARGET_OS" != xwindows; then
21869    if test -n "$ac_tool_prefix"; then
21870  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21871set dummy ${ac_tool_prefix}ar; ac_word=$2
21872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21873$as_echo_n "checking for $ac_word... " >&6; }
21874if test "${ac_cv_prog_AR+set}" = set; then :
21875  $as_echo_n "(cached) " >&6
21876else
21877  if test -n "$AR"; then
21878  ac_cv_prog_AR="$AR" # Let the user override the test.
21879else
21880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21881for as_dir in $PATH
21882do
21883  IFS=$as_save_IFS
21884  test -z "$as_dir" && as_dir=.
21885    for ac_exec_ext in '' $ac_executable_extensions; do
21886  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21887    ac_cv_prog_AR="${ac_tool_prefix}ar"
21888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21889    break 2
21890  fi
21891done
21892  done
21893IFS=$as_save_IFS
21894
21895fi
21896fi
21897AR=$ac_cv_prog_AR
21898if test -n "$AR"; then
21899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21900$as_echo "$AR" >&6; }
21901else
21902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21903$as_echo "no" >&6; }
21904fi
21905
21906
21907fi
21908if test -z "$ac_cv_prog_AR"; then
21909  ac_ct_AR=$AR
21910  # Extract the first word of "ar", so it can be a program name with args.
21911set dummy ar; ac_word=$2
21912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21913$as_echo_n "checking for $ac_word... " >&6; }
21914if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21915  $as_echo_n "(cached) " >&6
21916else
21917  if test -n "$ac_ct_AR"; then
21918  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21919else
21920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21921for as_dir in $PATH
21922do
21923  IFS=$as_save_IFS
21924  test -z "$as_dir" && as_dir=.
21925    for ac_exec_ext in '' $ac_executable_extensions; do
21926  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21927    ac_cv_prog_ac_ct_AR="ar"
21928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21929    break 2
21930  fi
21931done
21932  done
21933IFS=$as_save_IFS
21934
21935fi
21936fi
21937ac_ct_AR=$ac_cv_prog_ac_ct_AR
21938if test -n "$ac_ct_AR"; then
21939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21940$as_echo "$ac_ct_AR" >&6; }
21941else
21942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21943$as_echo "no" >&6; }
21944fi
21945
21946  if test "x$ac_ct_AR" = x; then
21947    AR=""
21948  else
21949    case $cross_compiling:$ac_tool_warned in
21950yes:)
21951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21953ac_tool_warned=yes ;;
21954esac
21955    AR=$ac_ct_AR
21956  fi
21957else
21958  AR="$ac_cv_prog_AR"
21959fi
21960
21961
21962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21963
21964  # First separate the path from the arguments. This will split at the first
21965  # space.
21966  complete="$AR"
21967  path="${complete%% *}"
21968  tmp="$complete EOL"
21969  arguments="${tmp#* }"
21970
21971  # Input might be given as Windows format, start by converting to
21972  # unix format.
21973  new_path=`$CYGPATH -u "$path"`
21974
21975  # Now try to locate executable using which
21976  new_path=`$WHICH "$new_path" 2> /dev/null`
21977  # bat and cmd files are not always considered executable in cygwin causing which
21978  # to not find them
21979  if test "x$new_path" = x \
21980           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21981           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21982    new_path=`$CYGPATH -u "$path"`
21983  fi
21984  if test "x$new_path" = x; then
21985    # Oops. Which didn't find the executable.
21986    # The splitting of arguments from the executable at a space might have been incorrect,
21987    # since paths with space are more likely in Windows. Give it another try with the whole
21988    # argument.
21989    path="$complete"
21990    arguments="EOL"
21991    new_path=`$CYGPATH -u "$path"`
21992    new_path=`$WHICH "$new_path" 2> /dev/null`
21993    # bat and cmd files are not always considered executable in cygwin causing which
21994    # to not find them
21995    if test "x$new_path" = x \
21996             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21997             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21998      new_path=`$CYGPATH -u "$path"`
21999    fi
22000    if test "x$new_path" = x; then
22001      # It's still not found. Now this is an unrecoverable error.
22002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22003$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22004      has_space=`$ECHO "$complete" | $GREP " "`
22005      if test "x$has_space" != x; then
22006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22008      fi
22009      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22010    fi
22011  fi
22012
22013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22016  # "foo.exe" is OK but "foo" is an error.
22017  #
22018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22019  # It is also a way to make sure we got the proper file name for the real test later on.
22020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22021  if test "x$test_shortpath" = x; then
22022    # Short path failed, file does not exist as specified.
22023    # Try adding .exe or .cmd
22024    if test -f "${new_path}.exe"; then
22025       input_to_shortpath="${new_path}.exe"
22026    elif test -f "${new_path}.cmd"; then
22027       input_to_shortpath="${new_path}.cmd"
22028    else
22029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22030$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22031      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22032$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22033      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22034    fi
22035  else
22036    input_to_shortpath="$new_path"
22037  fi
22038
22039  # Call helper function which possibly converts this using DOS-style short mode.
22040  # If so, the updated path is stored in $new_path.
22041  new_path="$input_to_shortpath"
22042
22043  input_path="$input_to_shortpath"
22044  # Check if we need to convert this using DOS-style short mode. If the path
22045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22046  # take no chances and rewrite it.
22047  # Note: m4 eats our [], so we need to use [ and ] instead.
22048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22049  if test "x$has_forbidden_chars" != x; then
22050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22054      # Going to short mode and back again did indeed matter. Since short mode is
22055      # case insensitive, let's make it lowercase to improve readability.
22056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22057      # Now convert it back to Unix-stile (cygpath)
22058      input_path=`$CYGPATH -u "$shortmode_path"`
22059      new_path="$input_path"
22060    fi
22061  fi
22062
22063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22064  if test "x$test_cygdrive_prefix" = x; then
22065    # As a simple fix, exclude /usr/bin since it's not a real path.
22066    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22068      # a path prefixed by /cygdrive for fixpath to work.
22069      new_path="$CYGWIN_ROOT_PATH$input_path"
22070    fi
22071  fi
22072
22073  # remove trailing .exe if any
22074  new_path="${new_path/%.exe/}"
22075
22076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22077
22078  # First separate the path from the arguments. This will split at the first
22079  # space.
22080  complete="$AR"
22081  path="${complete%% *}"
22082  tmp="$complete EOL"
22083  arguments="${tmp#* }"
22084
22085  # Input might be given as Windows format, start by converting to
22086  # unix format.
22087  new_path="$path"
22088
22089  windows_path="$new_path"
22090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22091    unix_path=`$CYGPATH -u "$windows_path"`
22092    new_path="$unix_path"
22093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22095    new_path="$unix_path"
22096  fi
22097
22098
22099  # Now try to locate executable using which
22100  new_path=`$WHICH "$new_path" 2> /dev/null`
22101
22102  if test "x$new_path" = x; then
22103    # Oops. Which didn't find the executable.
22104    # The splitting of arguments from the executable at a space might have been incorrect,
22105    # since paths with space are more likely in Windows. Give it another try with the whole
22106    # argument.
22107    path="$complete"
22108    arguments="EOL"
22109    new_path="$path"
22110
22111  windows_path="$new_path"
22112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22113    unix_path=`$CYGPATH -u "$windows_path"`
22114    new_path="$unix_path"
22115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22117    new_path="$unix_path"
22118  fi
22119
22120
22121    new_path=`$WHICH "$new_path" 2> /dev/null`
22122
22123    if test "x$new_path" = x; then
22124      # It's still not found. Now this is an unrecoverable error.
22125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22126$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22127      has_space=`$ECHO "$complete" | $GREP " "`
22128      if test "x$has_space" != x; then
22129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22131      fi
22132      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22133    fi
22134  fi
22135
22136  # Now new_path has a complete unix path to the binary
22137  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22138    # Keep paths in /bin as-is, but remove trailing .exe if any
22139    new_path="${new_path/%.exe/}"
22140    # Do not save /bin paths to all_fixpath_prefixes!
22141  else
22142    # Not in mixed or Windows style, start by that.
22143    new_path=`cmd //c echo $new_path`
22144
22145  input_path="$new_path"
22146  # Check if we need to convert this using DOS-style short mode. If the path
22147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22148  # take no chances and rewrite it.
22149  # Note: m4 eats our [], so we need to use [ and ] instead.
22150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22151  if test "x$has_forbidden_chars" != x; then
22152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22154  fi
22155
22156    # Output is in $new_path
22157
22158  windows_path="$new_path"
22159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22160    unix_path=`$CYGPATH -u "$windows_path"`
22161    new_path="$unix_path"
22162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22164    new_path="$unix_path"
22165  fi
22166
22167    # remove trailing .exe if any
22168    new_path="${new_path/%.exe/}"
22169
22170    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22171    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22172  fi
22173
22174  else
22175    # We're on a posix platform. Hooray! :)
22176    # First separate the path from the arguments. This will split at the first
22177    # space.
22178    complete="$AR"
22179    path="${complete%% *}"
22180    tmp="$complete EOL"
22181    arguments="${tmp#* }"
22182
22183    # Cannot rely on the command "which" here since it doesn't always work.
22184    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22185    if test -z "$is_absolute_path"; then
22186      # Path to executable is not absolute. Find it.
22187      IFS_save="$IFS"
22188      IFS=:
22189      for p in $PATH; do
22190        if test -f "$p/$path" && test -x "$p/$path"; then
22191          new_path="$p/$path"
22192          break
22193        fi
22194      done
22195      IFS="$IFS_save"
22196    else
22197      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22198$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22199      new_path="$path"
22200    fi
22201
22202    if test "x$new_path" = x; then
22203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22204$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22205        has_space=`$ECHO "$complete" | $GREP " "`
22206        if test "x$has_space" != x; then
22207          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22208$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22209        fi
22210        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22211      fi
22212  fi
22213
22214      # Now join together the path and the arguments once again
22215      if test "x$arguments" != xEOL; then
22216        new_complete="$new_path ${arguments% *}"
22217      else
22218        new_complete="$new_path"
22219      fi
22220
22221  if test "x$complete" != "x$new_complete"; then
22222      AR="$new_complete"
22223      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22224$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22225    fi
22226
22227fi
22228if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22229    ARFLAGS="-r"
22230else
22231    ARFLAGS=""
22232fi
22233
22234
22235# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22236HOTSPOT_CXX="$CXX"
22237HOTSPOT_LD="$LD"
22238
22239
22240
22241COMPILER_NAME=gcc
22242COMPILER_TYPE=CC
22243if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22244
22245    # For now, assume that we are always compiling using cl.exe.
22246    CC_OUT_OPTION=-Fo
22247    EXE_OUT_OPTION=-out:
22248    LD_OUT_OPTION=-out:
22249    AR_OUT_OPTION=-out:
22250    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22251    # program for something completely different.
22252    # Extract the first word of "link", so it can be a program name with args.
22253set dummy link; ac_word=$2
22254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22255$as_echo_n "checking for $ac_word... " >&6; }
22256if test "${ac_cv_prog_WINLD+set}" = set; then :
22257  $as_echo_n "(cached) " >&6
22258else
22259  if test -n "$WINLD"; then
22260  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22261else
22262  ac_prog_rejected=no
22263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22264for as_dir in $PATH
22265do
22266  IFS=$as_save_IFS
22267  test -z "$as_dir" && as_dir=.
22268    for ac_exec_ext in '' $ac_executable_extensions; do
22269  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22270    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22271       ac_prog_rejected=yes
22272       continue
22273     fi
22274    ac_cv_prog_WINLD="link"
22275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22276    break 2
22277  fi
22278done
22279  done
22280IFS=$as_save_IFS
22281
22282if test $ac_prog_rejected = yes; then
22283  # We found a bogon in the path, so make sure we never use it.
22284  set dummy $ac_cv_prog_WINLD
22285  shift
22286  if test $# != 0; then
22287    # We chose a different compiler from the bogus one.
22288    # However, it has the same basename, so the bogon will be chosen
22289    # first if we set WINLD to just the basename; use the full file name.
22290    shift
22291    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22292  fi
22293fi
22294fi
22295fi
22296WINLD=$ac_cv_prog_WINLD
22297if test -n "$WINLD"; then
22298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22299$as_echo "$WINLD" >&6; }
22300else
22301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22302$as_echo "no" >&6; }
22303fi
22304
22305
22306    # Since we must ignore the first found link, WINLD will contain
22307    # the full path to the link.exe program.
22308
22309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22310
22311  # First separate the path from the arguments. This will split at the first
22312  # space.
22313  complete="$WINLD"
22314  path="${complete%% *}"
22315  tmp="$complete EOL"
22316  arguments="${tmp#* }"
22317
22318  # Input might be given as Windows format, start by converting to
22319  # unix format.
22320  new_path=`$CYGPATH -u "$path"`
22321
22322  # Now try to locate executable using which
22323  new_path=`$WHICH "$new_path" 2> /dev/null`
22324  # bat and cmd files are not always considered executable in cygwin causing which
22325  # to not find them
22326  if test "x$new_path" = x \
22327           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22328           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22329    new_path=`$CYGPATH -u "$path"`
22330  fi
22331  if test "x$new_path" = x; then
22332    # Oops. Which didn't find the executable.
22333    # The splitting of arguments from the executable at a space might have been incorrect,
22334    # since paths with space are more likely in Windows. Give it another try with the whole
22335    # argument.
22336    path="$complete"
22337    arguments="EOL"
22338    new_path=`$CYGPATH -u "$path"`
22339    new_path=`$WHICH "$new_path" 2> /dev/null`
22340    # bat and cmd files are not always considered executable in cygwin causing which
22341    # to not find them
22342    if test "x$new_path" = x \
22343             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22344             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22345      new_path=`$CYGPATH -u "$path"`
22346    fi
22347    if test "x$new_path" = x; then
22348      # It's still not found. Now this is an unrecoverable error.
22349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22350$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22351      has_space=`$ECHO "$complete" | $GREP " "`
22352      if test "x$has_space" != x; then
22353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22355      fi
22356      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22357    fi
22358  fi
22359
22360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22363  # "foo.exe" is OK but "foo" is an error.
22364  #
22365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22366  # It is also a way to make sure we got the proper file name for the real test later on.
22367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22368  if test "x$test_shortpath" = x; then
22369    # Short path failed, file does not exist as specified.
22370    # Try adding .exe or .cmd
22371    if test -f "${new_path}.exe"; then
22372       input_to_shortpath="${new_path}.exe"
22373    elif test -f "${new_path}.cmd"; then
22374       input_to_shortpath="${new_path}.cmd"
22375    else
22376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22377$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22378      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22379$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22380      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22381    fi
22382  else
22383    input_to_shortpath="$new_path"
22384  fi
22385
22386  # Call helper function which possibly converts this using DOS-style short mode.
22387  # If so, the updated path is stored in $new_path.
22388  new_path="$input_to_shortpath"
22389
22390  input_path="$input_to_shortpath"
22391  # Check if we need to convert this using DOS-style short mode. If the path
22392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22393  # take no chances and rewrite it.
22394  # Note: m4 eats our [], so we need to use [ and ] instead.
22395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22396  if test "x$has_forbidden_chars" != x; then
22397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22401      # Going to short mode and back again did indeed matter. Since short mode is
22402      # case insensitive, let's make it lowercase to improve readability.
22403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22404      # Now convert it back to Unix-stile (cygpath)
22405      input_path=`$CYGPATH -u "$shortmode_path"`
22406      new_path="$input_path"
22407    fi
22408  fi
22409
22410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22411  if test "x$test_cygdrive_prefix" = x; then
22412    # As a simple fix, exclude /usr/bin since it's not a real path.
22413    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22415      # a path prefixed by /cygdrive for fixpath to work.
22416      new_path="$CYGWIN_ROOT_PATH$input_path"
22417    fi
22418  fi
22419
22420  # remove trailing .exe if any
22421  new_path="${new_path/%.exe/}"
22422
22423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22424
22425  # First separate the path from the arguments. This will split at the first
22426  # space.
22427  complete="$WINLD"
22428  path="${complete%% *}"
22429  tmp="$complete EOL"
22430  arguments="${tmp#* }"
22431
22432  # Input might be given as Windows format, start by converting to
22433  # unix format.
22434  new_path="$path"
22435
22436  windows_path="$new_path"
22437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22438    unix_path=`$CYGPATH -u "$windows_path"`
22439    new_path="$unix_path"
22440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22442    new_path="$unix_path"
22443  fi
22444
22445
22446  # Now try to locate executable using which
22447  new_path=`$WHICH "$new_path" 2> /dev/null`
22448
22449  if test "x$new_path" = x; then
22450    # Oops. Which didn't find the executable.
22451    # The splitting of arguments from the executable at a space might have been incorrect,
22452    # since paths with space are more likely in Windows. Give it another try with the whole
22453    # argument.
22454    path="$complete"
22455    arguments="EOL"
22456    new_path="$path"
22457
22458  windows_path="$new_path"
22459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22460    unix_path=`$CYGPATH -u "$windows_path"`
22461    new_path="$unix_path"
22462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22464    new_path="$unix_path"
22465  fi
22466
22467
22468    new_path=`$WHICH "$new_path" 2> /dev/null`
22469
22470    if test "x$new_path" = x; then
22471      # It's still not found. Now this is an unrecoverable error.
22472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22473$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22474      has_space=`$ECHO "$complete" | $GREP " "`
22475      if test "x$has_space" != x; then
22476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22478      fi
22479      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22480    fi
22481  fi
22482
22483  # Now new_path has a complete unix path to the binary
22484  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22485    # Keep paths in /bin as-is, but remove trailing .exe if any
22486    new_path="${new_path/%.exe/}"
22487    # Do not save /bin paths to all_fixpath_prefixes!
22488  else
22489    # Not in mixed or Windows style, start by that.
22490    new_path=`cmd //c echo $new_path`
22491
22492  input_path="$new_path"
22493  # Check if we need to convert this using DOS-style short mode. If the path
22494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22495  # take no chances and rewrite it.
22496  # Note: m4 eats our [], so we need to use [ and ] instead.
22497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22498  if test "x$has_forbidden_chars" != x; then
22499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22501  fi
22502
22503    # Output is in $new_path
22504
22505  windows_path="$new_path"
22506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22507    unix_path=`$CYGPATH -u "$windows_path"`
22508    new_path="$unix_path"
22509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22511    new_path="$unix_path"
22512  fi
22513
22514    # remove trailing .exe if any
22515    new_path="${new_path/%.exe/}"
22516
22517    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22518    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22519  fi
22520
22521  else
22522    # We're on a posix platform. Hooray! :)
22523    # First separate the path from the arguments. This will split at the first
22524    # space.
22525    complete="$WINLD"
22526    path="${complete%% *}"
22527    tmp="$complete EOL"
22528    arguments="${tmp#* }"
22529
22530    # Cannot rely on the command "which" here since it doesn't always work.
22531    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22532    if test -z "$is_absolute_path"; then
22533      # Path to executable is not absolute. Find it.
22534      IFS_save="$IFS"
22535      IFS=:
22536      for p in $PATH; do
22537        if test -f "$p/$path" && test -x "$p/$path"; then
22538          new_path="$p/$path"
22539          break
22540        fi
22541      done
22542      IFS="$IFS_save"
22543    else
22544      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22545$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22546      new_path="$path"
22547    fi
22548
22549    if test "x$new_path" = x; then
22550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22551$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22552        has_space=`$ECHO "$complete" | $GREP " "`
22553        if test "x$has_space" != x; then
22554          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22555$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22556        fi
22557        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22558      fi
22559  fi
22560
22561      # Now join together the path and the arguments once again
22562      if test "x$arguments" != xEOL; then
22563        new_complete="$new_path ${arguments% *}"
22564      else
22565        new_complete="$new_path"
22566      fi
22567
22568  if test "x$complete" != "x$new_complete"; then
22569      WINLD="$new_complete"
22570      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22571$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22572    fi
22573
22574    printf "Windows linker was found at $WINLD\n"
22575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22576$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22577    "$WINLD" --version > /dev/null
22578    if test $? -eq 0 ; then
22579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22580$as_echo "no" >&6; }
22581      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22582    else
22583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22584$as_echo "yes" >&6; }
22585    fi
22586    LD="$WINLD"
22587    LDEXE="$WINLD"
22588    LDCXX="$WINLD"
22589    LDEXECXX="$WINLD"
22590
22591    # Extract the first word of "mt", so it can be a program name with args.
22592set dummy mt; ac_word=$2
22593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22594$as_echo_n "checking for $ac_word... " >&6; }
22595if test "${ac_cv_prog_MT+set}" = set; then :
22596  $as_echo_n "(cached) " >&6
22597else
22598  if test -n "$MT"; then
22599  ac_cv_prog_MT="$MT" # Let the user override the test.
22600else
22601  ac_prog_rejected=no
22602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22603for as_dir in $PATH
22604do
22605  IFS=$as_save_IFS
22606  test -z "$as_dir" && as_dir=.
22607    for ac_exec_ext in '' $ac_executable_extensions; do
22608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22609    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22610       ac_prog_rejected=yes
22611       continue
22612     fi
22613    ac_cv_prog_MT="mt"
22614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22615    break 2
22616  fi
22617done
22618  done
22619IFS=$as_save_IFS
22620
22621if test $ac_prog_rejected = yes; then
22622  # We found a bogon in the path, so make sure we never use it.
22623  set dummy $ac_cv_prog_MT
22624  shift
22625  if test $# != 0; then
22626    # We chose a different compiler from the bogus one.
22627    # However, it has the same basename, so the bogon will be chosen
22628    # first if we set MT to just the basename; use the full file name.
22629    shift
22630    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22631  fi
22632fi
22633fi
22634fi
22635MT=$ac_cv_prog_MT
22636if test -n "$MT"; then
22637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22638$as_echo "$MT" >&6; }
22639else
22640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22641$as_echo "no" >&6; }
22642fi
22643
22644
22645
22646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22647
22648  # First separate the path from the arguments. This will split at the first
22649  # space.
22650  complete="$MT"
22651  path="${complete%% *}"
22652  tmp="$complete EOL"
22653  arguments="${tmp#* }"
22654
22655  # Input might be given as Windows format, start by converting to
22656  # unix format.
22657  new_path=`$CYGPATH -u "$path"`
22658
22659  # Now try to locate executable using which
22660  new_path=`$WHICH "$new_path" 2> /dev/null`
22661  # bat and cmd files are not always considered executable in cygwin causing which
22662  # to not find them
22663  if test "x$new_path" = x \
22664           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22665           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22666    new_path=`$CYGPATH -u "$path"`
22667  fi
22668  if test "x$new_path" = x; then
22669    # Oops. Which didn't find the executable.
22670    # The splitting of arguments from the executable at a space might have been incorrect,
22671    # since paths with space are more likely in Windows. Give it another try with the whole
22672    # argument.
22673    path="$complete"
22674    arguments="EOL"
22675    new_path=`$CYGPATH -u "$path"`
22676    new_path=`$WHICH "$new_path" 2> /dev/null`
22677    # bat and cmd files are not always considered executable in cygwin causing which
22678    # to not find them
22679    if test "x$new_path" = x \
22680             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22681             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22682      new_path=`$CYGPATH -u "$path"`
22683    fi
22684    if test "x$new_path" = x; then
22685      # It's still not found. Now this is an unrecoverable error.
22686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22687$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22688      has_space=`$ECHO "$complete" | $GREP " "`
22689      if test "x$has_space" != x; then
22690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22692      fi
22693      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22694    fi
22695  fi
22696
22697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22700  # "foo.exe" is OK but "foo" is an error.
22701  #
22702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22703  # It is also a way to make sure we got the proper file name for the real test later on.
22704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22705  if test "x$test_shortpath" = x; then
22706    # Short path failed, file does not exist as specified.
22707    # Try adding .exe or .cmd
22708    if test -f "${new_path}.exe"; then
22709       input_to_shortpath="${new_path}.exe"
22710    elif test -f "${new_path}.cmd"; then
22711       input_to_shortpath="${new_path}.cmd"
22712    else
22713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22714$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22715      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22716$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22717      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22718    fi
22719  else
22720    input_to_shortpath="$new_path"
22721  fi
22722
22723  # Call helper function which possibly converts this using DOS-style short mode.
22724  # If so, the updated path is stored in $new_path.
22725  new_path="$input_to_shortpath"
22726
22727  input_path="$input_to_shortpath"
22728  # Check if we need to convert this using DOS-style short mode. If the path
22729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22730  # take no chances and rewrite it.
22731  # Note: m4 eats our [], so we need to use [ and ] instead.
22732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22733  if test "x$has_forbidden_chars" != x; then
22734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22738      # Going to short mode and back again did indeed matter. Since short mode is
22739      # case insensitive, let's make it lowercase to improve readability.
22740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22741      # Now convert it back to Unix-stile (cygpath)
22742      input_path=`$CYGPATH -u "$shortmode_path"`
22743      new_path="$input_path"
22744    fi
22745  fi
22746
22747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22748  if test "x$test_cygdrive_prefix" = x; then
22749    # As a simple fix, exclude /usr/bin since it's not a real path.
22750    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22752      # a path prefixed by /cygdrive for fixpath to work.
22753      new_path="$CYGWIN_ROOT_PATH$input_path"
22754    fi
22755  fi
22756
22757  # remove trailing .exe if any
22758  new_path="${new_path/%.exe/}"
22759
22760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22761
22762  # First separate the path from the arguments. This will split at the first
22763  # space.
22764  complete="$MT"
22765  path="${complete%% *}"
22766  tmp="$complete EOL"
22767  arguments="${tmp#* }"
22768
22769  # Input might be given as Windows format, start by converting to
22770  # unix format.
22771  new_path="$path"
22772
22773  windows_path="$new_path"
22774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22775    unix_path=`$CYGPATH -u "$windows_path"`
22776    new_path="$unix_path"
22777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22779    new_path="$unix_path"
22780  fi
22781
22782
22783  # Now try to locate executable using which
22784  new_path=`$WHICH "$new_path" 2> /dev/null`
22785
22786  if test "x$new_path" = x; then
22787    # Oops. Which didn't find the executable.
22788    # The splitting of arguments from the executable at a space might have been incorrect,
22789    # since paths with space are more likely in Windows. Give it another try with the whole
22790    # argument.
22791    path="$complete"
22792    arguments="EOL"
22793    new_path="$path"
22794
22795  windows_path="$new_path"
22796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22797    unix_path=`$CYGPATH -u "$windows_path"`
22798    new_path="$unix_path"
22799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22801    new_path="$unix_path"
22802  fi
22803
22804
22805    new_path=`$WHICH "$new_path" 2> /dev/null`
22806
22807    if test "x$new_path" = x; then
22808      # It's still not found. Now this is an unrecoverable error.
22809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22810$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22811      has_space=`$ECHO "$complete" | $GREP " "`
22812      if test "x$has_space" != x; then
22813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22815      fi
22816      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22817    fi
22818  fi
22819
22820  # Now new_path has a complete unix path to the binary
22821  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22822    # Keep paths in /bin as-is, but remove trailing .exe if any
22823    new_path="${new_path/%.exe/}"
22824    # Do not save /bin paths to all_fixpath_prefixes!
22825  else
22826    # Not in mixed or Windows style, start by that.
22827    new_path=`cmd //c echo $new_path`
22828
22829  input_path="$new_path"
22830  # Check if we need to convert this using DOS-style short mode. If the path
22831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22832  # take no chances and rewrite it.
22833  # Note: m4 eats our [], so we need to use [ and ] instead.
22834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22835  if test "x$has_forbidden_chars" != x; then
22836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22838  fi
22839
22840    # Output is in $new_path
22841
22842  windows_path="$new_path"
22843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22844    unix_path=`$CYGPATH -u "$windows_path"`
22845    new_path="$unix_path"
22846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22848    new_path="$unix_path"
22849  fi
22850
22851    # remove trailing .exe if any
22852    new_path="${new_path/%.exe/}"
22853
22854    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22855    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22856  fi
22857
22858  else
22859    # We're on a posix platform. Hooray! :)
22860    # First separate the path from the arguments. This will split at the first
22861    # space.
22862    complete="$MT"
22863    path="${complete%% *}"
22864    tmp="$complete EOL"
22865    arguments="${tmp#* }"
22866
22867    # Cannot rely on the command "which" here since it doesn't always work.
22868    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22869    if test -z "$is_absolute_path"; then
22870      # Path to executable is not absolute. Find it.
22871      IFS_save="$IFS"
22872      IFS=:
22873      for p in $PATH; do
22874        if test -f "$p/$path" && test -x "$p/$path"; then
22875          new_path="$p/$path"
22876          break
22877        fi
22878      done
22879      IFS="$IFS_save"
22880    else
22881      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22882$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22883      new_path="$path"
22884    fi
22885
22886    if test "x$new_path" = x; then
22887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22888$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22889        has_space=`$ECHO "$complete" | $GREP " "`
22890        if test "x$has_space" != x; then
22891          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22892$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22893        fi
22894        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22895      fi
22896  fi
22897
22898      # Now join together the path and the arguments once again
22899      if test "x$arguments" != xEOL; then
22900        new_complete="$new_path ${arguments% *}"
22901      else
22902        new_complete="$new_path"
22903      fi
22904
22905  if test "x$complete" != "x$new_complete"; then
22906      MT="$new_complete"
22907      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22908$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22909    fi
22910
22911    # The resource compiler
22912    # Extract the first word of "rc", so it can be a program name with args.
22913set dummy rc; ac_word=$2
22914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22915$as_echo_n "checking for $ac_word... " >&6; }
22916if test "${ac_cv_prog_RC+set}" = set; then :
22917  $as_echo_n "(cached) " >&6
22918else
22919  if test -n "$RC"; then
22920  ac_cv_prog_RC="$RC" # Let the user override the test.
22921else
22922  ac_prog_rejected=no
22923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22924for as_dir in $PATH
22925do
22926  IFS=$as_save_IFS
22927  test -z "$as_dir" && as_dir=.
22928    for ac_exec_ext in '' $ac_executable_extensions; do
22929  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22930    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22931       ac_prog_rejected=yes
22932       continue
22933     fi
22934    ac_cv_prog_RC="rc"
22935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22936    break 2
22937  fi
22938done
22939  done
22940IFS=$as_save_IFS
22941
22942if test $ac_prog_rejected = yes; then
22943  # We found a bogon in the path, so make sure we never use it.
22944  set dummy $ac_cv_prog_RC
22945  shift
22946  if test $# != 0; then
22947    # We chose a different compiler from the bogus one.
22948    # However, it has the same basename, so the bogon will be chosen
22949    # first if we set RC to just the basename; use the full file name.
22950    shift
22951    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22952  fi
22953fi
22954fi
22955fi
22956RC=$ac_cv_prog_RC
22957if test -n "$RC"; then
22958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22959$as_echo "$RC" >&6; }
22960else
22961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22962$as_echo "no" >&6; }
22963fi
22964
22965
22966
22967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22968
22969  # First separate the path from the arguments. This will split at the first
22970  # space.
22971  complete="$RC"
22972  path="${complete%% *}"
22973  tmp="$complete EOL"
22974  arguments="${tmp#* }"
22975
22976  # Input might be given as Windows format, start by converting to
22977  # unix format.
22978  new_path=`$CYGPATH -u "$path"`
22979
22980  # Now try to locate executable using which
22981  new_path=`$WHICH "$new_path" 2> /dev/null`
22982  # bat and cmd files are not always considered executable in cygwin causing which
22983  # to not find them
22984  if test "x$new_path" = x \
22985           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22986           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22987    new_path=`$CYGPATH -u "$path"`
22988  fi
22989  if test "x$new_path" = x; then
22990    # Oops. Which didn't find the executable.
22991    # The splitting of arguments from the executable at a space might have been incorrect,
22992    # since paths with space are more likely in Windows. Give it another try with the whole
22993    # argument.
22994    path="$complete"
22995    arguments="EOL"
22996    new_path=`$CYGPATH -u "$path"`
22997    new_path=`$WHICH "$new_path" 2> /dev/null`
22998    # bat and cmd files are not always considered executable in cygwin causing which
22999    # to not find them
23000    if test "x$new_path" = x \
23001             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23002             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23003      new_path=`$CYGPATH -u "$path"`
23004    fi
23005    if test "x$new_path" = x; then
23006      # It's still not found. Now this is an unrecoverable error.
23007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23008$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23009      has_space=`$ECHO "$complete" | $GREP " "`
23010      if test "x$has_space" != x; then
23011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23013      fi
23014      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23015    fi
23016  fi
23017
23018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23021  # "foo.exe" is OK but "foo" is an error.
23022  #
23023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23024  # It is also a way to make sure we got the proper file name for the real test later on.
23025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23026  if test "x$test_shortpath" = x; then
23027    # Short path failed, file does not exist as specified.
23028    # Try adding .exe or .cmd
23029    if test -f "${new_path}.exe"; then
23030       input_to_shortpath="${new_path}.exe"
23031    elif test -f "${new_path}.cmd"; then
23032       input_to_shortpath="${new_path}.cmd"
23033    else
23034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23035$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23038      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23039    fi
23040  else
23041    input_to_shortpath="$new_path"
23042  fi
23043
23044  # Call helper function which possibly converts this using DOS-style short mode.
23045  # If so, the updated path is stored in $new_path.
23046  new_path="$input_to_shortpath"
23047
23048  input_path="$input_to_shortpath"
23049  # Check if we need to convert this using DOS-style short mode. If the path
23050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23051  # take no chances and rewrite it.
23052  # Note: m4 eats our [], so we need to use [ and ] instead.
23053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23054  if test "x$has_forbidden_chars" != x; then
23055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23059      # Going to short mode and back again did indeed matter. Since short mode is
23060      # case insensitive, let's make it lowercase to improve readability.
23061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23062      # Now convert it back to Unix-stile (cygpath)
23063      input_path=`$CYGPATH -u "$shortmode_path"`
23064      new_path="$input_path"
23065    fi
23066  fi
23067
23068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23069  if test "x$test_cygdrive_prefix" = x; then
23070    # As a simple fix, exclude /usr/bin since it's not a real path.
23071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23073      # a path prefixed by /cygdrive for fixpath to work.
23074      new_path="$CYGWIN_ROOT_PATH$input_path"
23075    fi
23076  fi
23077
23078  # remove trailing .exe if any
23079  new_path="${new_path/%.exe/}"
23080
23081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23082
23083  # First separate the path from the arguments. This will split at the first
23084  # space.
23085  complete="$RC"
23086  path="${complete%% *}"
23087  tmp="$complete EOL"
23088  arguments="${tmp#* }"
23089
23090  # Input might be given as Windows format, start by converting to
23091  # unix format.
23092  new_path="$path"
23093
23094  windows_path="$new_path"
23095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23096    unix_path=`$CYGPATH -u "$windows_path"`
23097    new_path="$unix_path"
23098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23100    new_path="$unix_path"
23101  fi
23102
23103
23104  # Now try to locate executable using which
23105  new_path=`$WHICH "$new_path" 2> /dev/null`
23106
23107  if test "x$new_path" = x; then
23108    # Oops. Which didn't find the executable.
23109    # The splitting of arguments from the executable at a space might have been incorrect,
23110    # since paths with space are more likely in Windows. Give it another try with the whole
23111    # argument.
23112    path="$complete"
23113    arguments="EOL"
23114    new_path="$path"
23115
23116  windows_path="$new_path"
23117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23118    unix_path=`$CYGPATH -u "$windows_path"`
23119    new_path="$unix_path"
23120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23122    new_path="$unix_path"
23123  fi
23124
23125
23126    new_path=`$WHICH "$new_path" 2> /dev/null`
23127
23128    if test "x$new_path" = x; then
23129      # It's still not found. Now this is an unrecoverable error.
23130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23131$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23132      has_space=`$ECHO "$complete" | $GREP " "`
23133      if test "x$has_space" != x; then
23134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23136      fi
23137      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23138    fi
23139  fi
23140
23141  # Now new_path has a complete unix path to the binary
23142  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23143    # Keep paths in /bin as-is, but remove trailing .exe if any
23144    new_path="${new_path/%.exe/}"
23145    # Do not save /bin paths to all_fixpath_prefixes!
23146  else
23147    # Not in mixed or Windows style, start by that.
23148    new_path=`cmd //c echo $new_path`
23149
23150  input_path="$new_path"
23151  # Check if we need to convert this using DOS-style short mode. If the path
23152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23153  # take no chances and rewrite it.
23154  # Note: m4 eats our [], so we need to use [ and ] instead.
23155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23156  if test "x$has_forbidden_chars" != x; then
23157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23159  fi
23160
23161    # Output is in $new_path
23162
23163  windows_path="$new_path"
23164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23165    unix_path=`$CYGPATH -u "$windows_path"`
23166    new_path="$unix_path"
23167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23169    new_path="$unix_path"
23170  fi
23171
23172    # remove trailing .exe if any
23173    new_path="${new_path/%.exe/}"
23174
23175    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23176    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23177  fi
23178
23179  else
23180    # We're on a posix platform. Hooray! :)
23181    # First separate the path from the arguments. This will split at the first
23182    # space.
23183    complete="$RC"
23184    path="${complete%% *}"
23185    tmp="$complete EOL"
23186    arguments="${tmp#* }"
23187
23188    # Cannot rely on the command "which" here since it doesn't always work.
23189    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23190    if test -z "$is_absolute_path"; then
23191      # Path to executable is not absolute. Find it.
23192      IFS_save="$IFS"
23193      IFS=:
23194      for p in $PATH; do
23195        if test -f "$p/$path" && test -x "$p/$path"; then
23196          new_path="$p/$path"
23197          break
23198        fi
23199      done
23200      IFS="$IFS_save"
23201    else
23202      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23203$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23204      new_path="$path"
23205    fi
23206
23207    if test "x$new_path" = x; then
23208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23209$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23210        has_space=`$ECHO "$complete" | $GREP " "`
23211        if test "x$has_space" != x; then
23212          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23213$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23214        fi
23215        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23216      fi
23217  fi
23218
23219      # Now join together the path and the arguments once again
23220      if test "x$arguments" != xEOL; then
23221        new_complete="$new_path ${arguments% *}"
23222      else
23223        new_complete="$new_path"
23224      fi
23225
23226  if test "x$complete" != "x$new_complete"; then
23227      RC="$new_complete"
23228      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23229$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23230    fi
23231
23232
23233    # For hotspot, we need these in Windows mixed path,
23234    # so rewrite them all. Need added .exe suffix.
23235    HOTSPOT_CXX="$CXX.exe"
23236    HOTSPOT_LD="$LD.exe"
23237    HOTSPOT_MT="$MT.exe"
23238    HOTSPOT_RC="$RC.exe"
23239
23240  unix_path="$HOTSPOT_CXX"
23241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23242    windows_path=`$CYGPATH -m "$unix_path"`
23243    HOTSPOT_CXX="$windows_path"
23244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23245    windows_path=`cmd //c echo $unix_path`
23246    HOTSPOT_CXX="$windows_path"
23247  fi
23248
23249
23250  unix_path="$HOTSPOT_LD"
23251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23252    windows_path=`$CYGPATH -m "$unix_path"`
23253    HOTSPOT_LD="$windows_path"
23254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23255    windows_path=`cmd //c echo $unix_path`
23256    HOTSPOT_LD="$windows_path"
23257  fi
23258
23259
23260  unix_path="$HOTSPOT_MT"
23261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23262    windows_path=`$CYGPATH -m "$unix_path"`
23263    HOTSPOT_MT="$windows_path"
23264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23265    windows_path=`cmd //c echo $unix_path`
23266    HOTSPOT_MT="$windows_path"
23267  fi
23268
23269
23270  unix_path="$HOTSPOT_RC"
23271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23272    windows_path=`$CYGPATH -m "$unix_path"`
23273    HOTSPOT_RC="$windows_path"
23274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23275    windows_path=`cmd //c echo $unix_path`
23276    HOTSPOT_RC="$windows_path"
23277  fi
23278
23279
23280
23281
23282    RC_FLAGS="-nologo -l 0x409 -r"
23283    if test "x$VARIANT" = xOPT; then :
23284
23285        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23286
23287fi
23288    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23289    if test "x$JDK_UPDATE_VERSION" = x; then :
23290
23291        JDK_UPDATE_VERSION_NOTNULL=0
23292
23293fi
23294    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23295    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23296    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23297    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23298    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23299    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23300    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23301
23302    # lib.exe is used to create static libraries.
23303    # Extract the first word of "lib", so it can be a program name with args.
23304set dummy lib; ac_word=$2
23305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23306$as_echo_n "checking for $ac_word... " >&6; }
23307if test "${ac_cv_prog_WINAR+set}" = set; then :
23308  $as_echo_n "(cached) " >&6
23309else
23310  if test -n "$WINAR"; then
23311  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23312else
23313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23314for as_dir in $PATH
23315do
23316  IFS=$as_save_IFS
23317  test -z "$as_dir" && as_dir=.
23318    for ac_exec_ext in '' $ac_executable_extensions; do
23319  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23320    ac_cv_prog_WINAR="lib"
23321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23322    break 2
23323  fi
23324done
23325  done
23326IFS=$as_save_IFS
23327
23328fi
23329fi
23330WINAR=$ac_cv_prog_WINAR
23331if test -n "$WINAR"; then
23332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23333$as_echo "$WINAR" >&6; }
23334else
23335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23336$as_echo "no" >&6; }
23337fi
23338
23339
23340
23341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23342
23343  # First separate the path from the arguments. This will split at the first
23344  # space.
23345  complete="$WINAR"
23346  path="${complete%% *}"
23347  tmp="$complete EOL"
23348  arguments="${tmp#* }"
23349
23350  # Input might be given as Windows format, start by converting to
23351  # unix format.
23352  new_path=`$CYGPATH -u "$path"`
23353
23354  # Now try to locate executable using which
23355  new_path=`$WHICH "$new_path" 2> /dev/null`
23356  # bat and cmd files are not always considered executable in cygwin causing which
23357  # to not find them
23358  if test "x$new_path" = x \
23359           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23360           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23361    new_path=`$CYGPATH -u "$path"`
23362  fi
23363  if test "x$new_path" = x; then
23364    # Oops. Which didn't find the executable.
23365    # The splitting of arguments from the executable at a space might have been incorrect,
23366    # since paths with space are more likely in Windows. Give it another try with the whole
23367    # argument.
23368    path="$complete"
23369    arguments="EOL"
23370    new_path=`$CYGPATH -u "$path"`
23371    new_path=`$WHICH "$new_path" 2> /dev/null`
23372    # bat and cmd files are not always considered executable in cygwin causing which
23373    # to not find them
23374    if test "x$new_path" = x \
23375             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23376             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23377      new_path=`$CYGPATH -u "$path"`
23378    fi
23379    if test "x$new_path" = x; then
23380      # It's still not found. Now this is an unrecoverable error.
23381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23382$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23383      has_space=`$ECHO "$complete" | $GREP " "`
23384      if test "x$has_space" != x; then
23385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23387      fi
23388      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23389    fi
23390  fi
23391
23392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23395  # "foo.exe" is OK but "foo" is an error.
23396  #
23397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23398  # It is also a way to make sure we got the proper file name for the real test later on.
23399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23400  if test "x$test_shortpath" = x; then
23401    # Short path failed, file does not exist as specified.
23402    # Try adding .exe or .cmd
23403    if test -f "${new_path}.exe"; then
23404       input_to_shortpath="${new_path}.exe"
23405    elif test -f "${new_path}.cmd"; then
23406       input_to_shortpath="${new_path}.cmd"
23407    else
23408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23409$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23410      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23411$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23412      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23413    fi
23414  else
23415    input_to_shortpath="$new_path"
23416  fi
23417
23418  # Call helper function which possibly converts this using DOS-style short mode.
23419  # If so, the updated path is stored in $new_path.
23420  new_path="$input_to_shortpath"
23421
23422  input_path="$input_to_shortpath"
23423  # Check if we need to convert this using DOS-style short mode. If the path
23424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23425  # take no chances and rewrite it.
23426  # Note: m4 eats our [], so we need to use [ and ] instead.
23427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23428  if test "x$has_forbidden_chars" != x; then
23429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23433      # Going to short mode and back again did indeed matter. Since short mode is
23434      # case insensitive, let's make it lowercase to improve readability.
23435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23436      # Now convert it back to Unix-stile (cygpath)
23437      input_path=`$CYGPATH -u "$shortmode_path"`
23438      new_path="$input_path"
23439    fi
23440  fi
23441
23442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23443  if test "x$test_cygdrive_prefix" = x; then
23444    # As a simple fix, exclude /usr/bin since it's not a real path.
23445    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23447      # a path prefixed by /cygdrive for fixpath to work.
23448      new_path="$CYGWIN_ROOT_PATH$input_path"
23449    fi
23450  fi
23451
23452  # remove trailing .exe if any
23453  new_path="${new_path/%.exe/}"
23454
23455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23456
23457  # First separate the path from the arguments. This will split at the first
23458  # space.
23459  complete="$WINAR"
23460  path="${complete%% *}"
23461  tmp="$complete EOL"
23462  arguments="${tmp#* }"
23463
23464  # Input might be given as Windows format, start by converting to
23465  # unix format.
23466  new_path="$path"
23467
23468  windows_path="$new_path"
23469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23470    unix_path=`$CYGPATH -u "$windows_path"`
23471    new_path="$unix_path"
23472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23474    new_path="$unix_path"
23475  fi
23476
23477
23478  # Now try to locate executable using which
23479  new_path=`$WHICH "$new_path" 2> /dev/null`
23480
23481  if test "x$new_path" = x; then
23482    # Oops. Which didn't find the executable.
23483    # The splitting of arguments from the executable at a space might have been incorrect,
23484    # since paths with space are more likely in Windows. Give it another try with the whole
23485    # argument.
23486    path="$complete"
23487    arguments="EOL"
23488    new_path="$path"
23489
23490  windows_path="$new_path"
23491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23492    unix_path=`$CYGPATH -u "$windows_path"`
23493    new_path="$unix_path"
23494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23496    new_path="$unix_path"
23497  fi
23498
23499
23500    new_path=`$WHICH "$new_path" 2> /dev/null`
23501
23502    if test "x$new_path" = x; then
23503      # It's still not found. Now this is an unrecoverable error.
23504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23505$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23506      has_space=`$ECHO "$complete" | $GREP " "`
23507      if test "x$has_space" != x; then
23508        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23509$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23510      fi
23511      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23512    fi
23513  fi
23514
23515  # Now new_path has a complete unix path to the binary
23516  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23517    # Keep paths in /bin as-is, but remove trailing .exe if any
23518    new_path="${new_path/%.exe/}"
23519    # Do not save /bin paths to all_fixpath_prefixes!
23520  else
23521    # Not in mixed or Windows style, start by that.
23522    new_path=`cmd //c echo $new_path`
23523
23524  input_path="$new_path"
23525  # Check if we need to convert this using DOS-style short mode. If the path
23526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23527  # take no chances and rewrite it.
23528  # Note: m4 eats our [], so we need to use [ and ] instead.
23529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23530  if test "x$has_forbidden_chars" != x; then
23531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23532    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23533  fi
23534
23535    # Output is in $new_path
23536
23537  windows_path="$new_path"
23538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23539    unix_path=`$CYGPATH -u "$windows_path"`
23540    new_path="$unix_path"
23541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23543    new_path="$unix_path"
23544  fi
23545
23546    # remove trailing .exe if any
23547    new_path="${new_path/%.exe/}"
23548
23549    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23550    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23551  fi
23552
23553  else
23554    # We're on a posix platform. Hooray! :)
23555    # First separate the path from the arguments. This will split at the first
23556    # space.
23557    complete="$WINAR"
23558    path="${complete%% *}"
23559    tmp="$complete EOL"
23560    arguments="${tmp#* }"
23561
23562    # Cannot rely on the command "which" here since it doesn't always work.
23563    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23564    if test -z "$is_absolute_path"; then
23565      # Path to executable is not absolute. Find it.
23566      IFS_save="$IFS"
23567      IFS=:
23568      for p in $PATH; do
23569        if test -f "$p/$path" && test -x "$p/$path"; then
23570          new_path="$p/$path"
23571          break
23572        fi
23573      done
23574      IFS="$IFS_save"
23575    else
23576      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23577$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23578      new_path="$path"
23579    fi
23580
23581    if test "x$new_path" = x; then
23582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23583$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23584        has_space=`$ECHO "$complete" | $GREP " "`
23585        if test "x$has_space" != x; then
23586          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23587$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23588        fi
23589        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23590      fi
23591  fi
23592
23593      # Now join together the path and the arguments once again
23594      if test "x$arguments" != xEOL; then
23595        new_complete="$new_path ${arguments% *}"
23596      else
23597        new_complete="$new_path"
23598      fi
23599
23600  if test "x$complete" != "x$new_complete"; then
23601      WINAR="$new_complete"
23602      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23603$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23604    fi
23605
23606    AR="$WINAR"
23607    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23608
23609    # Extract the first word of "dumpbin", so it can be a program name with args.
23610set dummy dumpbin; ac_word=$2
23611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23612$as_echo_n "checking for $ac_word... " >&6; }
23613if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23614  $as_echo_n "(cached) " >&6
23615else
23616  if test -n "$DUMPBIN"; then
23617  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23618else
23619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23620for as_dir in $PATH
23621do
23622  IFS=$as_save_IFS
23623  test -z "$as_dir" && as_dir=.
23624    for ac_exec_ext in '' $ac_executable_extensions; do
23625  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23626    ac_cv_prog_DUMPBIN="dumpbin"
23627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23628    break 2
23629  fi
23630done
23631  done
23632IFS=$as_save_IFS
23633
23634fi
23635fi
23636DUMPBIN=$ac_cv_prog_DUMPBIN
23637if test -n "$DUMPBIN"; then
23638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23639$as_echo "$DUMPBIN" >&6; }
23640else
23641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23642$as_echo "no" >&6; }
23643fi
23644
23645
23646
23647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23648
23649  # First separate the path from the arguments. This will split at the first
23650  # space.
23651  complete="$DUMPBIN"
23652  path="${complete%% *}"
23653  tmp="$complete EOL"
23654  arguments="${tmp#* }"
23655
23656  # Input might be given as Windows format, start by converting to
23657  # unix format.
23658  new_path=`$CYGPATH -u "$path"`
23659
23660  # Now try to locate executable using which
23661  new_path=`$WHICH "$new_path" 2> /dev/null`
23662  # bat and cmd files are not always considered executable in cygwin causing which
23663  # to not find them
23664  if test "x$new_path" = x \
23665           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23666           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23667    new_path=`$CYGPATH -u "$path"`
23668  fi
23669  if test "x$new_path" = x; then
23670    # Oops. Which didn't find the executable.
23671    # The splitting of arguments from the executable at a space might have been incorrect,
23672    # since paths with space are more likely in Windows. Give it another try with the whole
23673    # argument.
23674    path="$complete"
23675    arguments="EOL"
23676    new_path=`$CYGPATH -u "$path"`
23677    new_path=`$WHICH "$new_path" 2> /dev/null`
23678    # bat and cmd files are not always considered executable in cygwin causing which
23679    # to not find them
23680    if test "x$new_path" = x \
23681             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23682             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23683      new_path=`$CYGPATH -u "$path"`
23684    fi
23685    if test "x$new_path" = x; then
23686      # It's still not found. Now this is an unrecoverable error.
23687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23688$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23689      has_space=`$ECHO "$complete" | $GREP " "`
23690      if test "x$has_space" != x; then
23691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23693      fi
23694      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23695    fi
23696  fi
23697
23698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23701  # "foo.exe" is OK but "foo" is an error.
23702  #
23703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23704  # It is also a way to make sure we got the proper file name for the real test later on.
23705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23706  if test "x$test_shortpath" = x; then
23707    # Short path failed, file does not exist as specified.
23708    # Try adding .exe or .cmd
23709    if test -f "${new_path}.exe"; then
23710       input_to_shortpath="${new_path}.exe"
23711    elif test -f "${new_path}.cmd"; then
23712       input_to_shortpath="${new_path}.cmd"
23713    else
23714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23715$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23718      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23719    fi
23720  else
23721    input_to_shortpath="$new_path"
23722  fi
23723
23724  # Call helper function which possibly converts this using DOS-style short mode.
23725  # If so, the updated path is stored in $new_path.
23726  new_path="$input_to_shortpath"
23727
23728  input_path="$input_to_shortpath"
23729  # Check if we need to convert this using DOS-style short mode. If the path
23730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23731  # take no chances and rewrite it.
23732  # Note: m4 eats our [], so we need to use [ and ] instead.
23733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23734  if test "x$has_forbidden_chars" != x; then
23735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23739      # Going to short mode and back again did indeed matter. Since short mode is
23740      # case insensitive, let's make it lowercase to improve readability.
23741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23742      # Now convert it back to Unix-stile (cygpath)
23743      input_path=`$CYGPATH -u "$shortmode_path"`
23744      new_path="$input_path"
23745    fi
23746  fi
23747
23748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23749  if test "x$test_cygdrive_prefix" = x; then
23750    # As a simple fix, exclude /usr/bin since it's not a real path.
23751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23753      # a path prefixed by /cygdrive for fixpath to work.
23754      new_path="$CYGWIN_ROOT_PATH$input_path"
23755    fi
23756  fi
23757
23758  # remove trailing .exe if any
23759  new_path="${new_path/%.exe/}"
23760
23761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23762
23763  # First separate the path from the arguments. This will split at the first
23764  # space.
23765  complete="$DUMPBIN"
23766  path="${complete%% *}"
23767  tmp="$complete EOL"
23768  arguments="${tmp#* }"
23769
23770  # Input might be given as Windows format, start by converting to
23771  # unix format.
23772  new_path="$path"
23773
23774  windows_path="$new_path"
23775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23776    unix_path=`$CYGPATH -u "$windows_path"`
23777    new_path="$unix_path"
23778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23780    new_path="$unix_path"
23781  fi
23782
23783
23784  # Now try to locate executable using which
23785  new_path=`$WHICH "$new_path" 2> /dev/null`
23786
23787  if test "x$new_path" = x; then
23788    # Oops. Which didn't find the executable.
23789    # The splitting of arguments from the executable at a space might have been incorrect,
23790    # since paths with space are more likely in Windows. Give it another try with the whole
23791    # argument.
23792    path="$complete"
23793    arguments="EOL"
23794    new_path="$path"
23795
23796  windows_path="$new_path"
23797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23798    unix_path=`$CYGPATH -u "$windows_path"`
23799    new_path="$unix_path"
23800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23802    new_path="$unix_path"
23803  fi
23804
23805
23806    new_path=`$WHICH "$new_path" 2> /dev/null`
23807
23808    if test "x$new_path" = x; then
23809      # It's still not found. Now this is an unrecoverable error.
23810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23811$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23812      has_space=`$ECHO "$complete" | $GREP " "`
23813      if test "x$has_space" != x; then
23814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23816      fi
23817      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23818    fi
23819  fi
23820
23821  # Now new_path has a complete unix path to the binary
23822  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23823    # Keep paths in /bin as-is, but remove trailing .exe if any
23824    new_path="${new_path/%.exe/}"
23825    # Do not save /bin paths to all_fixpath_prefixes!
23826  else
23827    # Not in mixed or Windows style, start by that.
23828    new_path=`cmd //c echo $new_path`
23829
23830  input_path="$new_path"
23831  # Check if we need to convert this using DOS-style short mode. If the path
23832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23833  # take no chances and rewrite it.
23834  # Note: m4 eats our [], so we need to use [ and ] instead.
23835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23836  if test "x$has_forbidden_chars" != x; then
23837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23839  fi
23840
23841    # Output is in $new_path
23842
23843  windows_path="$new_path"
23844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23845    unix_path=`$CYGPATH -u "$windows_path"`
23846    new_path="$unix_path"
23847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23849    new_path="$unix_path"
23850  fi
23851
23852    # remove trailing .exe if any
23853    new_path="${new_path/%.exe/}"
23854
23855    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23856    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23857  fi
23858
23859  else
23860    # We're on a posix platform. Hooray! :)
23861    # First separate the path from the arguments. This will split at the first
23862    # space.
23863    complete="$DUMPBIN"
23864    path="${complete%% *}"
23865    tmp="$complete EOL"
23866    arguments="${tmp#* }"
23867
23868    # Cannot rely on the command "which" here since it doesn't always work.
23869    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23870    if test -z "$is_absolute_path"; then
23871      # Path to executable is not absolute. Find it.
23872      IFS_save="$IFS"
23873      IFS=:
23874      for p in $PATH; do
23875        if test -f "$p/$path" && test -x "$p/$path"; then
23876          new_path="$p/$path"
23877          break
23878        fi
23879      done
23880      IFS="$IFS_save"
23881    else
23882      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23883$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23884      new_path="$path"
23885    fi
23886
23887    if test "x$new_path" = x; then
23888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23889$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23890        has_space=`$ECHO "$complete" | $GREP " "`
23891        if test "x$has_space" != x; then
23892          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23893$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23894        fi
23895        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23896      fi
23897  fi
23898
23899      # Now join together the path and the arguments once again
23900      if test "x$arguments" != xEOL; then
23901        new_complete="$new_path ${arguments% *}"
23902      else
23903        new_complete="$new_path"
23904      fi
23905
23906  if test "x$complete" != "x$new_complete"; then
23907      DUMPBIN="$new_complete"
23908      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23909$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23910    fi
23911
23912
23913    COMPILER_TYPE=CL
23914    CCXXFLAGS="$CCXXFLAGS -nologo"
23915
23916fi
23917
23918
23919
23920ac_ext=c
23921ac_cpp='$CPP $CPPFLAGS'
23922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23924ac_compiler_gnu=$ac_cv_c_compiler_gnu
23925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23926$as_echo_n "checking how to run the C preprocessor... " >&6; }
23927# On Suns, sometimes $CPP names a directory.
23928if test -n "$CPP" && test -d "$CPP"; then
23929  CPP=
23930fi
23931if test -z "$CPP"; then
23932  if test "${ac_cv_prog_CPP+set}" = set; then :
23933  $as_echo_n "(cached) " >&6
23934else
23935      # Double quotes because CPP needs to be expanded
23936    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23937    do
23938      ac_preproc_ok=false
23939for ac_c_preproc_warn_flag in '' yes
23940do
23941  # Use a header file that comes with gcc, so configuring glibc
23942  # with a fresh cross-compiler works.
23943  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23944  # <limits.h> exists even on freestanding compilers.
23945  # On the NeXT, cc -E runs the code through the compiler's parser,
23946  # not just through cpp. "Syntax error" is here to catch this case.
23947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23948/* end confdefs.h.  */
23949#ifdef __STDC__
23950# include <limits.h>
23951#else
23952# include <assert.h>
23953#endif
23954		     Syntax error
23955_ACEOF
23956if ac_fn_c_try_cpp "$LINENO"; then :
23957
23958else
23959  # Broken: fails on valid input.
23960continue
23961fi
23962rm -f conftest.err conftest.i conftest.$ac_ext
23963
23964  # OK, works on sane cases.  Now check whether nonexistent headers
23965  # can be detected and how.
23966  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23967/* end confdefs.h.  */
23968#include <ac_nonexistent.h>
23969_ACEOF
23970if ac_fn_c_try_cpp "$LINENO"; then :
23971  # Broken: success on invalid input.
23972continue
23973else
23974  # Passes both tests.
23975ac_preproc_ok=:
23976break
23977fi
23978rm -f conftest.err conftest.i conftest.$ac_ext
23979
23980done
23981# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23982rm -f conftest.i conftest.err conftest.$ac_ext
23983if $ac_preproc_ok; then :
23984  break
23985fi
23986
23987    done
23988    ac_cv_prog_CPP=$CPP
23989
23990fi
23991  CPP=$ac_cv_prog_CPP
23992else
23993  ac_cv_prog_CPP=$CPP
23994fi
23995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23996$as_echo "$CPP" >&6; }
23997ac_preproc_ok=false
23998for ac_c_preproc_warn_flag in '' yes
23999do
24000  # Use a header file that comes with gcc, so configuring glibc
24001  # with a fresh cross-compiler works.
24002  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24003  # <limits.h> exists even on freestanding compilers.
24004  # On the NeXT, cc -E runs the code through the compiler's parser,
24005  # not just through cpp. "Syntax error" is here to catch this case.
24006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24007/* end confdefs.h.  */
24008#ifdef __STDC__
24009# include <limits.h>
24010#else
24011# include <assert.h>
24012#endif
24013		     Syntax error
24014_ACEOF
24015if ac_fn_c_try_cpp "$LINENO"; then :
24016
24017else
24018  # Broken: fails on valid input.
24019continue
24020fi
24021rm -f conftest.err conftest.i conftest.$ac_ext
24022
24023  # OK, works on sane cases.  Now check whether nonexistent headers
24024  # can be detected and how.
24025  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24026/* end confdefs.h.  */
24027#include <ac_nonexistent.h>
24028_ACEOF
24029if ac_fn_c_try_cpp "$LINENO"; then :
24030  # Broken: success on invalid input.
24031continue
24032else
24033  # Passes both tests.
24034ac_preproc_ok=:
24035break
24036fi
24037rm -f conftest.err conftest.i conftest.$ac_ext
24038
24039done
24040# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24041rm -f conftest.i conftest.err conftest.$ac_ext
24042if $ac_preproc_ok; then :
24043
24044else
24045  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24046$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24047as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24048See \`config.log' for more details" "$LINENO" 5 ; }
24049fi
24050
24051ac_ext=cpp
24052ac_cpp='$CXXCPP $CPPFLAGS'
24053ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24054ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24055ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24056
24057
24058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24059
24060  # First separate the path from the arguments. This will split at the first
24061  # space.
24062  complete="$CPP"
24063  path="${complete%% *}"
24064  tmp="$complete EOL"
24065  arguments="${tmp#* }"
24066
24067  # Input might be given as Windows format, start by converting to
24068  # unix format.
24069  new_path=`$CYGPATH -u "$path"`
24070
24071  # Now try to locate executable using which
24072  new_path=`$WHICH "$new_path" 2> /dev/null`
24073  # bat and cmd files are not always considered executable in cygwin causing which
24074  # to not find them
24075  if test "x$new_path" = x \
24076           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24077           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24078    new_path=`$CYGPATH -u "$path"`
24079  fi
24080  if test "x$new_path" = x; then
24081    # Oops. Which didn't find the executable.
24082    # The splitting of arguments from the executable at a space might have been incorrect,
24083    # since paths with space are more likely in Windows. Give it another try with the whole
24084    # argument.
24085    path="$complete"
24086    arguments="EOL"
24087    new_path=`$CYGPATH -u "$path"`
24088    new_path=`$WHICH "$new_path" 2> /dev/null`
24089    # bat and cmd files are not always considered executable in cygwin causing which
24090    # to not find them
24091    if test "x$new_path" = x \
24092             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24093             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24094      new_path=`$CYGPATH -u "$path"`
24095    fi
24096    if test "x$new_path" = x; then
24097      # It's still not found. Now this is an unrecoverable error.
24098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24099$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24100      has_space=`$ECHO "$complete" | $GREP " "`
24101      if test "x$has_space" != x; then
24102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24104      fi
24105      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24106    fi
24107  fi
24108
24109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24112  # "foo.exe" is OK but "foo" is an error.
24113  #
24114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24115  # It is also a way to make sure we got the proper file name for the real test later on.
24116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24117  if test "x$test_shortpath" = x; then
24118    # Short path failed, file does not exist as specified.
24119    # Try adding .exe or .cmd
24120    if test -f "${new_path}.exe"; then
24121       input_to_shortpath="${new_path}.exe"
24122    elif test -f "${new_path}.cmd"; then
24123       input_to_shortpath="${new_path}.cmd"
24124    else
24125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24126$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24127      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24128$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24129      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24130    fi
24131  else
24132    input_to_shortpath="$new_path"
24133  fi
24134
24135  # Call helper function which possibly converts this using DOS-style short mode.
24136  # If so, the updated path is stored in $new_path.
24137  new_path="$input_to_shortpath"
24138
24139  input_path="$input_to_shortpath"
24140  # Check if we need to convert this using DOS-style short mode. If the path
24141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24142  # take no chances and rewrite it.
24143  # Note: m4 eats our [], so we need to use [ and ] instead.
24144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24145  if test "x$has_forbidden_chars" != x; then
24146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24150      # Going to short mode and back again did indeed matter. Since short mode is
24151      # case insensitive, let's make it lowercase to improve readability.
24152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24153      # Now convert it back to Unix-stile (cygpath)
24154      input_path=`$CYGPATH -u "$shortmode_path"`
24155      new_path="$input_path"
24156    fi
24157  fi
24158
24159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24160  if test "x$test_cygdrive_prefix" = x; then
24161    # As a simple fix, exclude /usr/bin since it's not a real path.
24162    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24164      # a path prefixed by /cygdrive for fixpath to work.
24165      new_path="$CYGWIN_ROOT_PATH$input_path"
24166    fi
24167  fi
24168
24169  # remove trailing .exe if any
24170  new_path="${new_path/%.exe/}"
24171
24172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24173
24174  # First separate the path from the arguments. This will split at the first
24175  # space.
24176  complete="$CPP"
24177  path="${complete%% *}"
24178  tmp="$complete EOL"
24179  arguments="${tmp#* }"
24180
24181  # Input might be given as Windows format, start by converting to
24182  # unix format.
24183  new_path="$path"
24184
24185  windows_path="$new_path"
24186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24187    unix_path=`$CYGPATH -u "$windows_path"`
24188    new_path="$unix_path"
24189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24191    new_path="$unix_path"
24192  fi
24193
24194
24195  # Now try to locate executable using which
24196  new_path=`$WHICH "$new_path" 2> /dev/null`
24197
24198  if test "x$new_path" = x; then
24199    # Oops. Which didn't find the executable.
24200    # The splitting of arguments from the executable at a space might have been incorrect,
24201    # since paths with space are more likely in Windows. Give it another try with the whole
24202    # argument.
24203    path="$complete"
24204    arguments="EOL"
24205    new_path="$path"
24206
24207  windows_path="$new_path"
24208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24209    unix_path=`$CYGPATH -u "$windows_path"`
24210    new_path="$unix_path"
24211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24213    new_path="$unix_path"
24214  fi
24215
24216
24217    new_path=`$WHICH "$new_path" 2> /dev/null`
24218
24219    if test "x$new_path" = x; then
24220      # It's still not found. Now this is an unrecoverable error.
24221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24222$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24223      has_space=`$ECHO "$complete" | $GREP " "`
24224      if test "x$has_space" != x; then
24225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24227      fi
24228      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24229    fi
24230  fi
24231
24232  # Now new_path has a complete unix path to the binary
24233  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24234    # Keep paths in /bin as-is, but remove trailing .exe if any
24235    new_path="${new_path/%.exe/}"
24236    # Do not save /bin paths to all_fixpath_prefixes!
24237  else
24238    # Not in mixed or Windows style, start by that.
24239    new_path=`cmd //c echo $new_path`
24240
24241  input_path="$new_path"
24242  # Check if we need to convert this using DOS-style short mode. If the path
24243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24244  # take no chances and rewrite it.
24245  # Note: m4 eats our [], so we need to use [ and ] instead.
24246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24247  if test "x$has_forbidden_chars" != x; then
24248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24250  fi
24251
24252    # Output is in $new_path
24253
24254  windows_path="$new_path"
24255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24256    unix_path=`$CYGPATH -u "$windows_path"`
24257    new_path="$unix_path"
24258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24260    new_path="$unix_path"
24261  fi
24262
24263    # remove trailing .exe if any
24264    new_path="${new_path/%.exe/}"
24265
24266    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24267    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24268  fi
24269
24270  else
24271    # We're on a posix platform. Hooray! :)
24272    # First separate the path from the arguments. This will split at the first
24273    # space.
24274    complete="$CPP"
24275    path="${complete%% *}"
24276    tmp="$complete EOL"
24277    arguments="${tmp#* }"
24278
24279    # Cannot rely on the command "which" here since it doesn't always work.
24280    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24281    if test -z "$is_absolute_path"; then
24282      # Path to executable is not absolute. Find it.
24283      IFS_save="$IFS"
24284      IFS=:
24285      for p in $PATH; do
24286        if test -f "$p/$path" && test -x "$p/$path"; then
24287          new_path="$p/$path"
24288          break
24289        fi
24290      done
24291      IFS="$IFS_save"
24292    else
24293      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24294$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24295      new_path="$path"
24296    fi
24297
24298    if test "x$new_path" = x; then
24299        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24300$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24301        has_space=`$ECHO "$complete" | $GREP " "`
24302        if test "x$has_space" != x; then
24303          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24304$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24305        fi
24306        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24307      fi
24308  fi
24309
24310      # Now join together the path and the arguments once again
24311      if test "x$arguments" != xEOL; then
24312        new_complete="$new_path ${arguments% *}"
24313      else
24314        new_complete="$new_path"
24315      fi
24316
24317  if test "x$complete" != "x$new_complete"; then
24318      CPP="$new_complete"
24319      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24320$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24321    fi
24322
24323
24324ac_ext=cpp
24325ac_cpp='$CXXCPP $CPPFLAGS'
24326ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24327ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24328ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24330$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24331if test -z "$CXXCPP"; then
24332  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24333  $as_echo_n "(cached) " >&6
24334else
24335      # Double quotes because CXXCPP needs to be expanded
24336    for CXXCPP in "$CXX -E" "/lib/cpp"
24337    do
24338      ac_preproc_ok=false
24339for ac_cxx_preproc_warn_flag in '' yes
24340do
24341  # Use a header file that comes with gcc, so configuring glibc
24342  # with a fresh cross-compiler works.
24343  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24344  # <limits.h> exists even on freestanding compilers.
24345  # On the NeXT, cc -E runs the code through the compiler's parser,
24346  # not just through cpp. "Syntax error" is here to catch this case.
24347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24348/* end confdefs.h.  */
24349#ifdef __STDC__
24350# include <limits.h>
24351#else
24352# include <assert.h>
24353#endif
24354		     Syntax error
24355_ACEOF
24356if ac_fn_cxx_try_cpp "$LINENO"; then :
24357
24358else
24359  # Broken: fails on valid input.
24360continue
24361fi
24362rm -f conftest.err conftest.i conftest.$ac_ext
24363
24364  # OK, works on sane cases.  Now check whether nonexistent headers
24365  # can be detected and how.
24366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24367/* end confdefs.h.  */
24368#include <ac_nonexistent.h>
24369_ACEOF
24370if ac_fn_cxx_try_cpp "$LINENO"; then :
24371  # Broken: success on invalid input.
24372continue
24373else
24374  # Passes both tests.
24375ac_preproc_ok=:
24376break
24377fi
24378rm -f conftest.err conftest.i conftest.$ac_ext
24379
24380done
24381# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24382rm -f conftest.i conftest.err conftest.$ac_ext
24383if $ac_preproc_ok; then :
24384  break
24385fi
24386
24387    done
24388    ac_cv_prog_CXXCPP=$CXXCPP
24389
24390fi
24391  CXXCPP=$ac_cv_prog_CXXCPP
24392else
24393  ac_cv_prog_CXXCPP=$CXXCPP
24394fi
24395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24396$as_echo "$CXXCPP" >&6; }
24397ac_preproc_ok=false
24398for ac_cxx_preproc_warn_flag in '' yes
24399do
24400  # Use a header file that comes with gcc, so configuring glibc
24401  # with a fresh cross-compiler works.
24402  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24403  # <limits.h> exists even on freestanding compilers.
24404  # On the NeXT, cc -E runs the code through the compiler's parser,
24405  # not just through cpp. "Syntax error" is here to catch this case.
24406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24407/* end confdefs.h.  */
24408#ifdef __STDC__
24409# include <limits.h>
24410#else
24411# include <assert.h>
24412#endif
24413		     Syntax error
24414_ACEOF
24415if ac_fn_cxx_try_cpp "$LINENO"; then :
24416
24417else
24418  # Broken: fails on valid input.
24419continue
24420fi
24421rm -f conftest.err conftest.i conftest.$ac_ext
24422
24423  # OK, works on sane cases.  Now check whether nonexistent headers
24424  # can be detected and how.
24425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24426/* end confdefs.h.  */
24427#include <ac_nonexistent.h>
24428_ACEOF
24429if ac_fn_cxx_try_cpp "$LINENO"; then :
24430  # Broken: success on invalid input.
24431continue
24432else
24433  # Passes both tests.
24434ac_preproc_ok=:
24435break
24436fi
24437rm -f conftest.err conftest.i conftest.$ac_ext
24438
24439done
24440# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24441rm -f conftest.i conftest.err conftest.$ac_ext
24442if $ac_preproc_ok; then :
24443
24444else
24445  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24446$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24447as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24448See \`config.log' for more details" "$LINENO" 5 ; }
24449fi
24450
24451ac_ext=cpp
24452ac_cpp='$CXXCPP $CPPFLAGS'
24453ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24454ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24455ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24456
24457
24458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24459
24460  # First separate the path from the arguments. This will split at the first
24461  # space.
24462  complete="$CXXCPP"
24463  path="${complete%% *}"
24464  tmp="$complete EOL"
24465  arguments="${tmp#* }"
24466
24467  # Input might be given as Windows format, start by converting to
24468  # unix format.
24469  new_path=`$CYGPATH -u "$path"`
24470
24471  # Now try to locate executable using which
24472  new_path=`$WHICH "$new_path" 2> /dev/null`
24473  # bat and cmd files are not always considered executable in cygwin causing which
24474  # to not find them
24475  if test "x$new_path" = x \
24476           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24477           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24478    new_path=`$CYGPATH -u "$path"`
24479  fi
24480  if test "x$new_path" = x; then
24481    # Oops. Which didn't find the executable.
24482    # The splitting of arguments from the executable at a space might have been incorrect,
24483    # since paths with space are more likely in Windows. Give it another try with the whole
24484    # argument.
24485    path="$complete"
24486    arguments="EOL"
24487    new_path=`$CYGPATH -u "$path"`
24488    new_path=`$WHICH "$new_path" 2> /dev/null`
24489    # bat and cmd files are not always considered executable in cygwin causing which
24490    # to not find them
24491    if test "x$new_path" = x \
24492             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24493             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24494      new_path=`$CYGPATH -u "$path"`
24495    fi
24496    if test "x$new_path" = x; then
24497      # It's still not found. Now this is an unrecoverable error.
24498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24499$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24500      has_space=`$ECHO "$complete" | $GREP " "`
24501      if test "x$has_space" != x; then
24502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24504      fi
24505      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24506    fi
24507  fi
24508
24509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24512  # "foo.exe" is OK but "foo" is an error.
24513  #
24514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24515  # It is also a way to make sure we got the proper file name for the real test later on.
24516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24517  if test "x$test_shortpath" = x; then
24518    # Short path failed, file does not exist as specified.
24519    # Try adding .exe or .cmd
24520    if test -f "${new_path}.exe"; then
24521       input_to_shortpath="${new_path}.exe"
24522    elif test -f "${new_path}.cmd"; then
24523       input_to_shortpath="${new_path}.cmd"
24524    else
24525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24526$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24527      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24528$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24529      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24530    fi
24531  else
24532    input_to_shortpath="$new_path"
24533  fi
24534
24535  # Call helper function which possibly converts this using DOS-style short mode.
24536  # If so, the updated path is stored in $new_path.
24537  new_path="$input_to_shortpath"
24538
24539  input_path="$input_to_shortpath"
24540  # Check if we need to convert this using DOS-style short mode. If the path
24541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24542  # take no chances and rewrite it.
24543  # Note: m4 eats our [], so we need to use [ and ] instead.
24544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24545  if test "x$has_forbidden_chars" != x; then
24546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24550      # Going to short mode and back again did indeed matter. Since short mode is
24551      # case insensitive, let's make it lowercase to improve readability.
24552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24553      # Now convert it back to Unix-stile (cygpath)
24554      input_path=`$CYGPATH -u "$shortmode_path"`
24555      new_path="$input_path"
24556    fi
24557  fi
24558
24559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24560  if test "x$test_cygdrive_prefix" = x; then
24561    # As a simple fix, exclude /usr/bin since it's not a real path.
24562    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24564      # a path prefixed by /cygdrive for fixpath to work.
24565      new_path="$CYGWIN_ROOT_PATH$input_path"
24566    fi
24567  fi
24568
24569  # remove trailing .exe if any
24570  new_path="${new_path/%.exe/}"
24571
24572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24573
24574  # First separate the path from the arguments. This will split at the first
24575  # space.
24576  complete="$CXXCPP"
24577  path="${complete%% *}"
24578  tmp="$complete EOL"
24579  arguments="${tmp#* }"
24580
24581  # Input might be given as Windows format, start by converting to
24582  # unix format.
24583  new_path="$path"
24584
24585  windows_path="$new_path"
24586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24587    unix_path=`$CYGPATH -u "$windows_path"`
24588    new_path="$unix_path"
24589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24591    new_path="$unix_path"
24592  fi
24593
24594
24595  # Now try to locate executable using which
24596  new_path=`$WHICH "$new_path" 2> /dev/null`
24597
24598  if test "x$new_path" = x; then
24599    # Oops. Which didn't find the executable.
24600    # The splitting of arguments from the executable at a space might have been incorrect,
24601    # since paths with space are more likely in Windows. Give it another try with the whole
24602    # argument.
24603    path="$complete"
24604    arguments="EOL"
24605    new_path="$path"
24606
24607  windows_path="$new_path"
24608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24609    unix_path=`$CYGPATH -u "$windows_path"`
24610    new_path="$unix_path"
24611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24613    new_path="$unix_path"
24614  fi
24615
24616
24617    new_path=`$WHICH "$new_path" 2> /dev/null`
24618
24619    if test "x$new_path" = x; then
24620      # It's still not found. Now this is an unrecoverable error.
24621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24622$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24623      has_space=`$ECHO "$complete" | $GREP " "`
24624      if test "x$has_space" != x; then
24625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24627      fi
24628      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24629    fi
24630  fi
24631
24632  # Now new_path has a complete unix path to the binary
24633  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24634    # Keep paths in /bin as-is, but remove trailing .exe if any
24635    new_path="${new_path/%.exe/}"
24636    # Do not save /bin paths to all_fixpath_prefixes!
24637  else
24638    # Not in mixed or Windows style, start by that.
24639    new_path=`cmd //c echo $new_path`
24640
24641  input_path="$new_path"
24642  # Check if we need to convert this using DOS-style short mode. If the path
24643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24644  # take no chances and rewrite it.
24645  # Note: m4 eats our [], so we need to use [ and ] instead.
24646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24647  if test "x$has_forbidden_chars" != x; then
24648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24650  fi
24651
24652    # Output is in $new_path
24653
24654  windows_path="$new_path"
24655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24656    unix_path=`$CYGPATH -u "$windows_path"`
24657    new_path="$unix_path"
24658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24660    new_path="$unix_path"
24661  fi
24662
24663    # remove trailing .exe if any
24664    new_path="${new_path/%.exe/}"
24665
24666    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24667    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24668  fi
24669
24670  else
24671    # We're on a posix platform. Hooray! :)
24672    # First separate the path from the arguments. This will split at the first
24673    # space.
24674    complete="$CXXCPP"
24675    path="${complete%% *}"
24676    tmp="$complete EOL"
24677    arguments="${tmp#* }"
24678
24679    # Cannot rely on the command "which" here since it doesn't always work.
24680    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24681    if test -z "$is_absolute_path"; then
24682      # Path to executable is not absolute. Find it.
24683      IFS_save="$IFS"
24684      IFS=:
24685      for p in $PATH; do
24686        if test -f "$p/$path" && test -x "$p/$path"; then
24687          new_path="$p/$path"
24688          break
24689        fi
24690      done
24691      IFS="$IFS_save"
24692    else
24693      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24694$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24695      new_path="$path"
24696    fi
24697
24698    if test "x$new_path" = x; then
24699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24700$as_echo "$as_me: The path of CXXCPP, 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}: This might be caused by spaces in the path, which is not allowed." >&5
24704$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24705        fi
24706        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24707      fi
24708  fi
24709
24710      # Now join together the path and the arguments once again
24711      if test "x$arguments" != xEOL; then
24712        new_complete="$new_path ${arguments% *}"
24713      else
24714        new_complete="$new_path"
24715      fi
24716
24717  if test "x$complete" != "x$new_complete"; then
24718      CXXCPP="$new_complete"
24719      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24720$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24721    fi
24722
24723
24724if test "x$COMPILE_TYPE" != "xcross"; then
24725    # If we are not cross compiling, use the same compilers for
24726    # building the build platform executables. The cross-compilation
24727    # case needed to be done earlier, but this can only be done after
24728    # the native tools have been localized.
24729    BUILD_CC="$CC"
24730    BUILD_CXX="$CXX"
24731    BUILD_LD="$LD"
24732fi
24733
24734# for solaris we really need solaris tools, and not gnu equivalent
24735#   these seems to normally reside in /usr/ccs/bin so add that to path before
24736#   starting to probe
24737#
24738#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24739#         so that it can be overriden --with-tools-dir
24740if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24741    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24742fi
24743
24744# Find the right assembler.
24745if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24746    # Extract the first word of "as", so it can be a program name with args.
24747set dummy as; ac_word=$2
24748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24749$as_echo_n "checking for $ac_word... " >&6; }
24750if test "${ac_cv_path_AS+set}" = set; then :
24751  $as_echo_n "(cached) " >&6
24752else
24753  case $AS in
24754  [\\/]* | ?:[\\/]*)
24755  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24756  ;;
24757  *)
24758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24759for as_dir in $PATH
24760do
24761  IFS=$as_save_IFS
24762  test -z "$as_dir" && as_dir=.
24763    for ac_exec_ext in '' $ac_executable_extensions; do
24764  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24765    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24767    break 2
24768  fi
24769done
24770  done
24771IFS=$as_save_IFS
24772
24773  ;;
24774esac
24775fi
24776AS=$ac_cv_path_AS
24777if test -n "$AS"; then
24778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24779$as_echo "$AS" >&6; }
24780else
24781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24782$as_echo "no" >&6; }
24783fi
24784
24785
24786
24787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24788
24789  # First separate the path from the arguments. This will split at the first
24790  # space.
24791  complete="$AS"
24792  path="${complete%% *}"
24793  tmp="$complete EOL"
24794  arguments="${tmp#* }"
24795
24796  # Input might be given as Windows format, start by converting to
24797  # unix format.
24798  new_path=`$CYGPATH -u "$path"`
24799
24800  # Now try to locate executable using which
24801  new_path=`$WHICH "$new_path" 2> /dev/null`
24802  # bat and cmd files are not always considered executable in cygwin causing which
24803  # to not find them
24804  if test "x$new_path" = x \
24805           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24806           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24807    new_path=`$CYGPATH -u "$path"`
24808  fi
24809  if test "x$new_path" = x; then
24810    # Oops. Which didn't find the executable.
24811    # The splitting of arguments from the executable at a space might have been incorrect,
24812    # since paths with space are more likely in Windows. Give it another try with the whole
24813    # argument.
24814    path="$complete"
24815    arguments="EOL"
24816    new_path=`$CYGPATH -u "$path"`
24817    new_path=`$WHICH "$new_path" 2> /dev/null`
24818    # bat and cmd files are not always considered executable in cygwin causing which
24819    # to not find them
24820    if test "x$new_path" = x \
24821             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24822             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24823      new_path=`$CYGPATH -u "$path"`
24824    fi
24825    if test "x$new_path" = x; then
24826      # It's still not found. Now this is an unrecoverable error.
24827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24828$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24829      has_space=`$ECHO "$complete" | $GREP " "`
24830      if test "x$has_space" != x; then
24831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24833      fi
24834      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24835    fi
24836  fi
24837
24838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24841  # "foo.exe" is OK but "foo" is an error.
24842  #
24843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24844  # It is also a way to make sure we got the proper file name for the real test later on.
24845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24846  if test "x$test_shortpath" = x; then
24847    # Short path failed, file does not exist as specified.
24848    # Try adding .exe or .cmd
24849    if test -f "${new_path}.exe"; then
24850       input_to_shortpath="${new_path}.exe"
24851    elif test -f "${new_path}.cmd"; then
24852       input_to_shortpath="${new_path}.cmd"
24853    else
24854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24855$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24856      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24857$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24858      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24859    fi
24860  else
24861    input_to_shortpath="$new_path"
24862  fi
24863
24864  # Call helper function which possibly converts this using DOS-style short mode.
24865  # If so, the updated path is stored in $new_path.
24866  new_path="$input_to_shortpath"
24867
24868  input_path="$input_to_shortpath"
24869  # Check if we need to convert this using DOS-style short mode. If the path
24870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24871  # take no chances and rewrite it.
24872  # Note: m4 eats our [], so we need to use [ and ] instead.
24873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24874  if test "x$has_forbidden_chars" != x; then
24875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24879      # Going to short mode and back again did indeed matter. Since short mode is
24880      # case insensitive, let's make it lowercase to improve readability.
24881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24882      # Now convert it back to Unix-stile (cygpath)
24883      input_path=`$CYGPATH -u "$shortmode_path"`
24884      new_path="$input_path"
24885    fi
24886  fi
24887
24888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24889  if test "x$test_cygdrive_prefix" = x; then
24890    # As a simple fix, exclude /usr/bin since it's not a real path.
24891    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24893      # a path prefixed by /cygdrive for fixpath to work.
24894      new_path="$CYGWIN_ROOT_PATH$input_path"
24895    fi
24896  fi
24897
24898  # remove trailing .exe if any
24899  new_path="${new_path/%.exe/}"
24900
24901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24902
24903  # First separate the path from the arguments. This will split at the first
24904  # space.
24905  complete="$AS"
24906  path="${complete%% *}"
24907  tmp="$complete EOL"
24908  arguments="${tmp#* }"
24909
24910  # Input might be given as Windows format, start by converting to
24911  # unix format.
24912  new_path="$path"
24913
24914  windows_path="$new_path"
24915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24916    unix_path=`$CYGPATH -u "$windows_path"`
24917    new_path="$unix_path"
24918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24920    new_path="$unix_path"
24921  fi
24922
24923
24924  # Now try to locate executable using which
24925  new_path=`$WHICH "$new_path" 2> /dev/null`
24926
24927  if test "x$new_path" = x; then
24928    # Oops. Which didn't find the executable.
24929    # The splitting of arguments from the executable at a space might have been incorrect,
24930    # since paths with space are more likely in Windows. Give it another try with the whole
24931    # argument.
24932    path="$complete"
24933    arguments="EOL"
24934    new_path="$path"
24935
24936  windows_path="$new_path"
24937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24938    unix_path=`$CYGPATH -u "$windows_path"`
24939    new_path="$unix_path"
24940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24942    new_path="$unix_path"
24943  fi
24944
24945
24946    new_path=`$WHICH "$new_path" 2> /dev/null`
24947
24948    if test "x$new_path" = x; then
24949      # It's still not found. Now this is an unrecoverable error.
24950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24951$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24952      has_space=`$ECHO "$complete" | $GREP " "`
24953      if test "x$has_space" != x; then
24954        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24955$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24956      fi
24957      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24958    fi
24959  fi
24960
24961  # Now new_path has a complete unix path to the binary
24962  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24963    # Keep paths in /bin as-is, but remove trailing .exe if any
24964    new_path="${new_path/%.exe/}"
24965    # Do not save /bin paths to all_fixpath_prefixes!
24966  else
24967    # Not in mixed or Windows style, start by that.
24968    new_path=`cmd //c echo $new_path`
24969
24970  input_path="$new_path"
24971  # Check if we need to convert this using DOS-style short mode. If the path
24972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24973  # take no chances and rewrite it.
24974  # Note: m4 eats our [], so we need to use [ and ] instead.
24975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24976  if test "x$has_forbidden_chars" != x; then
24977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24979  fi
24980
24981    # Output is in $new_path
24982
24983  windows_path="$new_path"
24984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24985    unix_path=`$CYGPATH -u "$windows_path"`
24986    new_path="$unix_path"
24987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24989    new_path="$unix_path"
24990  fi
24991
24992    # remove trailing .exe if any
24993    new_path="${new_path/%.exe/}"
24994
24995    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24996    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24997  fi
24998
24999  else
25000    # We're on a posix platform. Hooray! :)
25001    # First separate the path from the arguments. This will split at the first
25002    # space.
25003    complete="$AS"
25004    path="${complete%% *}"
25005    tmp="$complete EOL"
25006    arguments="${tmp#* }"
25007
25008    # Cannot rely on the command "which" here since it doesn't always work.
25009    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25010    if test -z "$is_absolute_path"; then
25011      # Path to executable is not absolute. Find it.
25012      IFS_save="$IFS"
25013      IFS=:
25014      for p in $PATH; do
25015        if test -f "$p/$path" && test -x "$p/$path"; then
25016          new_path="$p/$path"
25017          break
25018        fi
25019      done
25020      IFS="$IFS_save"
25021    else
25022      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25023$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25024      new_path="$path"
25025    fi
25026
25027    if test "x$new_path" = x; then
25028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25029$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25030        has_space=`$ECHO "$complete" | $GREP " "`
25031        if test "x$has_space" != x; then
25032          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25034        fi
25035        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25036      fi
25037  fi
25038
25039      # Now join together the path and the arguments once again
25040      if test "x$arguments" != xEOL; then
25041        new_complete="$new_path ${arguments% *}"
25042      else
25043        new_complete="$new_path"
25044      fi
25045
25046  if test "x$complete" != "x$new_complete"; then
25047      AS="$new_complete"
25048      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25049$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25050    fi
25051
25052else
25053    AS="$CC -c"
25054fi
25055
25056
25057if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25058    for ac_prog in gnm nm
25059do
25060  # Extract the first word of "$ac_prog", so it can be a program name with args.
25061set dummy $ac_prog; ac_word=$2
25062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25063$as_echo_n "checking for $ac_word... " >&6; }
25064if test "${ac_cv_path_NM+set}" = set; then :
25065  $as_echo_n "(cached) " >&6
25066else
25067  case $NM in
25068  [\\/]* | ?:[\\/]*)
25069  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25070  ;;
25071  *)
25072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25073for as_dir in $PATH
25074do
25075  IFS=$as_save_IFS
25076  test -z "$as_dir" && as_dir=.
25077    for ac_exec_ext in '' $ac_executable_extensions; do
25078  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25079    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25081    break 2
25082  fi
25083done
25084  done
25085IFS=$as_save_IFS
25086
25087  ;;
25088esac
25089fi
25090NM=$ac_cv_path_NM
25091if test -n "$NM"; then
25092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25093$as_echo "$NM" >&6; }
25094else
25095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25096$as_echo "no" >&6; }
25097fi
25098
25099
25100  test -n "$NM" && break
25101done
25102
25103
25104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25105
25106  # First separate the path from the arguments. This will split at the first
25107  # space.
25108  complete="$NM"
25109  path="${complete%% *}"
25110  tmp="$complete EOL"
25111  arguments="${tmp#* }"
25112
25113  # Input might be given as Windows format, start by converting to
25114  # unix format.
25115  new_path=`$CYGPATH -u "$path"`
25116
25117  # Now try to locate executable using which
25118  new_path=`$WHICH "$new_path" 2> /dev/null`
25119  # bat and cmd files are not always considered executable in cygwin causing which
25120  # to not find them
25121  if test "x$new_path" = x \
25122           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25123           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25124    new_path=`$CYGPATH -u "$path"`
25125  fi
25126  if test "x$new_path" = x; then
25127    # Oops. Which didn't find the executable.
25128    # The splitting of arguments from the executable at a space might have been incorrect,
25129    # since paths with space are more likely in Windows. Give it another try with the whole
25130    # argument.
25131    path="$complete"
25132    arguments="EOL"
25133    new_path=`$CYGPATH -u "$path"`
25134    new_path=`$WHICH "$new_path" 2> /dev/null`
25135    # bat and cmd files are not always considered executable in cygwin causing which
25136    # to not find them
25137    if test "x$new_path" = x \
25138             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25139             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25140      new_path=`$CYGPATH -u "$path"`
25141    fi
25142    if test "x$new_path" = x; then
25143      # It's still not found. Now this is an unrecoverable error.
25144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25145$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25146      has_space=`$ECHO "$complete" | $GREP " "`
25147      if test "x$has_space" != x; then
25148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25150      fi
25151      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25152    fi
25153  fi
25154
25155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25158  # "foo.exe" is OK but "foo" is an error.
25159  #
25160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25161  # It is also a way to make sure we got the proper file name for the real test later on.
25162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25163  if test "x$test_shortpath" = x; then
25164    # Short path failed, file does not exist as specified.
25165    # Try adding .exe or .cmd
25166    if test -f "${new_path}.exe"; then
25167       input_to_shortpath="${new_path}.exe"
25168    elif test -f "${new_path}.cmd"; then
25169       input_to_shortpath="${new_path}.cmd"
25170    else
25171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25172$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25173      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25174$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25175      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25176    fi
25177  else
25178    input_to_shortpath="$new_path"
25179  fi
25180
25181  # Call helper function which possibly converts this using DOS-style short mode.
25182  # If so, the updated path is stored in $new_path.
25183  new_path="$input_to_shortpath"
25184
25185  input_path="$input_to_shortpath"
25186  # Check if we need to convert this using DOS-style short mode. If the path
25187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25188  # take no chances and rewrite it.
25189  # Note: m4 eats our [], so we need to use [ and ] instead.
25190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25191  if test "x$has_forbidden_chars" != x; then
25192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25196      # Going to short mode and back again did indeed matter. Since short mode is
25197      # case insensitive, let's make it lowercase to improve readability.
25198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25199      # Now convert it back to Unix-stile (cygpath)
25200      input_path=`$CYGPATH -u "$shortmode_path"`
25201      new_path="$input_path"
25202    fi
25203  fi
25204
25205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25206  if test "x$test_cygdrive_prefix" = x; then
25207    # As a simple fix, exclude /usr/bin since it's not a real path.
25208    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25210      # a path prefixed by /cygdrive for fixpath to work.
25211      new_path="$CYGWIN_ROOT_PATH$input_path"
25212    fi
25213  fi
25214
25215  # remove trailing .exe if any
25216  new_path="${new_path/%.exe/}"
25217
25218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25219
25220  # First separate the path from the arguments. This will split at the first
25221  # space.
25222  complete="$NM"
25223  path="${complete%% *}"
25224  tmp="$complete EOL"
25225  arguments="${tmp#* }"
25226
25227  # Input might be given as Windows format, start by converting to
25228  # unix format.
25229  new_path="$path"
25230
25231  windows_path="$new_path"
25232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25233    unix_path=`$CYGPATH -u "$windows_path"`
25234    new_path="$unix_path"
25235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25237    new_path="$unix_path"
25238  fi
25239
25240
25241  # Now try to locate executable using which
25242  new_path=`$WHICH "$new_path" 2> /dev/null`
25243
25244  if test "x$new_path" = x; then
25245    # Oops. Which didn't find the executable.
25246    # The splitting of arguments from the executable at a space might have been incorrect,
25247    # since paths with space are more likely in Windows. Give it another try with the whole
25248    # argument.
25249    path="$complete"
25250    arguments="EOL"
25251    new_path="$path"
25252
25253  windows_path="$new_path"
25254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25255    unix_path=`$CYGPATH -u "$windows_path"`
25256    new_path="$unix_path"
25257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25259    new_path="$unix_path"
25260  fi
25261
25262
25263    new_path=`$WHICH "$new_path" 2> /dev/null`
25264
25265    if test "x$new_path" = x; then
25266      # It's still not found. Now this is an unrecoverable error.
25267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25268$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25269      has_space=`$ECHO "$complete" | $GREP " "`
25270      if test "x$has_space" != x; then
25271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25273      fi
25274      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25275    fi
25276  fi
25277
25278  # Now new_path has a complete unix path to the binary
25279  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25280    # Keep paths in /bin as-is, but remove trailing .exe if any
25281    new_path="${new_path/%.exe/}"
25282    # Do not save /bin paths to all_fixpath_prefixes!
25283  else
25284    # Not in mixed or Windows style, start by that.
25285    new_path=`cmd //c echo $new_path`
25286
25287  input_path="$new_path"
25288  # Check if we need to convert this using DOS-style short mode. If the path
25289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25290  # take no chances and rewrite it.
25291  # Note: m4 eats our [], so we need to use [ and ] instead.
25292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25293  if test "x$has_forbidden_chars" != x; then
25294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25296  fi
25297
25298    # Output is in $new_path
25299
25300  windows_path="$new_path"
25301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25302    unix_path=`$CYGPATH -u "$windows_path"`
25303    new_path="$unix_path"
25304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25306    new_path="$unix_path"
25307  fi
25308
25309    # remove trailing .exe if any
25310    new_path="${new_path/%.exe/}"
25311
25312    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25313    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25314  fi
25315
25316  else
25317    # We're on a posix platform. Hooray! :)
25318    # First separate the path from the arguments. This will split at the first
25319    # space.
25320    complete="$NM"
25321    path="${complete%% *}"
25322    tmp="$complete EOL"
25323    arguments="${tmp#* }"
25324
25325    # Cannot rely on the command "which" here since it doesn't always work.
25326    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25327    if test -z "$is_absolute_path"; then
25328      # Path to executable is not absolute. Find it.
25329      IFS_save="$IFS"
25330      IFS=:
25331      for p in $PATH; do
25332        if test -f "$p/$path" && test -x "$p/$path"; then
25333          new_path="$p/$path"
25334          break
25335        fi
25336      done
25337      IFS="$IFS_save"
25338    else
25339      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25340$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25341      new_path="$path"
25342    fi
25343
25344    if test "x$new_path" = x; then
25345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25346$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25347        has_space=`$ECHO "$complete" | $GREP " "`
25348        if test "x$has_space" != x; then
25349          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25350$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25351        fi
25352        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25353      fi
25354  fi
25355
25356      # Now join together the path and the arguments once again
25357      if test "x$arguments" != xEOL; then
25358        new_complete="$new_path ${arguments% *}"
25359      else
25360        new_complete="$new_path"
25361      fi
25362
25363  if test "x$complete" != "x$new_complete"; then
25364      NM="$new_complete"
25365      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25366$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25367    fi
25368
25369    # Extract the first word of "strip", so it can be a program name with args.
25370set dummy strip; ac_word=$2
25371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25372$as_echo_n "checking for $ac_word... " >&6; }
25373if test "${ac_cv_path_STRIP+set}" = set; then :
25374  $as_echo_n "(cached) " >&6
25375else
25376  case $STRIP in
25377  [\\/]* | ?:[\\/]*)
25378  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25379  ;;
25380  *)
25381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25382for as_dir in $PATH
25383do
25384  IFS=$as_save_IFS
25385  test -z "$as_dir" && as_dir=.
25386    for ac_exec_ext in '' $ac_executable_extensions; do
25387  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25388    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25390    break 2
25391  fi
25392done
25393  done
25394IFS=$as_save_IFS
25395
25396  ;;
25397esac
25398fi
25399STRIP=$ac_cv_path_STRIP
25400if test -n "$STRIP"; then
25401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25402$as_echo "$STRIP" >&6; }
25403else
25404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25405$as_echo "no" >&6; }
25406fi
25407
25408
25409
25410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25411
25412  # First separate the path from the arguments. This will split at the first
25413  # space.
25414  complete="$STRIP"
25415  path="${complete%% *}"
25416  tmp="$complete EOL"
25417  arguments="${tmp#* }"
25418
25419  # Input might be given as Windows format, start by converting to
25420  # unix format.
25421  new_path=`$CYGPATH -u "$path"`
25422
25423  # Now try to locate executable using which
25424  new_path=`$WHICH "$new_path" 2> /dev/null`
25425  # bat and cmd files are not always considered executable in cygwin causing which
25426  # to not find them
25427  if test "x$new_path" = x \
25428           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25429           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25430    new_path=`$CYGPATH -u "$path"`
25431  fi
25432  if test "x$new_path" = x; then
25433    # Oops. Which didn't find the executable.
25434    # The splitting of arguments from the executable at a space might have been incorrect,
25435    # since paths with space are more likely in Windows. Give it another try with the whole
25436    # argument.
25437    path="$complete"
25438    arguments="EOL"
25439    new_path=`$CYGPATH -u "$path"`
25440    new_path=`$WHICH "$new_path" 2> /dev/null`
25441    # bat and cmd files are not always considered executable in cygwin causing which
25442    # to not find them
25443    if test "x$new_path" = x \
25444             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25445             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25446      new_path=`$CYGPATH -u "$path"`
25447    fi
25448    if test "x$new_path" = x; then
25449      # It's still not found. Now this is an unrecoverable error.
25450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25451$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25452      has_space=`$ECHO "$complete" | $GREP " "`
25453      if test "x$has_space" != x; then
25454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25456      fi
25457      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25458    fi
25459  fi
25460
25461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25464  # "foo.exe" is OK but "foo" is an error.
25465  #
25466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25467  # It is also a way to make sure we got the proper file name for the real test later on.
25468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25469  if test "x$test_shortpath" = x; then
25470    # Short path failed, file does not exist as specified.
25471    # Try adding .exe or .cmd
25472    if test -f "${new_path}.exe"; then
25473       input_to_shortpath="${new_path}.exe"
25474    elif test -f "${new_path}.cmd"; then
25475       input_to_shortpath="${new_path}.cmd"
25476    else
25477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25478$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25479      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25480$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25481      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25482    fi
25483  else
25484    input_to_shortpath="$new_path"
25485  fi
25486
25487  # Call helper function which possibly converts this using DOS-style short mode.
25488  # If so, the updated path is stored in $new_path.
25489  new_path="$input_to_shortpath"
25490
25491  input_path="$input_to_shortpath"
25492  # Check if we need to convert this using DOS-style short mode. If the path
25493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25494  # take no chances and rewrite it.
25495  # Note: m4 eats our [], so we need to use [ and ] instead.
25496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25497  if test "x$has_forbidden_chars" != x; then
25498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25502      # Going to short mode and back again did indeed matter. Since short mode is
25503      # case insensitive, let's make it lowercase to improve readability.
25504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25505      # Now convert it back to Unix-stile (cygpath)
25506      input_path=`$CYGPATH -u "$shortmode_path"`
25507      new_path="$input_path"
25508    fi
25509  fi
25510
25511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25512  if test "x$test_cygdrive_prefix" = x; then
25513    # As a simple fix, exclude /usr/bin since it's not a real path.
25514    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25516      # a path prefixed by /cygdrive for fixpath to work.
25517      new_path="$CYGWIN_ROOT_PATH$input_path"
25518    fi
25519  fi
25520
25521  # remove trailing .exe if any
25522  new_path="${new_path/%.exe/}"
25523
25524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25525
25526  # First separate the path from the arguments. This will split at the first
25527  # space.
25528  complete="$STRIP"
25529  path="${complete%% *}"
25530  tmp="$complete EOL"
25531  arguments="${tmp#* }"
25532
25533  # Input might be given as Windows format, start by converting to
25534  # unix format.
25535  new_path="$path"
25536
25537  windows_path="$new_path"
25538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25539    unix_path=`$CYGPATH -u "$windows_path"`
25540    new_path="$unix_path"
25541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25543    new_path="$unix_path"
25544  fi
25545
25546
25547  # Now try to locate executable using which
25548  new_path=`$WHICH "$new_path" 2> /dev/null`
25549
25550  if test "x$new_path" = x; then
25551    # Oops. Which didn't find the executable.
25552    # The splitting of arguments from the executable at a space might have been incorrect,
25553    # since paths with space are more likely in Windows. Give it another try with the whole
25554    # argument.
25555    path="$complete"
25556    arguments="EOL"
25557    new_path="$path"
25558
25559  windows_path="$new_path"
25560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25561    unix_path=`$CYGPATH -u "$windows_path"`
25562    new_path="$unix_path"
25563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25565    new_path="$unix_path"
25566  fi
25567
25568
25569    new_path=`$WHICH "$new_path" 2> /dev/null`
25570
25571    if test "x$new_path" = x; then
25572      # It's still not found. Now this is an unrecoverable error.
25573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25574$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25575      has_space=`$ECHO "$complete" | $GREP " "`
25576      if test "x$has_space" != x; then
25577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25579      fi
25580      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25581    fi
25582  fi
25583
25584  # Now new_path has a complete unix path to the binary
25585  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25586    # Keep paths in /bin as-is, but remove trailing .exe if any
25587    new_path="${new_path/%.exe/}"
25588    # Do not save /bin paths to all_fixpath_prefixes!
25589  else
25590    # Not in mixed or Windows style, start by that.
25591    new_path=`cmd //c echo $new_path`
25592
25593  input_path="$new_path"
25594  # Check if we need to convert this using DOS-style short mode. If the path
25595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25596  # take no chances and rewrite it.
25597  # Note: m4 eats our [], so we need to use [ and ] instead.
25598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25599  if test "x$has_forbidden_chars" != x; then
25600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25602  fi
25603
25604    # Output is in $new_path
25605
25606  windows_path="$new_path"
25607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25608    unix_path=`$CYGPATH -u "$windows_path"`
25609    new_path="$unix_path"
25610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25612    new_path="$unix_path"
25613  fi
25614
25615    # remove trailing .exe if any
25616    new_path="${new_path/%.exe/}"
25617
25618    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25619    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25620  fi
25621
25622  else
25623    # We're on a posix platform. Hooray! :)
25624    # First separate the path from the arguments. This will split at the first
25625    # space.
25626    complete="$STRIP"
25627    path="${complete%% *}"
25628    tmp="$complete EOL"
25629    arguments="${tmp#* }"
25630
25631    # Cannot rely on the command "which" here since it doesn't always work.
25632    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25633    if test -z "$is_absolute_path"; then
25634      # Path to executable is not absolute. Find it.
25635      IFS_save="$IFS"
25636      IFS=:
25637      for p in $PATH; do
25638        if test -f "$p/$path" && test -x "$p/$path"; then
25639          new_path="$p/$path"
25640          break
25641        fi
25642      done
25643      IFS="$IFS_save"
25644    else
25645      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25646$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25647      new_path="$path"
25648    fi
25649
25650    if test "x$new_path" = x; then
25651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25652$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25653        has_space=`$ECHO "$complete" | $GREP " "`
25654        if test "x$has_space" != x; then
25655          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25656$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25657        fi
25658        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25659      fi
25660  fi
25661
25662      # Now join together the path and the arguments once again
25663      if test "x$arguments" != xEOL; then
25664        new_complete="$new_path ${arguments% *}"
25665      else
25666        new_complete="$new_path"
25667      fi
25668
25669  if test "x$complete" != "x$new_complete"; then
25670      STRIP="$new_complete"
25671      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25672$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25673    fi
25674
25675    # Extract the first word of "mcs", so it can be a program name with args.
25676set dummy mcs; ac_word=$2
25677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25678$as_echo_n "checking for $ac_word... " >&6; }
25679if test "${ac_cv_path_MCS+set}" = set; then :
25680  $as_echo_n "(cached) " >&6
25681else
25682  case $MCS in
25683  [\\/]* | ?:[\\/]*)
25684  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25685  ;;
25686  *)
25687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25688for as_dir in $PATH
25689do
25690  IFS=$as_save_IFS
25691  test -z "$as_dir" && as_dir=.
25692    for ac_exec_ext in '' $ac_executable_extensions; do
25693  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25694    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25696    break 2
25697  fi
25698done
25699  done
25700IFS=$as_save_IFS
25701
25702  ;;
25703esac
25704fi
25705MCS=$ac_cv_path_MCS
25706if test -n "$MCS"; then
25707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25708$as_echo "$MCS" >&6; }
25709else
25710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25711$as_echo "no" >&6; }
25712fi
25713
25714
25715
25716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25717
25718  # First separate the path from the arguments. This will split at the first
25719  # space.
25720  complete="$MCS"
25721  path="${complete%% *}"
25722  tmp="$complete EOL"
25723  arguments="${tmp#* }"
25724
25725  # Input might be given as Windows format, start by converting to
25726  # unix format.
25727  new_path=`$CYGPATH -u "$path"`
25728
25729  # Now try to locate executable using which
25730  new_path=`$WHICH "$new_path" 2> /dev/null`
25731  # bat and cmd files are not always considered executable in cygwin causing which
25732  # to not find them
25733  if test "x$new_path" = x \
25734           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25735           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25736    new_path=`$CYGPATH -u "$path"`
25737  fi
25738  if test "x$new_path" = x; then
25739    # Oops. Which didn't find the executable.
25740    # The splitting of arguments from the executable at a space might have been incorrect,
25741    # since paths with space are more likely in Windows. Give it another try with the whole
25742    # argument.
25743    path="$complete"
25744    arguments="EOL"
25745    new_path=`$CYGPATH -u "$path"`
25746    new_path=`$WHICH "$new_path" 2> /dev/null`
25747    # bat and cmd files are not always considered executable in cygwin causing which
25748    # to not find them
25749    if test "x$new_path" = x \
25750             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25751             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25752      new_path=`$CYGPATH -u "$path"`
25753    fi
25754    if test "x$new_path" = x; then
25755      # It's still not found. Now this is an unrecoverable error.
25756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25757$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25758      has_space=`$ECHO "$complete" | $GREP " "`
25759      if test "x$has_space" != x; then
25760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25762      fi
25763      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25764    fi
25765  fi
25766
25767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25770  # "foo.exe" is OK but "foo" is an error.
25771  #
25772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25773  # It is also a way to make sure we got the proper file name for the real test later on.
25774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25775  if test "x$test_shortpath" = x; then
25776    # Short path failed, file does not exist as specified.
25777    # Try adding .exe or .cmd
25778    if test -f "${new_path}.exe"; then
25779       input_to_shortpath="${new_path}.exe"
25780    elif test -f "${new_path}.cmd"; then
25781       input_to_shortpath="${new_path}.cmd"
25782    else
25783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25784$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25785      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25786$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25787      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25788    fi
25789  else
25790    input_to_shortpath="$new_path"
25791  fi
25792
25793  # Call helper function which possibly converts this using DOS-style short mode.
25794  # If so, the updated path is stored in $new_path.
25795  new_path="$input_to_shortpath"
25796
25797  input_path="$input_to_shortpath"
25798  # Check if we need to convert this using DOS-style short mode. If the path
25799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25800  # take no chances and rewrite it.
25801  # Note: m4 eats our [], so we need to use [ and ] instead.
25802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25803  if test "x$has_forbidden_chars" != x; then
25804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25808      # Going to short mode and back again did indeed matter. Since short mode is
25809      # case insensitive, let's make it lowercase to improve readability.
25810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25811      # Now convert it back to Unix-stile (cygpath)
25812      input_path=`$CYGPATH -u "$shortmode_path"`
25813      new_path="$input_path"
25814    fi
25815  fi
25816
25817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25818  if test "x$test_cygdrive_prefix" = x; then
25819    # As a simple fix, exclude /usr/bin since it's not a real path.
25820    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25822      # a path prefixed by /cygdrive for fixpath to work.
25823      new_path="$CYGWIN_ROOT_PATH$input_path"
25824    fi
25825  fi
25826
25827  # remove trailing .exe if any
25828  new_path="${new_path/%.exe/}"
25829
25830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25831
25832  # First separate the path from the arguments. This will split at the first
25833  # space.
25834  complete="$MCS"
25835  path="${complete%% *}"
25836  tmp="$complete EOL"
25837  arguments="${tmp#* }"
25838
25839  # Input might be given as Windows format, start by converting to
25840  # unix format.
25841  new_path="$path"
25842
25843  windows_path="$new_path"
25844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25845    unix_path=`$CYGPATH -u "$windows_path"`
25846    new_path="$unix_path"
25847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25849    new_path="$unix_path"
25850  fi
25851
25852
25853  # Now try to locate executable using which
25854  new_path=`$WHICH "$new_path" 2> /dev/null`
25855
25856  if test "x$new_path" = x; then
25857    # Oops. Which didn't find the executable.
25858    # The splitting of arguments from the executable at a space might have been incorrect,
25859    # since paths with space are more likely in Windows. Give it another try with the whole
25860    # argument.
25861    path="$complete"
25862    arguments="EOL"
25863    new_path="$path"
25864
25865  windows_path="$new_path"
25866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25867    unix_path=`$CYGPATH -u "$windows_path"`
25868    new_path="$unix_path"
25869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25871    new_path="$unix_path"
25872  fi
25873
25874
25875    new_path=`$WHICH "$new_path" 2> /dev/null`
25876
25877    if test "x$new_path" = x; then
25878      # It's still not found. Now this is an unrecoverable error.
25879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25880$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25881      has_space=`$ECHO "$complete" | $GREP " "`
25882      if test "x$has_space" != x; then
25883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25885      fi
25886      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25887    fi
25888  fi
25889
25890  # Now new_path has a complete unix path to the binary
25891  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25892    # Keep paths in /bin as-is, but remove trailing .exe if any
25893    new_path="${new_path/%.exe/}"
25894    # Do not save /bin paths to all_fixpath_prefixes!
25895  else
25896    # Not in mixed or Windows style, start by that.
25897    new_path=`cmd //c echo $new_path`
25898
25899  input_path="$new_path"
25900  # Check if we need to convert this using DOS-style short mode. If the path
25901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25902  # take no chances and rewrite it.
25903  # Note: m4 eats our [], so we need to use [ and ] instead.
25904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25905  if test "x$has_forbidden_chars" != x; then
25906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25908  fi
25909
25910    # Output is in $new_path
25911
25912  windows_path="$new_path"
25913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25914    unix_path=`$CYGPATH -u "$windows_path"`
25915    new_path="$unix_path"
25916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25918    new_path="$unix_path"
25919  fi
25920
25921    # remove trailing .exe if any
25922    new_path="${new_path/%.exe/}"
25923
25924    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25925    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25926  fi
25927
25928  else
25929    # We're on a posix platform. Hooray! :)
25930    # First separate the path from the arguments. This will split at the first
25931    # space.
25932    complete="$MCS"
25933    path="${complete%% *}"
25934    tmp="$complete EOL"
25935    arguments="${tmp#* }"
25936
25937    # Cannot rely on the command "which" here since it doesn't always work.
25938    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25939    if test -z "$is_absolute_path"; then
25940      # Path to executable is not absolute. Find it.
25941      IFS_save="$IFS"
25942      IFS=:
25943      for p in $PATH; do
25944        if test -f "$p/$path" && test -x "$p/$path"; then
25945          new_path="$p/$path"
25946          break
25947        fi
25948      done
25949      IFS="$IFS_save"
25950    else
25951      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25952$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25953      new_path="$path"
25954    fi
25955
25956    if test "x$new_path" = x; then
25957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25958$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25959        has_space=`$ECHO "$complete" | $GREP " "`
25960        if test "x$has_space" != x; then
25961          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25962$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25963        fi
25964        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25965      fi
25966  fi
25967
25968      # Now join together the path and the arguments once again
25969      if test "x$arguments" != xEOL; then
25970        new_complete="$new_path ${arguments% *}"
25971      else
25972        new_complete="$new_path"
25973      fi
25974
25975  if test "x$complete" != "x$new_complete"; then
25976      MCS="$new_complete"
25977      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25978$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25979    fi
25980
25981elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25982    if test -n "$ac_tool_prefix"; then
25983  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25984set dummy ${ac_tool_prefix}nm; ac_word=$2
25985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25986$as_echo_n "checking for $ac_word... " >&6; }
25987if test "${ac_cv_prog_NM+set}" = set; then :
25988  $as_echo_n "(cached) " >&6
25989else
25990  if test -n "$NM"; then
25991  ac_cv_prog_NM="$NM" # Let the user override the test.
25992else
25993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25994for as_dir in $PATH
25995do
25996  IFS=$as_save_IFS
25997  test -z "$as_dir" && as_dir=.
25998    for ac_exec_ext in '' $ac_executable_extensions; do
25999  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26000    ac_cv_prog_NM="${ac_tool_prefix}nm"
26001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26002    break 2
26003  fi
26004done
26005  done
26006IFS=$as_save_IFS
26007
26008fi
26009fi
26010NM=$ac_cv_prog_NM
26011if test -n "$NM"; then
26012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26013$as_echo "$NM" >&6; }
26014else
26015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26016$as_echo "no" >&6; }
26017fi
26018
26019
26020fi
26021if test -z "$ac_cv_prog_NM"; then
26022  ac_ct_NM=$NM
26023  # Extract the first word of "nm", so it can be a program name with args.
26024set dummy nm; ac_word=$2
26025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26026$as_echo_n "checking for $ac_word... " >&6; }
26027if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26028  $as_echo_n "(cached) " >&6
26029else
26030  if test -n "$ac_ct_NM"; then
26031  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26032else
26033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26034for as_dir in $PATH
26035do
26036  IFS=$as_save_IFS
26037  test -z "$as_dir" && as_dir=.
26038    for ac_exec_ext in '' $ac_executable_extensions; do
26039  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26040    ac_cv_prog_ac_ct_NM="nm"
26041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26042    break 2
26043  fi
26044done
26045  done
26046IFS=$as_save_IFS
26047
26048fi
26049fi
26050ac_ct_NM=$ac_cv_prog_ac_ct_NM
26051if test -n "$ac_ct_NM"; then
26052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26053$as_echo "$ac_ct_NM" >&6; }
26054else
26055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26056$as_echo "no" >&6; }
26057fi
26058
26059  if test "x$ac_ct_NM" = x; then
26060    NM=""
26061  else
26062    case $cross_compiling:$ac_tool_warned in
26063yes:)
26064{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26065$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26066ac_tool_warned=yes ;;
26067esac
26068    NM=$ac_ct_NM
26069  fi
26070else
26071  NM="$ac_cv_prog_NM"
26072fi
26073
26074
26075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26076
26077  # First separate the path from the arguments. This will split at the first
26078  # space.
26079  complete="$NM"
26080  path="${complete%% *}"
26081  tmp="$complete EOL"
26082  arguments="${tmp#* }"
26083
26084  # Input might be given as Windows format, start by converting to
26085  # unix format.
26086  new_path=`$CYGPATH -u "$path"`
26087
26088  # Now try to locate executable using which
26089  new_path=`$WHICH "$new_path" 2> /dev/null`
26090  # bat and cmd files are not always considered executable in cygwin causing which
26091  # to not find them
26092  if test "x$new_path" = x \
26093           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26094           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26095    new_path=`$CYGPATH -u "$path"`
26096  fi
26097  if test "x$new_path" = x; then
26098    # Oops. Which didn't find the executable.
26099    # The splitting of arguments from the executable at a space might have been incorrect,
26100    # since paths with space are more likely in Windows. Give it another try with the whole
26101    # argument.
26102    path="$complete"
26103    arguments="EOL"
26104    new_path=`$CYGPATH -u "$path"`
26105    new_path=`$WHICH "$new_path" 2> /dev/null`
26106    # bat and cmd files are not always considered executable in cygwin causing which
26107    # to not find them
26108    if test "x$new_path" = x \
26109             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26110             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26111      new_path=`$CYGPATH -u "$path"`
26112    fi
26113    if test "x$new_path" = x; then
26114      # It's still not found. Now this is an unrecoverable error.
26115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26116$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26117      has_space=`$ECHO "$complete" | $GREP " "`
26118      if test "x$has_space" != x; then
26119        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26120$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26121      fi
26122      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26123    fi
26124  fi
26125
26126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26129  # "foo.exe" is OK but "foo" is an error.
26130  #
26131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26132  # It is also a way to make sure we got the proper file name for the real test later on.
26133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26134  if test "x$test_shortpath" = x; then
26135    # Short path failed, file does not exist as specified.
26136    # Try adding .exe or .cmd
26137    if test -f "${new_path}.exe"; then
26138       input_to_shortpath="${new_path}.exe"
26139    elif test -f "${new_path}.cmd"; then
26140       input_to_shortpath="${new_path}.cmd"
26141    else
26142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26143$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26144      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26145$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26146      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26147    fi
26148  else
26149    input_to_shortpath="$new_path"
26150  fi
26151
26152  # Call helper function which possibly converts this using DOS-style short mode.
26153  # If so, the updated path is stored in $new_path.
26154  new_path="$input_to_shortpath"
26155
26156  input_path="$input_to_shortpath"
26157  # Check if we need to convert this using DOS-style short mode. If the path
26158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26159  # take no chances and rewrite it.
26160  # Note: m4 eats our [], so we need to use [ and ] instead.
26161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26162  if test "x$has_forbidden_chars" != x; then
26163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26167      # Going to short mode and back again did indeed matter. Since short mode is
26168      # case insensitive, let's make it lowercase to improve readability.
26169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26170      # Now convert it back to Unix-stile (cygpath)
26171      input_path=`$CYGPATH -u "$shortmode_path"`
26172      new_path="$input_path"
26173    fi
26174  fi
26175
26176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26177  if test "x$test_cygdrive_prefix" = x; then
26178    # As a simple fix, exclude /usr/bin since it's not a real path.
26179    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26181      # a path prefixed by /cygdrive for fixpath to work.
26182      new_path="$CYGWIN_ROOT_PATH$input_path"
26183    fi
26184  fi
26185
26186  # remove trailing .exe if any
26187  new_path="${new_path/%.exe/}"
26188
26189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26190
26191  # First separate the path from the arguments. This will split at the first
26192  # space.
26193  complete="$NM"
26194  path="${complete%% *}"
26195  tmp="$complete EOL"
26196  arguments="${tmp#* }"
26197
26198  # Input might be given as Windows format, start by converting to
26199  # unix format.
26200  new_path="$path"
26201
26202  windows_path="$new_path"
26203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26204    unix_path=`$CYGPATH -u "$windows_path"`
26205    new_path="$unix_path"
26206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26208    new_path="$unix_path"
26209  fi
26210
26211
26212  # Now try to locate executable using which
26213  new_path=`$WHICH "$new_path" 2> /dev/null`
26214
26215  if test "x$new_path" = x; then
26216    # Oops. Which didn't find the executable.
26217    # The splitting of arguments from the executable at a space might have been incorrect,
26218    # since paths with space are more likely in Windows. Give it another try with the whole
26219    # argument.
26220    path="$complete"
26221    arguments="EOL"
26222    new_path="$path"
26223
26224  windows_path="$new_path"
26225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26226    unix_path=`$CYGPATH -u "$windows_path"`
26227    new_path="$unix_path"
26228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26230    new_path="$unix_path"
26231  fi
26232
26233
26234    new_path=`$WHICH "$new_path" 2> /dev/null`
26235
26236    if test "x$new_path" = x; then
26237      # It's still not found. Now this is an unrecoverable error.
26238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26239$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26240      has_space=`$ECHO "$complete" | $GREP " "`
26241      if test "x$has_space" != x; then
26242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26244      fi
26245      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26246    fi
26247  fi
26248
26249  # Now new_path has a complete unix path to the binary
26250  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26251    # Keep paths in /bin as-is, but remove trailing .exe if any
26252    new_path="${new_path/%.exe/}"
26253    # Do not save /bin paths to all_fixpath_prefixes!
26254  else
26255    # Not in mixed or Windows style, start by that.
26256    new_path=`cmd //c echo $new_path`
26257
26258  input_path="$new_path"
26259  # Check if we need to convert this using DOS-style short mode. If the path
26260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26261  # take no chances and rewrite it.
26262  # Note: m4 eats our [], so we need to use [ and ] instead.
26263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26264  if test "x$has_forbidden_chars" != x; then
26265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26267  fi
26268
26269    # Output is in $new_path
26270
26271  windows_path="$new_path"
26272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26273    unix_path=`$CYGPATH -u "$windows_path"`
26274    new_path="$unix_path"
26275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26277    new_path="$unix_path"
26278  fi
26279
26280    # remove trailing .exe if any
26281    new_path="${new_path/%.exe/}"
26282
26283    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26284    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26285  fi
26286
26287  else
26288    # We're on a posix platform. Hooray! :)
26289    # First separate the path from the arguments. This will split at the first
26290    # space.
26291    complete="$NM"
26292    path="${complete%% *}"
26293    tmp="$complete EOL"
26294    arguments="${tmp#* }"
26295
26296    # Cannot rely on the command "which" here since it doesn't always work.
26297    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26298    if test -z "$is_absolute_path"; then
26299      # Path to executable is not absolute. Find it.
26300      IFS_save="$IFS"
26301      IFS=:
26302      for p in $PATH; do
26303        if test -f "$p/$path" && test -x "$p/$path"; then
26304          new_path="$p/$path"
26305          break
26306        fi
26307      done
26308      IFS="$IFS_save"
26309    else
26310      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26311$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26312      new_path="$path"
26313    fi
26314
26315    if test "x$new_path" = x; then
26316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26317$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26318        has_space=`$ECHO "$complete" | $GREP " "`
26319        if test "x$has_space" != x; then
26320          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26321$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26322        fi
26323        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26324      fi
26325  fi
26326
26327      # Now join together the path and the arguments once again
26328      if test "x$arguments" != xEOL; then
26329        new_complete="$new_path ${arguments% *}"
26330      else
26331        new_complete="$new_path"
26332      fi
26333
26334  if test "x$complete" != "x$new_complete"; then
26335      NM="$new_complete"
26336      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26337$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26338    fi
26339
26340    if test -n "$ac_tool_prefix"; then
26341  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26342set dummy ${ac_tool_prefix}strip; ac_word=$2
26343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26344$as_echo_n "checking for $ac_word... " >&6; }
26345if test "${ac_cv_prog_STRIP+set}" = set; then :
26346  $as_echo_n "(cached) " >&6
26347else
26348  if test -n "$STRIP"; then
26349  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26350else
26351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26352for as_dir in $PATH
26353do
26354  IFS=$as_save_IFS
26355  test -z "$as_dir" && as_dir=.
26356    for ac_exec_ext in '' $ac_executable_extensions; do
26357  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26358    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26360    break 2
26361  fi
26362done
26363  done
26364IFS=$as_save_IFS
26365
26366fi
26367fi
26368STRIP=$ac_cv_prog_STRIP
26369if test -n "$STRIP"; then
26370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26371$as_echo "$STRIP" >&6; }
26372else
26373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26374$as_echo "no" >&6; }
26375fi
26376
26377
26378fi
26379if test -z "$ac_cv_prog_STRIP"; then
26380  ac_ct_STRIP=$STRIP
26381  # Extract the first word of "strip", so it can be a program name with args.
26382set dummy strip; ac_word=$2
26383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26384$as_echo_n "checking for $ac_word... " >&6; }
26385if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
26386  $as_echo_n "(cached) " >&6
26387else
26388  if test -n "$ac_ct_STRIP"; then
26389  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26390else
26391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26392for as_dir in $PATH
26393do
26394  IFS=$as_save_IFS
26395  test -z "$as_dir" && as_dir=.
26396    for ac_exec_ext in '' $ac_executable_extensions; do
26397  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26398    ac_cv_prog_ac_ct_STRIP="strip"
26399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26400    break 2
26401  fi
26402done
26403  done
26404IFS=$as_save_IFS
26405
26406fi
26407fi
26408ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26409if test -n "$ac_ct_STRIP"; then
26410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26411$as_echo "$ac_ct_STRIP" >&6; }
26412else
26413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26414$as_echo "no" >&6; }
26415fi
26416
26417  if test "x$ac_ct_STRIP" = x; then
26418    STRIP=""
26419  else
26420    case $cross_compiling:$ac_tool_warned in
26421yes:)
26422{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26423$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26424ac_tool_warned=yes ;;
26425esac
26426    STRIP=$ac_ct_STRIP
26427  fi
26428else
26429  STRIP="$ac_cv_prog_STRIP"
26430fi
26431
26432
26433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26434
26435  # First separate the path from the arguments. This will split at the first
26436  # space.
26437  complete="$STRIP"
26438  path="${complete%% *}"
26439  tmp="$complete EOL"
26440  arguments="${tmp#* }"
26441
26442  # Input might be given as Windows format, start by converting to
26443  # unix format.
26444  new_path=`$CYGPATH -u "$path"`
26445
26446  # Now try to locate executable using which
26447  new_path=`$WHICH "$new_path" 2> /dev/null`
26448  # bat and cmd files are not always considered executable in cygwin causing which
26449  # to not find them
26450  if test "x$new_path" = x \
26451           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26452           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26453    new_path=`$CYGPATH -u "$path"`
26454  fi
26455  if test "x$new_path" = x; then
26456    # Oops. Which didn't find the executable.
26457    # The splitting of arguments from the executable at a space might have been incorrect,
26458    # since paths with space are more likely in Windows. Give it another try with the whole
26459    # argument.
26460    path="$complete"
26461    arguments="EOL"
26462    new_path=`$CYGPATH -u "$path"`
26463    new_path=`$WHICH "$new_path" 2> /dev/null`
26464    # bat and cmd files are not always considered executable in cygwin causing which
26465    # to not find them
26466    if test "x$new_path" = x \
26467             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26468             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26469      new_path=`$CYGPATH -u "$path"`
26470    fi
26471    if test "x$new_path" = x; then
26472      # It's still not found. Now this is an unrecoverable error.
26473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26474$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26475      has_space=`$ECHO "$complete" | $GREP " "`
26476      if test "x$has_space" != x; then
26477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26479      fi
26480      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26481    fi
26482  fi
26483
26484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26487  # "foo.exe" is OK but "foo" is an error.
26488  #
26489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26490  # It is also a way to make sure we got the proper file name for the real test later on.
26491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26492  if test "x$test_shortpath" = x; then
26493    # Short path failed, file does not exist as specified.
26494    # Try adding .exe or .cmd
26495    if test -f "${new_path}.exe"; then
26496       input_to_shortpath="${new_path}.exe"
26497    elif test -f "${new_path}.cmd"; then
26498       input_to_shortpath="${new_path}.cmd"
26499    else
26500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26501$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26502      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26503$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26504      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26505    fi
26506  else
26507    input_to_shortpath="$new_path"
26508  fi
26509
26510  # Call helper function which possibly converts this using DOS-style short mode.
26511  # If so, the updated path is stored in $new_path.
26512  new_path="$input_to_shortpath"
26513
26514  input_path="$input_to_shortpath"
26515  # Check if we need to convert this using DOS-style short mode. If the path
26516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26517  # take no chances and rewrite it.
26518  # Note: m4 eats our [], so we need to use [ and ] instead.
26519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26520  if test "x$has_forbidden_chars" != x; then
26521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26525      # Going to short mode and back again did indeed matter. Since short mode is
26526      # case insensitive, let's make it lowercase to improve readability.
26527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26528      # Now convert it back to Unix-stile (cygpath)
26529      input_path=`$CYGPATH -u "$shortmode_path"`
26530      new_path="$input_path"
26531    fi
26532  fi
26533
26534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26535  if test "x$test_cygdrive_prefix" = x; then
26536    # As a simple fix, exclude /usr/bin since it's not a real path.
26537    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26539      # a path prefixed by /cygdrive for fixpath to work.
26540      new_path="$CYGWIN_ROOT_PATH$input_path"
26541    fi
26542  fi
26543
26544  # remove trailing .exe if any
26545  new_path="${new_path/%.exe/}"
26546
26547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26548
26549  # First separate the path from the arguments. This will split at the first
26550  # space.
26551  complete="$STRIP"
26552  path="${complete%% *}"
26553  tmp="$complete EOL"
26554  arguments="${tmp#* }"
26555
26556  # Input might be given as Windows format, start by converting to
26557  # unix format.
26558  new_path="$path"
26559
26560  windows_path="$new_path"
26561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26562    unix_path=`$CYGPATH -u "$windows_path"`
26563    new_path="$unix_path"
26564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26566    new_path="$unix_path"
26567  fi
26568
26569
26570  # Now try to locate executable using which
26571  new_path=`$WHICH "$new_path" 2> /dev/null`
26572
26573  if test "x$new_path" = x; then
26574    # Oops. Which didn't find the executable.
26575    # The splitting of arguments from the executable at a space might have been incorrect,
26576    # since paths with space are more likely in Windows. Give it another try with the whole
26577    # argument.
26578    path="$complete"
26579    arguments="EOL"
26580    new_path="$path"
26581
26582  windows_path="$new_path"
26583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26584    unix_path=`$CYGPATH -u "$windows_path"`
26585    new_path="$unix_path"
26586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26588    new_path="$unix_path"
26589  fi
26590
26591
26592    new_path=`$WHICH "$new_path" 2> /dev/null`
26593
26594    if test "x$new_path" = x; then
26595      # It's still not found. Now this is an unrecoverable error.
26596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26597$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26598      has_space=`$ECHO "$complete" | $GREP " "`
26599      if test "x$has_space" != x; then
26600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26602      fi
26603      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26604    fi
26605  fi
26606
26607  # Now new_path has a complete unix path to the binary
26608  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26609    # Keep paths in /bin as-is, but remove trailing .exe if any
26610    new_path="${new_path/%.exe/}"
26611    # Do not save /bin paths to all_fixpath_prefixes!
26612  else
26613    # Not in mixed or Windows style, start by that.
26614    new_path=`cmd //c echo $new_path`
26615
26616  input_path="$new_path"
26617  # Check if we need to convert this using DOS-style short mode. If the path
26618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26619  # take no chances and rewrite it.
26620  # Note: m4 eats our [], so we need to use [ and ] instead.
26621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26622  if test "x$has_forbidden_chars" != x; then
26623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26625  fi
26626
26627    # Output is in $new_path
26628
26629  windows_path="$new_path"
26630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26631    unix_path=`$CYGPATH -u "$windows_path"`
26632    new_path="$unix_path"
26633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26635    new_path="$unix_path"
26636  fi
26637
26638    # remove trailing .exe if any
26639    new_path="${new_path/%.exe/}"
26640
26641    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26642    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26643  fi
26644
26645  else
26646    # We're on a posix platform. Hooray! :)
26647    # First separate the path from the arguments. This will split at the first
26648    # space.
26649    complete="$STRIP"
26650    path="${complete%% *}"
26651    tmp="$complete EOL"
26652    arguments="${tmp#* }"
26653
26654    # Cannot rely on the command "which" here since it doesn't always work.
26655    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26656    if test -z "$is_absolute_path"; then
26657      # Path to executable is not absolute. Find it.
26658      IFS_save="$IFS"
26659      IFS=:
26660      for p in $PATH; do
26661        if test -f "$p/$path" && test -x "$p/$path"; then
26662          new_path="$p/$path"
26663          break
26664        fi
26665      done
26666      IFS="$IFS_save"
26667    else
26668      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26669$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26670      new_path="$path"
26671    fi
26672
26673    if test "x$new_path" = x; then
26674        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26675$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26676        has_space=`$ECHO "$complete" | $GREP " "`
26677        if test "x$has_space" != x; then
26678          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26679$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26680        fi
26681        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26682      fi
26683  fi
26684
26685      # Now join together the path and the arguments once again
26686      if test "x$arguments" != xEOL; then
26687        new_complete="$new_path ${arguments% *}"
26688      else
26689        new_complete="$new_path"
26690      fi
26691
26692  if test "x$complete" != "x$new_complete"; then
26693      STRIP="$new_complete"
26694      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26695$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26696    fi
26697
26698fi
26699
26700# objcopy is used for moving debug symbols to separate files when
26701# full debug symbols are enabled.
26702if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26703    if test -n "$ac_tool_prefix"; then
26704  for ac_prog in gobjcopy objcopy
26705  do
26706    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26707set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26709$as_echo_n "checking for $ac_word... " >&6; }
26710if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26711  $as_echo_n "(cached) " >&6
26712else
26713  if test -n "$OBJCOPY"; then
26714  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26715else
26716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26717for as_dir in $PATH
26718do
26719  IFS=$as_save_IFS
26720  test -z "$as_dir" && as_dir=.
26721    for ac_exec_ext in '' $ac_executable_extensions; do
26722  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26723    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26725    break 2
26726  fi
26727done
26728  done
26729IFS=$as_save_IFS
26730
26731fi
26732fi
26733OBJCOPY=$ac_cv_prog_OBJCOPY
26734if test -n "$OBJCOPY"; then
26735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26736$as_echo "$OBJCOPY" >&6; }
26737else
26738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26739$as_echo "no" >&6; }
26740fi
26741
26742
26743    test -n "$OBJCOPY" && break
26744  done
26745fi
26746if test -z "$OBJCOPY"; then
26747  ac_ct_OBJCOPY=$OBJCOPY
26748  for ac_prog in gobjcopy objcopy
26749do
26750  # Extract the first word of "$ac_prog", so it can be a program name with args.
26751set dummy $ac_prog; ac_word=$2
26752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26753$as_echo_n "checking for $ac_word... " >&6; }
26754if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26755  $as_echo_n "(cached) " >&6
26756else
26757  if test -n "$ac_ct_OBJCOPY"; then
26758  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26759else
26760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26761for as_dir in $PATH
26762do
26763  IFS=$as_save_IFS
26764  test -z "$as_dir" && as_dir=.
26765    for ac_exec_ext in '' $ac_executable_extensions; do
26766  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26767    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26769    break 2
26770  fi
26771done
26772  done
26773IFS=$as_save_IFS
26774
26775fi
26776fi
26777ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26778if test -n "$ac_ct_OBJCOPY"; then
26779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26780$as_echo "$ac_ct_OBJCOPY" >&6; }
26781else
26782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26783$as_echo "no" >&6; }
26784fi
26785
26786
26787  test -n "$ac_ct_OBJCOPY" && break
26788done
26789
26790  if test "x$ac_ct_OBJCOPY" = x; then
26791    OBJCOPY=""
26792  else
26793    case $cross_compiling:$ac_tool_warned in
26794yes:)
26795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26797ac_tool_warned=yes ;;
26798esac
26799    OBJCOPY=$ac_ct_OBJCOPY
26800  fi
26801fi
26802
26803    # Only call fixup if objcopy was found.
26804    if test -n "$OBJCOPY"; then
26805
26806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26807
26808  # First separate the path from the arguments. This will split at the first
26809  # space.
26810  complete="$OBJCOPY"
26811  path="${complete%% *}"
26812  tmp="$complete EOL"
26813  arguments="${tmp#* }"
26814
26815  # Input might be given as Windows format, start by converting to
26816  # unix format.
26817  new_path=`$CYGPATH -u "$path"`
26818
26819  # Now try to locate executable using which
26820  new_path=`$WHICH "$new_path" 2> /dev/null`
26821  # bat and cmd files are not always considered executable in cygwin causing which
26822  # to not find them
26823  if test "x$new_path" = x \
26824           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26825           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26826    new_path=`$CYGPATH -u "$path"`
26827  fi
26828  if test "x$new_path" = x; then
26829    # Oops. Which didn't find the executable.
26830    # The splitting of arguments from the executable at a space might have been incorrect,
26831    # since paths with space are more likely in Windows. Give it another try with the whole
26832    # argument.
26833    path="$complete"
26834    arguments="EOL"
26835    new_path=`$CYGPATH -u "$path"`
26836    new_path=`$WHICH "$new_path" 2> /dev/null`
26837    # bat and cmd files are not always considered executable in cygwin causing which
26838    # to not find them
26839    if test "x$new_path" = x \
26840             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26841             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26842      new_path=`$CYGPATH -u "$path"`
26843    fi
26844    if test "x$new_path" = x; then
26845      # It's still not found. Now this is an unrecoverable error.
26846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26847$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26848      has_space=`$ECHO "$complete" | $GREP " "`
26849      if test "x$has_space" != x; then
26850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26852      fi
26853      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26854    fi
26855  fi
26856
26857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26860  # "foo.exe" is OK but "foo" is an error.
26861  #
26862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26863  # It is also a way to make sure we got the proper file name for the real test later on.
26864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26865  if test "x$test_shortpath" = x; then
26866    # Short path failed, file does not exist as specified.
26867    # Try adding .exe or .cmd
26868    if test -f "${new_path}.exe"; then
26869       input_to_shortpath="${new_path}.exe"
26870    elif test -f "${new_path}.cmd"; then
26871       input_to_shortpath="${new_path}.cmd"
26872    else
26873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26874$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26877      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26878    fi
26879  else
26880    input_to_shortpath="$new_path"
26881  fi
26882
26883  # Call helper function which possibly converts this using DOS-style short mode.
26884  # If so, the updated path is stored in $new_path.
26885  new_path="$input_to_shortpath"
26886
26887  input_path="$input_to_shortpath"
26888  # Check if we need to convert this using DOS-style short mode. If the path
26889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26890  # take no chances and rewrite it.
26891  # Note: m4 eats our [], so we need to use [ and ] instead.
26892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26893  if test "x$has_forbidden_chars" != x; then
26894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26898      # Going to short mode and back again did indeed matter. Since short mode is
26899      # case insensitive, let's make it lowercase to improve readability.
26900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26901      # Now convert it back to Unix-stile (cygpath)
26902      input_path=`$CYGPATH -u "$shortmode_path"`
26903      new_path="$input_path"
26904    fi
26905  fi
26906
26907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26908  if test "x$test_cygdrive_prefix" = x; then
26909    # As a simple fix, exclude /usr/bin since it's not a real path.
26910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26912      # a path prefixed by /cygdrive for fixpath to work.
26913      new_path="$CYGWIN_ROOT_PATH$input_path"
26914    fi
26915  fi
26916
26917  # remove trailing .exe if any
26918  new_path="${new_path/%.exe/}"
26919
26920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26921
26922  # First separate the path from the arguments. This will split at the first
26923  # space.
26924  complete="$OBJCOPY"
26925  path="${complete%% *}"
26926  tmp="$complete EOL"
26927  arguments="${tmp#* }"
26928
26929  # Input might be given as Windows format, start by converting to
26930  # unix format.
26931  new_path="$path"
26932
26933  windows_path="$new_path"
26934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26935    unix_path=`$CYGPATH -u "$windows_path"`
26936    new_path="$unix_path"
26937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26939    new_path="$unix_path"
26940  fi
26941
26942
26943  # Now try to locate executable using which
26944  new_path=`$WHICH "$new_path" 2> /dev/null`
26945
26946  if test "x$new_path" = x; then
26947    # Oops. Which didn't find the executable.
26948    # The splitting of arguments from the executable at a space might have been incorrect,
26949    # since paths with space are more likely in Windows. Give it another try with the whole
26950    # argument.
26951    path="$complete"
26952    arguments="EOL"
26953    new_path="$path"
26954
26955  windows_path="$new_path"
26956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26957    unix_path=`$CYGPATH -u "$windows_path"`
26958    new_path="$unix_path"
26959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26961    new_path="$unix_path"
26962  fi
26963
26964
26965    new_path=`$WHICH "$new_path" 2> /dev/null`
26966
26967    if test "x$new_path" = x; then
26968      # It's still not found. Now this is an unrecoverable error.
26969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26970$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26971      has_space=`$ECHO "$complete" | $GREP " "`
26972      if test "x$has_space" != x; then
26973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26975      fi
26976      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26977    fi
26978  fi
26979
26980  # Now new_path has a complete unix path to the binary
26981  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26982    # Keep paths in /bin as-is, but remove trailing .exe if any
26983    new_path="${new_path/%.exe/}"
26984    # Do not save /bin paths to all_fixpath_prefixes!
26985  else
26986    # Not in mixed or Windows style, start by that.
26987    new_path=`cmd //c echo $new_path`
26988
26989  input_path="$new_path"
26990  # Check if we need to convert this using DOS-style short mode. If the path
26991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26992  # take no chances and rewrite it.
26993  # Note: m4 eats our [], so we need to use [ and ] instead.
26994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26995  if test "x$has_forbidden_chars" != x; then
26996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26998  fi
26999
27000    # Output is in $new_path
27001
27002  windows_path="$new_path"
27003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27004    unix_path=`$CYGPATH -u "$windows_path"`
27005    new_path="$unix_path"
27006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27008    new_path="$unix_path"
27009  fi
27010
27011    # remove trailing .exe if any
27012    new_path="${new_path/%.exe/}"
27013
27014    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27015    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27016  fi
27017
27018  else
27019    # We're on a posix platform. Hooray! :)
27020    # First separate the path from the arguments. This will split at the first
27021    # space.
27022    complete="$OBJCOPY"
27023    path="${complete%% *}"
27024    tmp="$complete EOL"
27025    arguments="${tmp#* }"
27026
27027    # Cannot rely on the command "which" here since it doesn't always work.
27028    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27029    if test -z "$is_absolute_path"; then
27030      # Path to executable is not absolute. Find it.
27031      IFS_save="$IFS"
27032      IFS=:
27033      for p in $PATH; do
27034        if test -f "$p/$path" && test -x "$p/$path"; then
27035          new_path="$p/$path"
27036          break
27037        fi
27038      done
27039      IFS="$IFS_save"
27040    else
27041      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27042$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27043      new_path="$path"
27044    fi
27045
27046    if test "x$new_path" = x; then
27047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27048$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27049        has_space=`$ECHO "$complete" | $GREP " "`
27050        if test "x$has_space" != x; then
27051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27053        fi
27054        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27055      fi
27056  fi
27057
27058      # Now join together the path and the arguments once again
27059      if test "x$arguments" != xEOL; then
27060        new_complete="$new_path ${arguments% *}"
27061      else
27062        new_complete="$new_path"
27063      fi
27064
27065  if test "x$complete" != "x$new_complete"; then
27066      OBJCOPY="$new_complete"
27067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27068$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27069    fi
27070
27071    fi
27072fi
27073
27074if test -n "$ac_tool_prefix"; then
27075  for ac_prog in gobjdump objdump
27076  do
27077    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27078set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27080$as_echo_n "checking for $ac_word... " >&6; }
27081if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27082  $as_echo_n "(cached) " >&6
27083else
27084  if test -n "$OBJDUMP"; then
27085  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27086else
27087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27088for as_dir in $PATH
27089do
27090  IFS=$as_save_IFS
27091  test -z "$as_dir" && as_dir=.
27092    for ac_exec_ext in '' $ac_executable_extensions; do
27093  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27094    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27096    break 2
27097  fi
27098done
27099  done
27100IFS=$as_save_IFS
27101
27102fi
27103fi
27104OBJDUMP=$ac_cv_prog_OBJDUMP
27105if test -n "$OBJDUMP"; then
27106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27107$as_echo "$OBJDUMP" >&6; }
27108else
27109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27110$as_echo "no" >&6; }
27111fi
27112
27113
27114    test -n "$OBJDUMP" && break
27115  done
27116fi
27117if test -z "$OBJDUMP"; then
27118  ac_ct_OBJDUMP=$OBJDUMP
27119  for ac_prog in gobjdump objdump
27120do
27121  # Extract the first word of "$ac_prog", so it can be a program name with args.
27122set dummy $ac_prog; ac_word=$2
27123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27124$as_echo_n "checking for $ac_word... " >&6; }
27125if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27126  $as_echo_n "(cached) " >&6
27127else
27128  if test -n "$ac_ct_OBJDUMP"; then
27129  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27130else
27131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27132for as_dir in $PATH
27133do
27134  IFS=$as_save_IFS
27135  test -z "$as_dir" && as_dir=.
27136    for ac_exec_ext in '' $ac_executable_extensions; do
27137  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27138    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27140    break 2
27141  fi
27142done
27143  done
27144IFS=$as_save_IFS
27145
27146fi
27147fi
27148ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27149if test -n "$ac_ct_OBJDUMP"; then
27150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27151$as_echo "$ac_ct_OBJDUMP" >&6; }
27152else
27153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27154$as_echo "no" >&6; }
27155fi
27156
27157
27158  test -n "$ac_ct_OBJDUMP" && break
27159done
27160
27161  if test "x$ac_ct_OBJDUMP" = x; then
27162    OBJDUMP=""
27163  else
27164    case $cross_compiling:$ac_tool_warned in
27165yes:)
27166{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27167$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27168ac_tool_warned=yes ;;
27169esac
27170    OBJDUMP=$ac_ct_OBJDUMP
27171  fi
27172fi
27173
27174if test "x$OBJDUMP" != x; then
27175  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27176
27177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27178
27179  # First separate the path from the arguments. This will split at the first
27180  # space.
27181  complete="$OBJDUMP"
27182  path="${complete%% *}"
27183  tmp="$complete EOL"
27184  arguments="${tmp#* }"
27185
27186  # Input might be given as Windows format, start by converting to
27187  # unix format.
27188  new_path=`$CYGPATH -u "$path"`
27189
27190  # Now try to locate executable using which
27191  new_path=`$WHICH "$new_path" 2> /dev/null`
27192  # bat and cmd files are not always considered executable in cygwin causing which
27193  # to not find them
27194  if test "x$new_path" = x \
27195           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27196           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27197    new_path=`$CYGPATH -u "$path"`
27198  fi
27199  if test "x$new_path" = x; then
27200    # Oops. Which didn't find the executable.
27201    # The splitting of arguments from the executable at a space might have been incorrect,
27202    # since paths with space are more likely in Windows. Give it another try with the whole
27203    # argument.
27204    path="$complete"
27205    arguments="EOL"
27206    new_path=`$CYGPATH -u "$path"`
27207    new_path=`$WHICH "$new_path" 2> /dev/null`
27208    # bat and cmd files are not always considered executable in cygwin causing which
27209    # to not find them
27210    if test "x$new_path" = x \
27211             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27212             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27213      new_path=`$CYGPATH -u "$path"`
27214    fi
27215    if test "x$new_path" = x; then
27216      # It's still not found. Now this is an unrecoverable error.
27217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27218$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27219      has_space=`$ECHO "$complete" | $GREP " "`
27220      if test "x$has_space" != x; then
27221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27223      fi
27224      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27225    fi
27226  fi
27227
27228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27231  # "foo.exe" is OK but "foo" is an error.
27232  #
27233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27234  # It is also a way to make sure we got the proper file name for the real test later on.
27235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27236  if test "x$test_shortpath" = x; then
27237    # Short path failed, file does not exist as specified.
27238    # Try adding .exe or .cmd
27239    if test -f "${new_path}.exe"; then
27240       input_to_shortpath="${new_path}.exe"
27241    elif test -f "${new_path}.cmd"; then
27242       input_to_shortpath="${new_path}.cmd"
27243    else
27244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27245$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27246      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27247$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27248      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27249    fi
27250  else
27251    input_to_shortpath="$new_path"
27252  fi
27253
27254  # Call helper function which possibly converts this using DOS-style short mode.
27255  # If so, the updated path is stored in $new_path.
27256  new_path="$input_to_shortpath"
27257
27258  input_path="$input_to_shortpath"
27259  # Check if we need to convert this using DOS-style short mode. If the path
27260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27261  # take no chances and rewrite it.
27262  # Note: m4 eats our [], so we need to use [ and ] instead.
27263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27264  if test "x$has_forbidden_chars" != x; then
27265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27269      # Going to short mode and back again did indeed matter. Since short mode is
27270      # case insensitive, let's make it lowercase to improve readability.
27271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27272      # Now convert it back to Unix-stile (cygpath)
27273      input_path=`$CYGPATH -u "$shortmode_path"`
27274      new_path="$input_path"
27275    fi
27276  fi
27277
27278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27279  if test "x$test_cygdrive_prefix" = x; then
27280    # As a simple fix, exclude /usr/bin since it's not a real path.
27281    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27283      # a path prefixed by /cygdrive for fixpath to work.
27284      new_path="$CYGWIN_ROOT_PATH$input_path"
27285    fi
27286  fi
27287
27288  # remove trailing .exe if any
27289  new_path="${new_path/%.exe/}"
27290
27291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27292
27293  # First separate the path from the arguments. This will split at the first
27294  # space.
27295  complete="$OBJDUMP"
27296  path="${complete%% *}"
27297  tmp="$complete EOL"
27298  arguments="${tmp#* }"
27299
27300  # Input might be given as Windows format, start by converting to
27301  # unix format.
27302  new_path="$path"
27303
27304  windows_path="$new_path"
27305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27306    unix_path=`$CYGPATH -u "$windows_path"`
27307    new_path="$unix_path"
27308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27310    new_path="$unix_path"
27311  fi
27312
27313
27314  # Now try to locate executable using which
27315  new_path=`$WHICH "$new_path" 2> /dev/null`
27316
27317  if test "x$new_path" = x; then
27318    # Oops. Which didn't find the executable.
27319    # The splitting of arguments from the executable at a space might have been incorrect,
27320    # since paths with space are more likely in Windows. Give it another try with the whole
27321    # argument.
27322    path="$complete"
27323    arguments="EOL"
27324    new_path="$path"
27325
27326  windows_path="$new_path"
27327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27328    unix_path=`$CYGPATH -u "$windows_path"`
27329    new_path="$unix_path"
27330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27332    new_path="$unix_path"
27333  fi
27334
27335
27336    new_path=`$WHICH "$new_path" 2> /dev/null`
27337
27338    if test "x$new_path" = x; then
27339      # It's still not found. Now this is an unrecoverable error.
27340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27341$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27342      has_space=`$ECHO "$complete" | $GREP " "`
27343      if test "x$has_space" != x; then
27344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27346      fi
27347      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27348    fi
27349  fi
27350
27351  # Now new_path has a complete unix path to the binary
27352  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27353    # Keep paths in /bin as-is, but remove trailing .exe if any
27354    new_path="${new_path/%.exe/}"
27355    # Do not save /bin paths to all_fixpath_prefixes!
27356  else
27357    # Not in mixed or Windows style, start by that.
27358    new_path=`cmd //c echo $new_path`
27359
27360  input_path="$new_path"
27361  # Check if we need to convert this using DOS-style short mode. If the path
27362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27363  # take no chances and rewrite it.
27364  # Note: m4 eats our [], so we need to use [ and ] instead.
27365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27366  if test "x$has_forbidden_chars" != x; then
27367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27369  fi
27370
27371    # Output is in $new_path
27372
27373  windows_path="$new_path"
27374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27375    unix_path=`$CYGPATH -u "$windows_path"`
27376    new_path="$unix_path"
27377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27379    new_path="$unix_path"
27380  fi
27381
27382    # remove trailing .exe if any
27383    new_path="${new_path/%.exe/}"
27384
27385    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27386    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27387  fi
27388
27389  else
27390    # We're on a posix platform. Hooray! :)
27391    # First separate the path from the arguments. This will split at the first
27392    # space.
27393    complete="$OBJDUMP"
27394    path="${complete%% *}"
27395    tmp="$complete EOL"
27396    arguments="${tmp#* }"
27397
27398    # Cannot rely on the command "which" here since it doesn't always work.
27399    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27400    if test -z "$is_absolute_path"; then
27401      # Path to executable is not absolute. Find it.
27402      IFS_save="$IFS"
27403      IFS=:
27404      for p in $PATH; do
27405        if test -f "$p/$path" && test -x "$p/$path"; then
27406          new_path="$p/$path"
27407          break
27408        fi
27409      done
27410      IFS="$IFS_save"
27411    else
27412      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27413$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27414      new_path="$path"
27415    fi
27416
27417    if test "x$new_path" = x; then
27418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27419$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27420        has_space=`$ECHO "$complete" | $GREP " "`
27421        if test "x$has_space" != x; then
27422          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27423$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27424        fi
27425        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27426      fi
27427  fi
27428
27429      # Now join together the path and the arguments once again
27430      if test "x$arguments" != xEOL; then
27431        new_complete="$new_path ${arguments% *}"
27432      else
27433        new_complete="$new_path"
27434      fi
27435
27436  if test "x$complete" != "x$new_complete"; then
27437      OBJDUMP="$new_complete"
27438      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27439$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27440    fi
27441
27442fi
27443
27444if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27445   # Extract the first word of "lipo", so it can be a program name with args.
27446set dummy lipo; ac_word=$2
27447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27448$as_echo_n "checking for $ac_word... " >&6; }
27449if test "${ac_cv_path_LIPO+set}" = set; then :
27450  $as_echo_n "(cached) " >&6
27451else
27452  case $LIPO in
27453  [\\/]* | ?:[\\/]*)
27454  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27455  ;;
27456  *)
27457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27458for as_dir in $PATH
27459do
27460  IFS=$as_save_IFS
27461  test -z "$as_dir" && as_dir=.
27462    for ac_exec_ext in '' $ac_executable_extensions; do
27463  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27464    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27466    break 2
27467  fi
27468done
27469  done
27470IFS=$as_save_IFS
27471
27472  ;;
27473esac
27474fi
27475LIPO=$ac_cv_path_LIPO
27476if test -n "$LIPO"; then
27477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27478$as_echo "$LIPO" >&6; }
27479else
27480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27481$as_echo "no" >&6; }
27482fi
27483
27484
27485
27486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27487
27488  # First separate the path from the arguments. This will split at the first
27489  # space.
27490  complete="$LIPO"
27491  path="${complete%% *}"
27492  tmp="$complete EOL"
27493  arguments="${tmp#* }"
27494
27495  # Input might be given as Windows format, start by converting to
27496  # unix format.
27497  new_path=`$CYGPATH -u "$path"`
27498
27499  # Now try to locate executable using which
27500  new_path=`$WHICH "$new_path" 2> /dev/null`
27501  # bat and cmd files are not always considered executable in cygwin causing which
27502  # to not find them
27503  if test "x$new_path" = x \
27504           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27505           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27506    new_path=`$CYGPATH -u "$path"`
27507  fi
27508  if test "x$new_path" = x; then
27509    # Oops. Which didn't find the executable.
27510    # The splitting of arguments from the executable at a space might have been incorrect,
27511    # since paths with space are more likely in Windows. Give it another try with the whole
27512    # argument.
27513    path="$complete"
27514    arguments="EOL"
27515    new_path=`$CYGPATH -u "$path"`
27516    new_path=`$WHICH "$new_path" 2> /dev/null`
27517    # bat and cmd files are not always considered executable in cygwin causing which
27518    # to not find them
27519    if test "x$new_path" = x \
27520             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27521             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27522      new_path=`$CYGPATH -u "$path"`
27523    fi
27524    if test "x$new_path" = x; then
27525      # It's still not found. Now this is an unrecoverable error.
27526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27527$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27528      has_space=`$ECHO "$complete" | $GREP " "`
27529      if test "x$has_space" != x; then
27530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27532      fi
27533      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27534    fi
27535  fi
27536
27537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27540  # "foo.exe" is OK but "foo" is an error.
27541  #
27542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27543  # It is also a way to make sure we got the proper file name for the real test later on.
27544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27545  if test "x$test_shortpath" = x; then
27546    # Short path failed, file does not exist as specified.
27547    # Try adding .exe or .cmd
27548    if test -f "${new_path}.exe"; then
27549       input_to_shortpath="${new_path}.exe"
27550    elif test -f "${new_path}.cmd"; then
27551       input_to_shortpath="${new_path}.cmd"
27552    else
27553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27554$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27555      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27556$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27557      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27558    fi
27559  else
27560    input_to_shortpath="$new_path"
27561  fi
27562
27563  # Call helper function which possibly converts this using DOS-style short mode.
27564  # If so, the updated path is stored in $new_path.
27565  new_path="$input_to_shortpath"
27566
27567  input_path="$input_to_shortpath"
27568  # Check if we need to convert this using DOS-style short mode. If the path
27569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27570  # take no chances and rewrite it.
27571  # Note: m4 eats our [], so we need to use [ and ] instead.
27572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27573  if test "x$has_forbidden_chars" != x; then
27574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27578      # Going to short mode and back again did indeed matter. Since short mode is
27579      # case insensitive, let's make it lowercase to improve readability.
27580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27581      # Now convert it back to Unix-stile (cygpath)
27582      input_path=`$CYGPATH -u "$shortmode_path"`
27583      new_path="$input_path"
27584    fi
27585  fi
27586
27587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27588  if test "x$test_cygdrive_prefix" = x; then
27589    # As a simple fix, exclude /usr/bin since it's not a real path.
27590    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27592      # a path prefixed by /cygdrive for fixpath to work.
27593      new_path="$CYGWIN_ROOT_PATH$input_path"
27594    fi
27595  fi
27596
27597  # remove trailing .exe if any
27598  new_path="${new_path/%.exe/}"
27599
27600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27601
27602  # First separate the path from the arguments. This will split at the first
27603  # space.
27604  complete="$LIPO"
27605  path="${complete%% *}"
27606  tmp="$complete EOL"
27607  arguments="${tmp#* }"
27608
27609  # Input might be given as Windows format, start by converting to
27610  # unix format.
27611  new_path="$path"
27612
27613  windows_path="$new_path"
27614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27615    unix_path=`$CYGPATH -u "$windows_path"`
27616    new_path="$unix_path"
27617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27619    new_path="$unix_path"
27620  fi
27621
27622
27623  # Now try to locate executable using which
27624  new_path=`$WHICH "$new_path" 2> /dev/null`
27625
27626  if test "x$new_path" = x; then
27627    # Oops. Which didn't find the executable.
27628    # The splitting of arguments from the executable at a space might have been incorrect,
27629    # since paths with space are more likely in Windows. Give it another try with the whole
27630    # argument.
27631    path="$complete"
27632    arguments="EOL"
27633    new_path="$path"
27634
27635  windows_path="$new_path"
27636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27637    unix_path=`$CYGPATH -u "$windows_path"`
27638    new_path="$unix_path"
27639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27641    new_path="$unix_path"
27642  fi
27643
27644
27645    new_path=`$WHICH "$new_path" 2> /dev/null`
27646
27647    if test "x$new_path" = x; then
27648      # It's still not found. Now this is an unrecoverable error.
27649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27650$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27651      has_space=`$ECHO "$complete" | $GREP " "`
27652      if test "x$has_space" != x; then
27653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27655      fi
27656      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27657    fi
27658  fi
27659
27660  # Now new_path has a complete unix path to the binary
27661  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27662    # Keep paths in /bin as-is, but remove trailing .exe if any
27663    new_path="${new_path/%.exe/}"
27664    # Do not save /bin paths to all_fixpath_prefixes!
27665  else
27666    # Not in mixed or Windows style, start by that.
27667    new_path=`cmd //c echo $new_path`
27668
27669  input_path="$new_path"
27670  # Check if we need to convert this using DOS-style short mode. If the path
27671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27672  # take no chances and rewrite it.
27673  # Note: m4 eats our [], so we need to use [ and ] instead.
27674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27675  if test "x$has_forbidden_chars" != x; then
27676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27678  fi
27679
27680    # Output is in $new_path
27681
27682  windows_path="$new_path"
27683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27684    unix_path=`$CYGPATH -u "$windows_path"`
27685    new_path="$unix_path"
27686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27688    new_path="$unix_path"
27689  fi
27690
27691    # remove trailing .exe if any
27692    new_path="${new_path/%.exe/}"
27693
27694    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27695    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27696  fi
27697
27698  else
27699    # We're on a posix platform. Hooray! :)
27700    # First separate the path from the arguments. This will split at the first
27701    # space.
27702    complete="$LIPO"
27703    path="${complete%% *}"
27704    tmp="$complete EOL"
27705    arguments="${tmp#* }"
27706
27707    # Cannot rely on the command "which" here since it doesn't always work.
27708    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27709    if test -z "$is_absolute_path"; then
27710      # Path to executable is not absolute. Find it.
27711      IFS_save="$IFS"
27712      IFS=:
27713      for p in $PATH; do
27714        if test -f "$p/$path" && test -x "$p/$path"; then
27715          new_path="$p/$path"
27716          break
27717        fi
27718      done
27719      IFS="$IFS_save"
27720    else
27721      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27722$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27723      new_path="$path"
27724    fi
27725
27726    if test "x$new_path" = x; then
27727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27728$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27729        has_space=`$ECHO "$complete" | $GREP " "`
27730        if test "x$has_space" != x; then
27731          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27732$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27733        fi
27734        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27735      fi
27736  fi
27737
27738      # Now join together the path and the arguments once again
27739      if test "x$arguments" != xEOL; then
27740        new_complete="$new_path ${arguments% *}"
27741      else
27742        new_complete="$new_path"
27743      fi
27744
27745  if test "x$complete" != "x$new_complete"; then
27746      LIPO="$new_complete"
27747      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27748$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27749    fi
27750
27751fi
27752
27753# Restore old path without tools dir
27754PATH="$OLD_PATH"
27755
27756
27757# FIXME: Currently we must test this after paths but before flags. Fix!
27758
27759# And we can test some aspects on the target using configure macros.
27760
27761
27762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27763$as_echo_n "checking for ANSI C header files... " >&6; }
27764if test "${ac_cv_header_stdc+set}" = set; then :
27765  $as_echo_n "(cached) " >&6
27766else
27767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27768/* end confdefs.h.  */
27769#include <stdlib.h>
27770#include <stdarg.h>
27771#include <string.h>
27772#include <float.h>
27773
27774int
27775main ()
27776{
27777
27778  ;
27779  return 0;
27780}
27781_ACEOF
27782if ac_fn_cxx_try_compile "$LINENO"; then :
27783  ac_cv_header_stdc=yes
27784else
27785  ac_cv_header_stdc=no
27786fi
27787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27788
27789if test $ac_cv_header_stdc = yes; then
27790  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27792/* end confdefs.h.  */
27793#include <string.h>
27794
27795_ACEOF
27796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27797  $EGREP "memchr" >/dev/null 2>&1; then :
27798
27799else
27800  ac_cv_header_stdc=no
27801fi
27802rm -f conftest*
27803
27804fi
27805
27806if test $ac_cv_header_stdc = yes; then
27807  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27809/* end confdefs.h.  */
27810#include <stdlib.h>
27811
27812_ACEOF
27813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27814  $EGREP "free" >/dev/null 2>&1; then :
27815
27816else
27817  ac_cv_header_stdc=no
27818fi
27819rm -f conftest*
27820
27821fi
27822
27823if test $ac_cv_header_stdc = yes; then
27824  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27825  if test "$cross_compiling" = yes; then :
27826  :
27827else
27828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27829/* end confdefs.h.  */
27830#include <ctype.h>
27831#include <stdlib.h>
27832#if ((' ' & 0x0FF) == 0x020)
27833# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27834# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27835#else
27836# define ISLOWER(c) \
27837		   (('a' <= (c) && (c) <= 'i') \
27838		     || ('j' <= (c) && (c) <= 'r') \
27839		     || ('s' <= (c) && (c) <= 'z'))
27840# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27841#endif
27842
27843#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27844int
27845main ()
27846{
27847  int i;
27848  for (i = 0; i < 256; i++)
27849    if (XOR (islower (i), ISLOWER (i))
27850	|| toupper (i) != TOUPPER (i))
27851      return 2;
27852  return 0;
27853}
27854_ACEOF
27855if ac_fn_cxx_try_run "$LINENO"; then :
27856
27857else
27858  ac_cv_header_stdc=no
27859fi
27860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27861  conftest.$ac_objext conftest.beam conftest.$ac_ext
27862fi
27863
27864fi
27865fi
27866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27867$as_echo "$ac_cv_header_stdc" >&6; }
27868if test $ac_cv_header_stdc = yes; then
27869
27870$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27871
27872fi
27873
27874# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27875for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27876		  inttypes.h stdint.h unistd.h
27877do :
27878  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27879ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27880"
27881if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27882  cat >>confdefs.h <<_ACEOF
27883#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27884_ACEOF
27885
27886fi
27887
27888done
27889
27890
27891
27892###############################################################################
27893#
27894# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27895# (The JVM can use 32 or 64 bit Java pointers but that decision
27896# is made at runtime.)
27897#
27898if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27899  # Always specify -m flags on Solaris
27900
27901  # keep track of c/cxx flags that we added outselves...
27902  #   to prevent emitting warning...
27903  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27904  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27905  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27906
27907  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27908  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27909  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27910
27911  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27912  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27913  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27914
27915elif test "x$COMPILE_TYPE" = xreduced; then
27916  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27917    # Specify -m if running reduced on other Posix platforms
27918
27919  # keep track of c/cxx flags that we added outselves...
27920  #   to prevent emitting warning...
27921  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27922  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27923  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27924
27925  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27926  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27927  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27928
27929  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27930  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27931  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27932
27933  fi
27934fi
27935
27936# Make compilation sanity check
27937for ac_header in stdio.h
27938do :
27939  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27940if test "x$ac_cv_header_stdio_h" = x""yes; then :
27941  cat >>confdefs.h <<_ACEOF
27942#define HAVE_STDIO_H 1
27943_ACEOF
27944
27945else
27946
27947  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27948$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27949  if test "x$COMPILE_TYPE" = xreduced; then
27950    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27951$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27952  elif test "x$COMPILE_TYPE" = xcross; then
27953    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27954$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27955  fi
27956  as_fn_error $? "Cannot continue." "$LINENO" 5
27957
27958fi
27959
27960done
27961
27962
27963# The cast to long int works around a bug in the HP C Compiler
27964# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27965# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27966# This bug is HP SR number 8606223364.
27967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27968$as_echo_n "checking size of int *... " >&6; }
27969if test "${ac_cv_sizeof_int_p+set}" = set; then :
27970  $as_echo_n "(cached) " >&6
27971else
27972  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27973
27974else
27975  if test "$ac_cv_type_int_p" = yes; then
27976     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27978as_fn_error 77 "cannot compute sizeof (int *)
27979See \`config.log' for more details" "$LINENO" 5 ; }
27980   else
27981     ac_cv_sizeof_int_p=0
27982   fi
27983fi
27984
27985fi
27986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27987$as_echo "$ac_cv_sizeof_int_p" >&6; }
27988
27989
27990
27991cat >>confdefs.h <<_ACEOF
27992#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27993_ACEOF
27994
27995
27996
27997if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27998  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27999  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28000fi
28001
28002if test "x$SIZEOF_INT_P" = x; then
28003    # The test failed, lets stick to the assumed value.
28004    { $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
28005$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28006else
28007    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28008
28009    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28010        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
28011    fi
28012fi
28013
28014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28015$as_echo_n "checking for target address size... " >&6; }
28016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28017$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28018
28019
28020###############################################################################
28021#
28022# Is the target little of big endian?
28023#
28024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28025$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28026if test "${ac_cv_c_bigendian+set}" = set; then :
28027  $as_echo_n "(cached) " >&6
28028else
28029  ac_cv_c_bigendian=unknown
28030    # See if we're dealing with a universal compiler.
28031    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28032/* end confdefs.h.  */
28033#ifndef __APPLE_CC__
28034	       not a universal capable compiler
28035	     #endif
28036	     typedef int dummy;
28037
28038_ACEOF
28039if ac_fn_cxx_try_compile "$LINENO"; then :
28040
28041	# Check for potential -arch flags.  It is not universal unless
28042	# there are at least two -arch flags with different values.
28043	ac_arch=
28044	ac_prev=
28045	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28046	 if test -n "$ac_prev"; then
28047	   case $ac_word in
28048	     i?86 | x86_64 | ppc | ppc64)
28049	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28050		 ac_arch=$ac_word
28051	       else
28052		 ac_cv_c_bigendian=universal
28053		 break
28054	       fi
28055	       ;;
28056	   esac
28057	   ac_prev=
28058	 elif test "x$ac_word" = "x-arch"; then
28059	   ac_prev=arch
28060	 fi
28061       done
28062fi
28063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28064    if test $ac_cv_c_bigendian = unknown; then
28065      # See if sys/param.h defines the BYTE_ORDER macro.
28066      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28067/* end confdefs.h.  */
28068#include <sys/types.h>
28069	     #include <sys/param.h>
28070
28071int
28072main ()
28073{
28074#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28075		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28076		     && LITTLE_ENDIAN)
28077	      bogus endian macros
28078	     #endif
28079
28080  ;
28081  return 0;
28082}
28083_ACEOF
28084if ac_fn_cxx_try_compile "$LINENO"; then :
28085  # It does; now see whether it defined to BIG_ENDIAN or not.
28086	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28087/* end confdefs.h.  */
28088#include <sys/types.h>
28089		#include <sys/param.h>
28090
28091int
28092main ()
28093{
28094#if BYTE_ORDER != BIG_ENDIAN
28095		 not big endian
28096		#endif
28097
28098  ;
28099  return 0;
28100}
28101_ACEOF
28102if ac_fn_cxx_try_compile "$LINENO"; then :
28103  ac_cv_c_bigendian=yes
28104else
28105  ac_cv_c_bigendian=no
28106fi
28107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28108fi
28109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28110    fi
28111    if test $ac_cv_c_bigendian = unknown; then
28112      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28113      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28114/* end confdefs.h.  */
28115#include <limits.h>
28116
28117int
28118main ()
28119{
28120#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28121	      bogus endian macros
28122	     #endif
28123
28124  ;
28125  return 0;
28126}
28127_ACEOF
28128if ac_fn_cxx_try_compile "$LINENO"; then :
28129  # It does; now see whether it defined to _BIG_ENDIAN or not.
28130	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28131/* end confdefs.h.  */
28132#include <limits.h>
28133
28134int
28135main ()
28136{
28137#ifndef _BIG_ENDIAN
28138		 not big endian
28139		#endif
28140
28141  ;
28142  return 0;
28143}
28144_ACEOF
28145if ac_fn_cxx_try_compile "$LINENO"; then :
28146  ac_cv_c_bigendian=yes
28147else
28148  ac_cv_c_bigendian=no
28149fi
28150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28151fi
28152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28153    fi
28154    if test $ac_cv_c_bigendian = unknown; then
28155      # Compile a test program.
28156      if test "$cross_compiling" = yes; then :
28157  # Try to guess by grepping values from an object file.
28158	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28159/* end confdefs.h.  */
28160short int ascii_mm[] =
28161		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28162		short int ascii_ii[] =
28163		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28164		int use_ascii (int i) {
28165		  return ascii_mm[i] + ascii_ii[i];
28166		}
28167		short int ebcdic_ii[] =
28168		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28169		short int ebcdic_mm[] =
28170		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28171		int use_ebcdic (int i) {
28172		  return ebcdic_mm[i] + ebcdic_ii[i];
28173		}
28174		extern int foo;
28175
28176int
28177main ()
28178{
28179return use_ascii (foo) == use_ebcdic (foo);
28180  ;
28181  return 0;
28182}
28183_ACEOF
28184if ac_fn_cxx_try_compile "$LINENO"; then :
28185  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28186	      ac_cv_c_bigendian=yes
28187	    fi
28188	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28189	      if test "$ac_cv_c_bigendian" = unknown; then
28190		ac_cv_c_bigendian=no
28191	      else
28192		# finding both strings is unlikely to happen, but who knows?
28193		ac_cv_c_bigendian=unknown
28194	      fi
28195	    fi
28196fi
28197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28198else
28199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28200/* end confdefs.h.  */
28201$ac_includes_default
28202int
28203main ()
28204{
28205
28206	     /* Are we little or big endian?  From Harbison&Steele.  */
28207	     union
28208	     {
28209	       long int l;
28210	       char c[sizeof (long int)];
28211	     } u;
28212	     u.l = 1;
28213	     return u.c[sizeof (long int) - 1] == 1;
28214
28215  ;
28216  return 0;
28217}
28218_ACEOF
28219if ac_fn_cxx_try_run "$LINENO"; then :
28220  ac_cv_c_bigendian=no
28221else
28222  ac_cv_c_bigendian=yes
28223fi
28224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28225  conftest.$ac_objext conftest.beam conftest.$ac_ext
28226fi
28227
28228    fi
28229fi
28230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28231$as_echo "$ac_cv_c_bigendian" >&6; }
28232 case $ac_cv_c_bigendian in #(
28233   yes)
28234     ENDIAN="big";; #(
28235   no)
28236     ENDIAN="little" ;; #(
28237   universal)
28238     ENDIAN="universal_endianness"
28239     ;; #(
28240   *)
28241     ENDIAN="unknown" ;;
28242 esac
28243
28244
28245if test "x$ENDIAN" = xuniversal_endianness; then
28246    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28247fi
28248if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28249    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
28250fi
28251
28252
28253# Configure flags for the tools
28254
28255
28256###############################################################################
28257#
28258# How to compile shared libraries.
28259#
28260
28261if test "x$GCC" = xyes; then
28262    COMPILER_NAME=gcc
28263    PICFLAG="-fPIC"
28264    LIBRARY_PREFIX=lib
28265    SHARED_LIBRARY='lib$1.so'
28266    STATIC_LIBRARY='lib$1.a'
28267    SHARED_LIBRARY_FLAGS="-shared"
28268    SHARED_LIBRARY_SUFFIX='.so'
28269    STATIC_LIBRARY_SUFFIX='.a'
28270    OBJ_SUFFIX='.o'
28271    EXE_SUFFIX=''
28272    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28273    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28274    C_FLAG_REORDER=''
28275    CXX_FLAG_REORDER=''
28276    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28277    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28278    LD="$CC"
28279    LDEXE="$CC"
28280    LDCXX="$CXX"
28281    LDEXECXX="$CXX"
28282    POST_STRIP_CMD="$STRIP -g"
28283
28284    # Linking is different on MacOSX
28285    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28286        # Might change in the future to clang.
28287        COMPILER_NAME=gcc
28288        SHARED_LIBRARY='lib$1.dylib'
28289        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28290        SHARED_LIBRARY_SUFFIX='.dylib'
28291        EXE_SUFFIX=''
28292        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28293        SET_SHARED_LIBRARY_MAPFILE=''
28294        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28295        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28296        POST_STRIP_CMD="$STRIP -S"
28297    fi
28298else
28299    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28300        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28301        COMPILER_NAME=ossc
28302        PICFLAG="-KPIC"
28303        LIBRARY_PREFIX=lib
28304        SHARED_LIBRARY='lib$1.so'
28305        STATIC_LIBRARY='lib$1.a'
28306        SHARED_LIBRARY_FLAGS="-G"
28307        SHARED_LIBRARY_SUFFIX='.so'
28308        STATIC_LIBRARY_SUFFIX='.a'
28309        OBJ_SUFFIX='.o'
28310        EXE_SUFFIX=''
28311        SET_SHARED_LIBRARY_NAME=''
28312        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28313	C_FLAG_REORDER='-xF'
28314	CXX_FLAG_REORDER='-xF'
28315        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28316        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28317        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28318        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28319        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28320        POST_STRIP_CMD="$STRIP -x"
28321        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28322    fi
28323    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28324        # If it is not gcc, then assume it is the MS Visual Studio compiler
28325        COMPILER_NAME=cl
28326        PICFLAG=""
28327        LIBRARY_PREFIX=
28328        SHARED_LIBRARY='$1.dll'
28329        STATIC_LIBRARY='$1.lib'
28330        SHARED_LIBRARY_FLAGS="-LD"
28331        SHARED_LIBRARY_SUFFIX='.dll'
28332        STATIC_LIBRARY_SUFFIX='.lib'
28333        OBJ_SUFFIX='.obj'
28334        EXE_SUFFIX='.exe'
28335        SET_SHARED_LIBRARY_NAME=''
28336        SET_SHARED_LIBRARY_MAPFILE=''
28337        SET_SHARED_LIBRARY_ORIGIN=''
28338        SET_EXECUTABLE_ORIGIN=''
28339    fi
28340fi
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359# The (cross) compiler is now configured, we can now test capabilities
28360# of the target platform.
28361
28362
28363
28364###############################################################################
28365#
28366# Setup the opt flags for different compilers
28367# and different operating systems.
28368#
28369
28370#
28371# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28372#
28373if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28374    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28375    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28376    CFLAGS="$CFLAGS -mstackrealign"
28377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28378$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28379    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28380/* end confdefs.h.  */
28381int main() { return 0; }
28382_ACEOF
28383if ac_fn_cxx_try_link "$LINENO"; then :
28384
28385		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28386$as_echo "yes" >&6; }
28387
28388else
28389
28390		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28391$as_echo "no" >&6; }
28392	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28393
28394fi
28395rm -f core conftest.err conftest.$ac_objext \
28396    conftest$ac_exeext conftest.$ac_ext
28397fi
28398
28399C_FLAG_DEPS="-MMD -MF"
28400CXX_FLAG_DEPS="-MMD -MF"
28401
28402case $COMPILER_TYPE in
28403  CC )
28404    D_FLAG="-g"
28405    case $COMPILER_NAME in
28406      gcc )
28407      	case $OPENJDK_TARGET_OS in
28408	  macosx )
28409	    # On MacOSX we optimize for size, something
28410	    # we should do for all platforms?
28411	    C_O_FLAG_HI="-Os"
28412	    C_O_FLAG_NORM="-Os"
28413	    C_O_FLAG_NONE=""
28414	    ;;
28415	  *)
28416	    C_O_FLAG_HI="-O3"
28417	    C_O_FLAG_NORM="-O2"
28418	    C_O_FLAG_NONE="-O0"
28419	    CFLAGS_DEBUG_SYMBOLS="-g"
28420	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28421	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28422	       CFLAGS_DEBUG_SYMBOLS="-g1"
28423	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28424	    fi
28425	    ;;
28426	esac
28427        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28428        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28429        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28430        ;;
28431      ossc )
28432        #
28433        # Forte has different names for this with their C++ compiler...
28434        #
28435        C_FLAG_DEPS="-xMMD -xMF"
28436        CXX_FLAG_DEPS="-xMMD -xMF"
28437
28438        # Extra options used with HIGHEST
28439        #
28440        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28441        #          done with care, there are some assumptions below that need to
28442        #          be understood about the use of pointers, and IEEE behavior.
28443        #
28444        # Use non-standard floating point mode (not IEEE 754)
28445        CC_HIGHEST="$CC_HIGHEST -fns"
28446        # Do some simplification of floating point arithmetic (not IEEE 754)
28447        CC_HIGHEST="$CC_HIGHEST -fsimple"
28448        # Use single precision floating point with 'float'
28449        CC_HIGHEST="$CC_HIGHEST -fsingle"
28450        # Assume memory references via basic pointer types do not alias
28451        #   (Source with excessing pointer casting and data access with mixed
28452        #    pointer types are not recommended)
28453        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28454        # Use intrinsic or inline versions for math/std functions
28455        #   (If you expect perfect errno behavior, do not use this)
28456        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28457        # Loop data dependency optimizations (need -xO3 or higher)
28458        CC_HIGHEST="$CC_HIGHEST -xdepend"
28459        # Pointer parameters to functions do not overlap
28460        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28461        #    If you pass in multiple pointers to the same data, do not use this)
28462        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28463        # Inline some library routines
28464        #   (If you expect perfect errno behavior, do not use this)
28465        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28466        # Use optimized math routines
28467        #   (If you expect perfect errno behavior, do not use this)
28468        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28469        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28470
28471        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28472          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28473          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28474        fi
28475
28476        case $OPENJDK_TARGET_CPU_ARCH in
28477          x86)
28478            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28479            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28480            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28481            C_O_FLAG_NONE="-xregs=no%frameptr"
28482            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28483            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28484            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28485            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28486            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28487               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28488               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28489            fi
28490            ;;
28491          sparc)
28492            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28493            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28494            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28495            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28496            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28497            C_O_FLAG_NONE=""
28498            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28499            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28500            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28501            CXX_O_FLAG_NONE=""
28502            ;;
28503        esac
28504
28505    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28506    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28507    esac
28508    ;;
28509  CL )
28510    D_FLAG=
28511    C_O_FLAG_HIGHEST="-O2"
28512    C_O_FLAG_HI="-O1"
28513    C_O_FLAG_NORM="-O1"
28514    C_O_FLAG_NONE="-Od"
28515    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28516    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28517    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28518    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28519    ;;
28520esac
28521
28522if test -z "$C_O_FLAG_HIGHEST"; then
28523   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28524fi
28525
28526if test -z "$CXX_O_FLAG_HIGHEST"; then
28527   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28528fi
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28544   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28545$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28546fi
28547
28548if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28549   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28550$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28551fi
28552
28553if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28554   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28555$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28556fi
28557
28558
28559# Check whether --with-extra-cflags was given.
28560if test "${with_extra_cflags+set}" = set; then :
28561  withval=$with_extra_cflags;
28562fi
28563
28564
28565
28566# Check whether --with-extra-cxxflags was given.
28567if test "${with_extra_cxxflags+set}" = set; then :
28568  withval=$with_extra_cxxflags;
28569fi
28570
28571
28572
28573# Check whether --with-extra-ldflags was given.
28574if test "${with_extra_ldflags+set}" = set; then :
28575  withval=$with_extra_ldflags;
28576fi
28577
28578
28579CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28580CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28581LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28582
28583# Hotspot needs these set in their legacy form
28584LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28585LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28586LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28587
28588
28589
28590
28591
28592###############################################################################
28593#
28594# Now setup the CFLAGS and LDFLAGS for the JDK build.
28595# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28596#
28597case $COMPILER_NAME in
28598      gcc )
28599      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28600                          -pipe \
28601                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28602	  case $OPENJDK_TARGET_CPU_ARCH in
28603	  arm )
28604            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28605	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28606	  ;;
28607	  ppc )
28608            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28609	  ;;
28610	  * )
28611	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28612	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28613          ;;
28614	  esac
28615          ;;
28616      ossc )
28617          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28618          case $OPENJDK_TARGET_CPU_ARCH in
28619          x86 )
28620            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28621       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28622          ;;
28623          esac
28624
28625      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28626      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28627
28628          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28629          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28630          ;;
28631      cl )
28632          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28633               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28634	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28635	       -DWIN32 -DIAL"
28636          case $OPENJDK_TARGET_CPU in
28637              x86 )
28638                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28639                  ;;
28640              x86_64 )
28641                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28642                  ;;
28643          esac
28644          ;;
28645esac
28646
28647###############################################################################
28648
28649CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28650
28651# The package path is used only on macosx?
28652PACKAGE_PATH=/opt/local
28653
28654
28655if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28656    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28657    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28658    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28659    #   Note: -Dmacro         is the same as    #define macro 1
28660    #         -Dmacro=	    is the same as    #define macro
28661    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28662        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28663    else
28664        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28665    fi
28666else
28667    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28668fi
28669if test "x$OPENJDK_TARGET_OS" = xlinux; then
28670    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28671fi
28672if test "x$OPENJDK_TARGET_OS" = xwindows; then
28673    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28674fi
28675if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28676    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28677fi
28678if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28679    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28680    # Setting these parameters makes it an error to link to macosx APIs that are
28681    # newer than the given OS version and makes the linked binaries compatible even
28682    # if built on a newer version of the OS.
28683    # The expected format is X.Y.Z
28684    MACOSX_VERSION_MIN=10.7.0
28685
28686    # The macro takes the version with no dots, ex: 1070
28687    # Let the flags variables get resolved in make for easier override on make
28688    # command line.
28689    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28690    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28691fi
28692if test "x$OPENJDK_TARGET_OS" = xbsd; then
28693    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28694fi
28695if test "x$DEBUG_LEVEL" = xrelease; then
28696    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28697    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28698        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28699    fi
28700else
28701    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28702fi
28703
28704CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28705CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28706
28707CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28708        -I${JDK_OUTPUTDIR}/include \
28709        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28710        -I${JDK_TOPDIR}/src/share/javavm/export \
28711        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28712        -I${JDK_TOPDIR}/src/share/native/common \
28713        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28714
28715# The shared libraries are compiled using the picflag.
28716CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28717CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28718
28719# Executable flags
28720CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28721CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28722
28723# Now this is odd. The JDK native libraries have to link against libjvm.so
28724# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28725# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28726# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28727# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28728# libraries will link to whatever is in memory. Yuck.
28729#
28730# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28731if test "x$COMPILER_NAME" = xcl; then
28732    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28733    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28734        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28735    fi
28736    # TODO: make -debug optional "--disable-full-debug-symbols"
28737    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28738    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28739    LDFLAGS_JDKLIB_SUFFIX=""
28740    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28741        LDFLAGS_STACK_SIZE=1048576
28742    else
28743        LDFLAGS_STACK_SIZE=327680
28744    fi
28745    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28746else
28747    if test "x$COMPILER_NAME" = xgcc; then
28748        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28749        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28750        if test -n "$HAS_GNU_HASH"; then
28751            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28752        fi
28753        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28754          # And since we now know that the linker is gnu, then add -z defs, to forbid
28755          # undefined symbols in object files.
28756          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28757          if test "x$DEBUG_LEVEL" = "xrelease"; then
28758              # When building release libraries, tell the linker optimize them.
28759              # Should this be supplied to the OSS linker as well?
28760              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28761          fi
28762        fi
28763    fi
28764    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28765                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28766
28767    # On some platforms (mac) the linker warns about non existing -L dirs.
28768    # Add server first if available. Linking aginst client does not always produce the same results.
28769    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28770    # Default to server for other variants.
28771    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28772        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28773    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28774        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28775    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28776        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28777    else
28778        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28779    fi
28780
28781    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28782    if test "x$COMPILER_NAME" = xossc; then
28783        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28784    fi
28785
28786    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28787    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28788        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28789    fi
28790fi
28791
28792# Adjust flags according to debug level.
28793case $DEBUG_LEVEL in
28794      fastdebug )
28795              CFLAGS="$CFLAGS $D_FLAG"
28796              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28797              ;;
28798      slowdebug )
28799              CFLAGS="$CFLAGS $D_FLAG"
28800	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28801	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28802	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28803	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28804              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28805              ;;
28806esac
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822# Setup debug symbols (need objcopy from the toolchain for that)
28823
28824#
28825# ENABLE_DEBUG_SYMBOLS
28826# This must be done after the toolchain is setup, since we're looking at objcopy.
28827#
28828# Check whether --enable-debug-symbols was given.
28829if test "${enable_debug_symbols+set}" = set; then :
28830  enableval=$enable_debug_symbols;
28831fi
28832
28833
28834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28835$as_echo_n "checking if we should generate debug symbols... " >&6; }
28836
28837if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28838   # explicit enabling of enable-debug-symbols and can't find objcopy
28839   #   this is an error
28840   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28841fi
28842
28843if test "x$enable_debug_symbols" = "xyes"; then
28844  ENABLE_DEBUG_SYMBOLS=true
28845elif test "x$enable_debug_symbols" = "xno"; then
28846  ENABLE_DEBUG_SYMBOLS=false
28847else
28848  # default on macosx is false
28849  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28850    ENABLE_DEBUG_SYMBOLS=false
28851  # Default is on if objcopy is found, otherwise off
28852  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28853    ENABLE_DEBUG_SYMBOLS=true
28854  else
28855    ENABLE_DEBUG_SYMBOLS=false
28856  fi
28857fi
28858
28859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28860$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28861
28862#
28863# ZIP_DEBUGINFO_FILES
28864#
28865# Check whether --enable-zip-debug-info was given.
28866if test "${enable_zip_debug_info+set}" = set; then :
28867  enableval=$enable_zip_debug_info;
28868fi
28869
28870
28871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28872$as_echo_n "checking if we should zip debug-info files... " >&6; }
28873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28874$as_echo "${enable_zip_debug_info}" >&6; }
28875
28876if test "x${enable_zip_debug_info}" = "xno"; then
28877   ZIP_DEBUGINFO_FILES=false
28878else
28879   ZIP_DEBUGINFO_FILES=true
28880fi
28881
28882
28883
28884
28885
28886
28887
28888###############################################################################
28889#
28890# Check dependencies for external and internal libraries.
28891#
28892###############################################################################
28893
28894
28895
28896###############################################################################
28897#
28898# OS specific settings that we never will need to probe.
28899#
28900if test "x$OPENJDK_TARGET_OS" = xlinux; then
28901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28902$as_echo_n "checking what is not needed on Linux?... " >&6; }
28903    PULSE_NOT_NEEDED=yes
28904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28905$as_echo "pulse" >&6; }
28906fi
28907
28908if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28910$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28911    ALSA_NOT_NEEDED=yes
28912    PULSE_NOT_NEEDED=yes
28913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28914$as_echo "alsa pulse" >&6; }
28915fi
28916
28917if test "x$OPENJDK_TARGET_OS" = xwindows; then
28918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28919$as_echo_n "checking what is not needed on Windows?... " >&6; }
28920    CUPS_NOT_NEEDED=yes
28921    ALSA_NOT_NEEDED=yes
28922    PULSE_NOT_NEEDED=yes
28923    X11_NOT_NEEDED=yes
28924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28925$as_echo "alsa cups pulse x11" >&6; }
28926fi
28927
28928if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28930$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28931    ALSA_NOT_NEEDED=yes
28932    PULSE_NOT_NEEDED=yes
28933    X11_NOT_NEEDED=yes
28934    FREETYPE2_NOT_NEEDED=yes
28935    # If the java runtime framework is disabled, then we need X11.
28936    # This will be adjusted below.
28937    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28938$as_echo "alsa pulse x11" >&6; }
28939fi
28940
28941if test "x$OPENJDK_TARGET_OS" = xbsd; then
28942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28943$as_echo_n "checking what is not needed on bsd?... " >&6; }
28944    ALSA_NOT_NEEDED=yes
28945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28946$as_echo "alsa" >&6; }
28947fi
28948
28949if test "x$OPENJDK" = "xfalse"; then
28950    FREETYPE2_NOT_NEEDED=yes
28951fi
28952
28953if test "x$SUPPORT_HEADFUL" = xno; then
28954    X11_NOT_NEEDED=yes
28955fi
28956
28957###############################################################################
28958#
28959# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28960# that uses this API.
28961#
28962# Check whether --enable-macosx-runtime-support was given.
28963if test "${enable_macosx_runtime_support+set}" = set; then :
28964  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28965else
28966  MACOSX_RUNTIME_SUPPORT="no"
28967fi
28968
28969
28970USE_MACOSX_RUNTIME_SUPPORT=no
28971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28972$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28973if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28974    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28975        MACOSX_RUNTIME_SUPPORT=yes
28976        USE_MACOSX_RUNTIME_SUPPORT=yes
28977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28978$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28979    else
28980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28981$as_echo "yes, but explicitly disabled." >&6; }
28982    fi
28983else
28984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28985$as_echo "no" >&6; }
28986fi
28987
28988if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28990$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28991    X11_NOT_NEEDED=
28992    FREETYPE2_NOT_NEEDED=
28993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28994$as_echo "alsa pulse" >&6; }
28995fi
28996
28997
28998
28999
29000###############################################################################
29001#
29002# Check for X Windows
29003#
29004
29005# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29006# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29007# --x-libraries for the sysroot, if that seems to be correct.
29008if test "x$SYS_ROOT" != "x/"; then
29009  if test "x$x_includes" = xNONE; then
29010    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29011      x_includes="$SYS_ROOT/usr/X11R6/include"
29012    fi
29013  fi
29014  if test "x$x_libraries" = xNONE; then
29015    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29016      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29017    fi
29018  fi
29019fi
29020
29021# Now let autoconf do it's magic
29022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29023$as_echo_n "checking for X... " >&6; }
29024
29025
29026# Check whether --with-x was given.
29027if test "${with_x+set}" = set; then :
29028  withval=$with_x;
29029fi
29030
29031# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29032if test "x$with_x" = xno; then
29033  # The user explicitly disabled X.
29034  have_x=disabled
29035else
29036  case $x_includes,$x_libraries in #(
29037    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29038    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29039  $as_echo_n "(cached) " >&6
29040else
29041  # One or both of the vars are not set, and there is no cached value.
29042ac_x_includes=no ac_x_libraries=no
29043rm -f -r conftest.dir
29044if mkdir conftest.dir; then
29045  cd conftest.dir
29046  cat >Imakefile <<'_ACEOF'
29047incroot:
29048	@echo incroot='${INCROOT}'
29049usrlibdir:
29050	@echo usrlibdir='${USRLIBDIR}'
29051libdir:
29052	@echo libdir='${LIBDIR}'
29053_ACEOF
29054  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29055    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29056    for ac_var in incroot usrlibdir libdir; do
29057      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29058    done
29059    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29060    for ac_extension in a so sl dylib la dll; do
29061      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29062	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29063	ac_im_usrlibdir=$ac_im_libdir; break
29064      fi
29065    done
29066    # Screen out bogus values from the imake configuration.  They are
29067    # bogus both because they are the default anyway, and because
29068    # using them would break gcc on systems where it needs fixed includes.
29069    case $ac_im_incroot in
29070	/usr/include) ac_x_includes= ;;
29071	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29072    esac
29073    case $ac_im_usrlibdir in
29074	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29075	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29076    esac
29077  fi
29078  cd ..
29079  rm -f -r conftest.dir
29080fi
29081
29082# Standard set of common directories for X headers.
29083# Check X11 before X11Rn because it is often a symlink to the current release.
29084ac_x_header_dirs='
29085/usr/X11/include
29086/usr/X11R7/include
29087/usr/X11R6/include
29088/usr/X11R5/include
29089/usr/X11R4/include
29090
29091/usr/include/X11
29092/usr/include/X11R7
29093/usr/include/X11R6
29094/usr/include/X11R5
29095/usr/include/X11R4
29096
29097/usr/local/X11/include
29098/usr/local/X11R7/include
29099/usr/local/X11R6/include
29100/usr/local/X11R5/include
29101/usr/local/X11R4/include
29102
29103/usr/local/include/X11
29104/usr/local/include/X11R7
29105/usr/local/include/X11R6
29106/usr/local/include/X11R5
29107/usr/local/include/X11R4
29108
29109/usr/X386/include
29110/usr/x386/include
29111/usr/XFree86/include/X11
29112
29113/usr/include
29114/usr/local/include
29115/usr/unsupported/include
29116/usr/athena/include
29117/usr/local/x11r5/include
29118/usr/lpp/Xamples/include
29119
29120/usr/openwin/include
29121/usr/openwin/share/include'
29122
29123if test "$ac_x_includes" = no; then
29124  # Guess where to find include files, by looking for Xlib.h.
29125  # First, try using that file with no special directory specified.
29126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29127/* end confdefs.h.  */
29128#include <X11/Xlib.h>
29129_ACEOF
29130if ac_fn_cxx_try_cpp "$LINENO"; then :
29131  # We can compile using X headers with no special include directory.
29132ac_x_includes=
29133else
29134  for ac_dir in $ac_x_header_dirs; do
29135  if test -r "$ac_dir/X11/Xlib.h"; then
29136    ac_x_includes=$ac_dir
29137    break
29138  fi
29139done
29140fi
29141rm -f conftest.err conftest.i conftest.$ac_ext
29142fi # $ac_x_includes = no
29143
29144if test "$ac_x_libraries" = no; then
29145  # Check for the libraries.
29146  # See if we find them without any special options.
29147  # Don't add to $LIBS permanently.
29148  ac_save_LIBS=$LIBS
29149  LIBS="-lX11 $LIBS"
29150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29151/* end confdefs.h.  */
29152#include <X11/Xlib.h>
29153int
29154main ()
29155{
29156XrmInitialize ()
29157  ;
29158  return 0;
29159}
29160_ACEOF
29161if ac_fn_cxx_try_link "$LINENO"; then :
29162  LIBS=$ac_save_LIBS
29163# We can link X programs with no special library path.
29164ac_x_libraries=
29165else
29166  LIBS=$ac_save_LIBS
29167for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29168do
29169  # Don't even attempt the hair of trying to link an X program!
29170  for ac_extension in a so sl dylib la dll; do
29171    if test -r "$ac_dir/libX11.$ac_extension"; then
29172      ac_x_libraries=$ac_dir
29173      break 2
29174    fi
29175  done
29176done
29177fi
29178rm -f core conftest.err conftest.$ac_objext \
29179    conftest$ac_exeext conftest.$ac_ext
29180fi # $ac_x_libraries = no
29181
29182case $ac_x_includes,$ac_x_libraries in #(
29183  no,* | *,no | *\'*)
29184    # Didn't find X, or a directory has "'" in its name.
29185    ac_cv_have_x="have_x=no";; #(
29186  *)
29187    # Record where we found X for the cache.
29188    ac_cv_have_x="have_x=yes\
29189	ac_x_includes='$ac_x_includes'\
29190	ac_x_libraries='$ac_x_libraries'"
29191esac
29192fi
29193;; #(
29194    *) have_x=yes;;
29195  esac
29196  eval "$ac_cv_have_x"
29197fi # $with_x != no
29198
29199if test "$have_x" != yes; then
29200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29201$as_echo "$have_x" >&6; }
29202  no_x=yes
29203else
29204  # If each of the values was on the command line, it overrides each guess.
29205  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29206  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29207  # Update the cache value to reflect the command line values.
29208  ac_cv_have_x="have_x=yes\
29209	ac_x_includes='$x_includes'\
29210	ac_x_libraries='$x_libraries'"
29211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29212$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29213fi
29214
29215if test "$no_x" = yes; then
29216  # Not all programs may use this symbol, but it does not hurt to define it.
29217
29218$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29219
29220  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29221else
29222  if test -n "$x_includes"; then
29223    X_CFLAGS="$X_CFLAGS -I$x_includes"
29224  fi
29225
29226  # It would also be nice to do this for all -L options, not just this one.
29227  if test -n "$x_libraries"; then
29228    X_LIBS="$X_LIBS -L$x_libraries"
29229    # For Solaris; some versions of Sun CC require a space after -R and
29230    # others require no space.  Words are not sufficient . . . .
29231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29232$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29233    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29234    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29235    ac_cxx_werror_flag=yes
29236    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29237/* end confdefs.h.  */
29238
29239int
29240main ()
29241{
29242
29243  ;
29244  return 0;
29245}
29246_ACEOF
29247if ac_fn_cxx_try_link "$LINENO"; then :
29248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29249$as_echo "no" >&6; }
29250       X_LIBS="$X_LIBS -R$x_libraries"
29251else
29252  LIBS="$ac_xsave_LIBS -R $x_libraries"
29253       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29254/* end confdefs.h.  */
29255
29256int
29257main ()
29258{
29259
29260  ;
29261  return 0;
29262}
29263_ACEOF
29264if ac_fn_cxx_try_link "$LINENO"; then :
29265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29266$as_echo "yes" >&6; }
29267	  X_LIBS="$X_LIBS -R $x_libraries"
29268else
29269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29270$as_echo "neither works" >&6; }
29271fi
29272rm -f core conftest.err conftest.$ac_objext \
29273    conftest$ac_exeext conftest.$ac_ext
29274fi
29275rm -f core conftest.err conftest.$ac_objext \
29276    conftest$ac_exeext conftest.$ac_ext
29277    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29278    LIBS=$ac_xsave_LIBS
29279  fi
29280
29281  # Check for system-dependent libraries X programs must link with.
29282  # Do this before checking for the system-independent R6 libraries
29283  # (-lICE), since we may need -lsocket or whatever for X linking.
29284
29285  if test "$ISC" = yes; then
29286    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29287  else
29288    # Martyn Johnson says this is needed for Ultrix, if the X
29289    # libraries were built with DECnet support.  And Karl Berry says
29290    # the Alpha needs dnet_stub (dnet does not exist).
29291    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29292    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29293/* end confdefs.h.  */
29294
29295/* Override any GCC internal prototype to avoid an error.
29296   Use char because int might match the return type of a GCC
29297   builtin and then its argument prototype would still apply.  */
29298#ifdef __cplusplus
29299extern "C"
29300#endif
29301char XOpenDisplay ();
29302int
29303main ()
29304{
29305return XOpenDisplay ();
29306  ;
29307  return 0;
29308}
29309_ACEOF
29310if ac_fn_cxx_try_link "$LINENO"; then :
29311
29312else
29313  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29314$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29315if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
29316  $as_echo_n "(cached) " >&6
29317else
29318  ac_check_lib_save_LIBS=$LIBS
29319LIBS="-ldnet  $LIBS"
29320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29321/* end confdefs.h.  */
29322
29323/* Override any GCC internal prototype to avoid an error.
29324   Use char because int might match the return type of a GCC
29325   builtin and then its argument prototype would still apply.  */
29326#ifdef __cplusplus
29327extern "C"
29328#endif
29329char dnet_ntoa ();
29330int
29331main ()
29332{
29333return dnet_ntoa ();
29334  ;
29335  return 0;
29336}
29337_ACEOF
29338if ac_fn_cxx_try_link "$LINENO"; then :
29339  ac_cv_lib_dnet_dnet_ntoa=yes
29340else
29341  ac_cv_lib_dnet_dnet_ntoa=no
29342fi
29343rm -f core conftest.err conftest.$ac_objext \
29344    conftest$ac_exeext conftest.$ac_ext
29345LIBS=$ac_check_lib_save_LIBS
29346fi
29347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29348$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29349if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
29350  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29351fi
29352
29353    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29354      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29355$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29356if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
29357  $as_echo_n "(cached) " >&6
29358else
29359  ac_check_lib_save_LIBS=$LIBS
29360LIBS="-ldnet_stub  $LIBS"
29361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29362/* end confdefs.h.  */
29363
29364/* Override any GCC internal prototype to avoid an error.
29365   Use char because int might match the return type of a GCC
29366   builtin and then its argument prototype would still apply.  */
29367#ifdef __cplusplus
29368extern "C"
29369#endif
29370char dnet_ntoa ();
29371int
29372main ()
29373{
29374return dnet_ntoa ();
29375  ;
29376  return 0;
29377}
29378_ACEOF
29379if ac_fn_cxx_try_link "$LINENO"; then :
29380  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29381else
29382  ac_cv_lib_dnet_stub_dnet_ntoa=no
29383fi
29384rm -f core conftest.err conftest.$ac_objext \
29385    conftest$ac_exeext conftest.$ac_ext
29386LIBS=$ac_check_lib_save_LIBS
29387fi
29388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29389$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29390if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
29391  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29392fi
29393
29394    fi
29395fi
29396rm -f core conftest.err conftest.$ac_objext \
29397    conftest$ac_exeext conftest.$ac_ext
29398    LIBS="$ac_xsave_LIBS"
29399
29400    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29401    # to get the SysV transport functions.
29402    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29403    # needs -lnsl.
29404    # The nsl library prevents programs from opening the X display
29405    # on Irix 5.2, according to T.E. Dickey.
29406    # The functions gethostbyname, getservbyname, and inet_addr are
29407    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29408    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
29409if test "x$ac_cv_func_gethostbyname" = x""yes; then :
29410
29411fi
29412
29413    if test $ac_cv_func_gethostbyname = no; then
29414      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
29415$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29416if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
29417  $as_echo_n "(cached) " >&6
29418else
29419  ac_check_lib_save_LIBS=$LIBS
29420LIBS="-lnsl  $LIBS"
29421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29422/* end confdefs.h.  */
29423
29424/* Override any GCC internal prototype to avoid an error.
29425   Use char because int might match the return type of a GCC
29426   builtin and then its argument prototype would still apply.  */
29427#ifdef __cplusplus
29428extern "C"
29429#endif
29430char gethostbyname ();
29431int
29432main ()
29433{
29434return gethostbyname ();
29435  ;
29436  return 0;
29437}
29438_ACEOF
29439if ac_fn_cxx_try_link "$LINENO"; then :
29440  ac_cv_lib_nsl_gethostbyname=yes
29441else
29442  ac_cv_lib_nsl_gethostbyname=no
29443fi
29444rm -f core conftest.err conftest.$ac_objext \
29445    conftest$ac_exeext conftest.$ac_ext
29446LIBS=$ac_check_lib_save_LIBS
29447fi
29448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29449$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29450if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
29451  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29452fi
29453
29454      if test $ac_cv_lib_nsl_gethostbyname = no; then
29455	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29456$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29457if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29458  $as_echo_n "(cached) " >&6
29459else
29460  ac_check_lib_save_LIBS=$LIBS
29461LIBS="-lbsd  $LIBS"
29462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29463/* end confdefs.h.  */
29464
29465/* Override any GCC internal prototype to avoid an error.
29466   Use char because int might match the return type of a GCC
29467   builtin and then its argument prototype would still apply.  */
29468#ifdef __cplusplus
29469extern "C"
29470#endif
29471char gethostbyname ();
29472int
29473main ()
29474{
29475return gethostbyname ();
29476  ;
29477  return 0;
29478}
29479_ACEOF
29480if ac_fn_cxx_try_link "$LINENO"; then :
29481  ac_cv_lib_bsd_gethostbyname=yes
29482else
29483  ac_cv_lib_bsd_gethostbyname=no
29484fi
29485rm -f core conftest.err conftest.$ac_objext \
29486    conftest$ac_exeext conftest.$ac_ext
29487LIBS=$ac_check_lib_save_LIBS
29488fi
29489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29490$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29491if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29492  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29493fi
29494
29495      fi
29496    fi
29497
29498    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29499    # socket/setsockopt and other routines are undefined under SCO ODT
29500    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29501    # on later versions), says Simon Leinen: it contains gethostby*
29502    # variants that don't use the name server (or something).  -lsocket
29503    # must be given before -lnsl if both are needed.  We assume that
29504    # if connect needs -lnsl, so does gethostbyname.
29505    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29506if test "x$ac_cv_func_connect" = x""yes; then :
29507
29508fi
29509
29510    if test $ac_cv_func_connect = no; then
29511      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29512$as_echo_n "checking for connect in -lsocket... " >&6; }
29513if test "${ac_cv_lib_socket_connect+set}" = set; then :
29514  $as_echo_n "(cached) " >&6
29515else
29516  ac_check_lib_save_LIBS=$LIBS
29517LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29519/* end confdefs.h.  */
29520
29521/* Override any GCC internal prototype to avoid an error.
29522   Use char because int might match the return type of a GCC
29523   builtin and then its argument prototype would still apply.  */
29524#ifdef __cplusplus
29525extern "C"
29526#endif
29527char connect ();
29528int
29529main ()
29530{
29531return connect ();
29532  ;
29533  return 0;
29534}
29535_ACEOF
29536if ac_fn_cxx_try_link "$LINENO"; then :
29537  ac_cv_lib_socket_connect=yes
29538else
29539  ac_cv_lib_socket_connect=no
29540fi
29541rm -f core conftest.err conftest.$ac_objext \
29542    conftest$ac_exeext conftest.$ac_ext
29543LIBS=$ac_check_lib_save_LIBS
29544fi
29545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29546$as_echo "$ac_cv_lib_socket_connect" >&6; }
29547if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29548  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29549fi
29550
29551    fi
29552
29553    # Guillermo Gomez says -lposix is necessary on A/UX.
29554    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29555if test "x$ac_cv_func_remove" = x""yes; then :
29556
29557fi
29558
29559    if test $ac_cv_func_remove = no; then
29560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29561$as_echo_n "checking for remove in -lposix... " >&6; }
29562if test "${ac_cv_lib_posix_remove+set}" = set; then :
29563  $as_echo_n "(cached) " >&6
29564else
29565  ac_check_lib_save_LIBS=$LIBS
29566LIBS="-lposix  $LIBS"
29567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29568/* end confdefs.h.  */
29569
29570/* Override any GCC internal prototype to avoid an error.
29571   Use char because int might match the return type of a GCC
29572   builtin and then its argument prototype would still apply.  */
29573#ifdef __cplusplus
29574extern "C"
29575#endif
29576char remove ();
29577int
29578main ()
29579{
29580return remove ();
29581  ;
29582  return 0;
29583}
29584_ACEOF
29585if ac_fn_cxx_try_link "$LINENO"; then :
29586  ac_cv_lib_posix_remove=yes
29587else
29588  ac_cv_lib_posix_remove=no
29589fi
29590rm -f core conftest.err conftest.$ac_objext \
29591    conftest$ac_exeext conftest.$ac_ext
29592LIBS=$ac_check_lib_save_LIBS
29593fi
29594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29595$as_echo "$ac_cv_lib_posix_remove" >&6; }
29596if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29597  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29598fi
29599
29600    fi
29601
29602    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29603    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29604if test "x$ac_cv_func_shmat" = x""yes; then :
29605
29606fi
29607
29608    if test $ac_cv_func_shmat = no; then
29609      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29610$as_echo_n "checking for shmat in -lipc... " >&6; }
29611if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29612  $as_echo_n "(cached) " >&6
29613else
29614  ac_check_lib_save_LIBS=$LIBS
29615LIBS="-lipc  $LIBS"
29616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29617/* end confdefs.h.  */
29618
29619/* Override any GCC internal prototype to avoid an error.
29620   Use char because int might match the return type of a GCC
29621   builtin and then its argument prototype would still apply.  */
29622#ifdef __cplusplus
29623extern "C"
29624#endif
29625char shmat ();
29626int
29627main ()
29628{
29629return shmat ();
29630  ;
29631  return 0;
29632}
29633_ACEOF
29634if ac_fn_cxx_try_link "$LINENO"; then :
29635  ac_cv_lib_ipc_shmat=yes
29636else
29637  ac_cv_lib_ipc_shmat=no
29638fi
29639rm -f core conftest.err conftest.$ac_objext \
29640    conftest$ac_exeext conftest.$ac_ext
29641LIBS=$ac_check_lib_save_LIBS
29642fi
29643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29644$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29645if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29646  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29647fi
29648
29649    fi
29650  fi
29651
29652  # Check for libraries that X11R6 Xt/Xaw programs need.
29653  ac_save_LDFLAGS=$LDFLAGS
29654  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29655  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29656  # check for ICE first), but we must link in the order -lSM -lICE or
29657  # we get undefined symbols.  So assume we have SM if we have ICE.
29658  # These have to be linked with before -lX11, unlike the other
29659  # libraries we check for below, so use a different variable.
29660  # John Interrante, Karl Berry
29661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29662$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29663if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29664  $as_echo_n "(cached) " >&6
29665else
29666  ac_check_lib_save_LIBS=$LIBS
29667LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29669/* end confdefs.h.  */
29670
29671/* Override any GCC internal prototype to avoid an error.
29672   Use char because int might match the return type of a GCC
29673   builtin and then its argument prototype would still apply.  */
29674#ifdef __cplusplus
29675extern "C"
29676#endif
29677char IceConnectionNumber ();
29678int
29679main ()
29680{
29681return IceConnectionNumber ();
29682  ;
29683  return 0;
29684}
29685_ACEOF
29686if ac_fn_cxx_try_link "$LINENO"; then :
29687  ac_cv_lib_ICE_IceConnectionNumber=yes
29688else
29689  ac_cv_lib_ICE_IceConnectionNumber=no
29690fi
29691rm -f core conftest.err conftest.$ac_objext \
29692    conftest$ac_exeext conftest.$ac_ext
29693LIBS=$ac_check_lib_save_LIBS
29694fi
29695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29696$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29697if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29698  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29699fi
29700
29701  LDFLAGS=$ac_save_LDFLAGS
29702
29703fi
29704
29705
29706# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29707# this doesn't make sense so we remove it.
29708if test "x$COMPILE_TYPE" = xcross; then
29709  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29710fi
29711
29712if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29713
29714    # Print a helpful message on how to acquire the necessary build dependency.
29715    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29716    MISSING_DEPENDENCY=x11
29717    PKGHANDLER_COMMAND=
29718
29719    case $PKGHANDLER in
29720	apt-get)
29721                apt_help     $MISSING_DEPENDENCY ;;
29722    yum)
29723                yum_help     $MISSING_DEPENDENCY ;;
29724	port)
29725                port_help    $MISSING_DEPENDENCY ;;
29726	pkgutil)
29727                pkgutil_help $MISSING_DEPENDENCY ;;
29728	pkgadd)
29729                pkgadd_help  $MISSING_DEPENDENCY ;;
29730    * )
29731      break ;;
29732    esac
29733
29734    if test "x$PKGHANDLER_COMMAND" != x; then
29735        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29736    fi
29737
29738    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29739fi
29740
29741# Some of the old makefiles require a setting of OPENWIN_HOME
29742# Since the X11R6 directory has disappeared on later Linuxes,
29743# we need to probe for it.
29744if test "x$OPENJDK_TARGET_OS" = xlinux; then
29745    if test -d "$SYS_ROOT/usr/X11R6"; then
29746        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29747    fi
29748    if test -d "$SYS_ROOT/usr/include/X11"; then
29749        OPENWIN_HOME="$SYS_ROOT/usr"
29750    fi
29751fi
29752if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29753    OPENWIN_HOME="/usr/openwin"
29754fi
29755
29756
29757
29758#
29759# Weird Sol10 something check...TODO change to try compile
29760#
29761if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29762  if test "`uname -r`" = "5.10"; then
29763     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29764     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29765     fi
29766  fi
29767fi
29768
29769ac_ext=c
29770ac_cpp='$CPP $CPPFLAGS'
29771ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29772ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29773ac_compiler_gnu=$ac_cv_c_compiler_gnu
29774
29775OLD_CFLAGS="$CFLAGS"
29776CFLAGS="$CFLAGS $X_CFLAGS"
29777
29778# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29779for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29780do :
29781  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29782ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29783                   # include <X11/Xutil.h>
29784
29785"
29786if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29787  cat >>confdefs.h <<_ACEOF
29788#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29789_ACEOF
29790 X11_A_OK=yes
29791else
29792  X11_A_OK=no
29793fi
29794
29795done
29796
29797
29798CFLAGS="$OLD_CFLAGS"
29799ac_ext=cpp
29800ac_cpp='$CXXCPP $CPPFLAGS'
29801ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29802ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29803ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29804
29805
29806if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29807
29808    # Print a helpful message on how to acquire the necessary build dependency.
29809    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29810    MISSING_DEPENDENCY=x11
29811    PKGHANDLER_COMMAND=
29812
29813    case $PKGHANDLER in
29814	apt-get)
29815                apt_help     $MISSING_DEPENDENCY ;;
29816    yum)
29817                yum_help     $MISSING_DEPENDENCY ;;
29818	port)
29819                port_help    $MISSING_DEPENDENCY ;;
29820	pkgutil)
29821                pkgutil_help $MISSING_DEPENDENCY ;;
29822	pkgadd)
29823                pkgadd_help  $MISSING_DEPENDENCY ;;
29824    * )
29825      break ;;
29826    esac
29827
29828    if test "x$PKGHANDLER_COMMAND" != x; then
29829        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29830    fi
29831
29832    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29833fi
29834
29835
29836
29837
29838
29839
29840###############################################################################
29841#
29842# The common unix printing system cups is used to print from java.
29843#
29844
29845# Check whether --with-cups was given.
29846if test "${with_cups+set}" = set; then :
29847  withval=$with_cups;
29848fi
29849
29850
29851# Check whether --with-cups-include was given.
29852if test "${with_cups_include+set}" = set; then :
29853  withval=$with_cups_include;
29854fi
29855
29856
29857if test "x$CUPS_NOT_NEEDED" = xyes; then
29858	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29859		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29860$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29861	fi
29862	CUPS_CFLAGS=
29863else
29864	CUPS_FOUND=no
29865
29866	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29867	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29868	fi
29869
29870	if test "x${with_cups}" != x; then
29871	    CUPS_CFLAGS="-I${with_cups}/include"
29872	    CUPS_FOUND=yes
29873	fi
29874	if test "x${with_cups_include}" != x; then
29875	    CUPS_CFLAGS="-I${with_cups_include}"
29876	    CUPS_FOUND=yes
29877	fi
29878	if test "x$CUPS_FOUND" = xno; then
29879
29880
29881    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29882        # Source the builddeps file again, to make sure it uses the latest variables!
29883        . $builddepsfile
29884        # Look for a target and build machine specific resource!
29885        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29886        if test "x$resource" = x; then
29887            # Ok, lets instead look for a target specific resource
29888            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29889        fi
29890        if test "x$resource" = x; then
29891            # Ok, lets instead look for a build specific resource
29892            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29893        fi
29894        if test "x$resource" = x; then
29895            # Ok, lets instead look for a generic resource
29896            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29897            resource=${builddep_cups}
29898        fi
29899        if test "x$resource" != x; then
29900            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29901$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29902	    # If the resource in the builddeps.conf file is an existing directory,
29903	    # for example /java/linux/cups
29904	    if test -d ${resource}; then
29905	       depdir=${resource}
29906	    else
29907
29908# cups is for example mymodule
29909# $resource is for example libs/general/libmymod_1_2_3.zip
29910# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29911# $with_builddeps_dir is for example /localhome/builddeps
29912# depdir is the name of the variable into which we store the depdir, eg MYMOD
29913# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29914# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29915    filename=`basename $resource`
29916    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29917    filebase=${filename%%.*}
29918    extension=${filename#*.}
29919    installdir=$with_builddeps_dir/$filebase
29920    if test ! -f $installdir/$filename.unpacked; then
29921        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29922$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29923        if test ! -d $installdir; then
29924            mkdir -p $installdir
29925        fi
29926        if test ! -d $installdir; then
29927            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29928        fi
29929        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29930        touch $tmpfile
29931        if test ! -f $tmpfile; then
29932            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29933        fi
29934
29935    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29936    # $tmpfile is the local file name for the downloaded file.
29937    VALID_TOOL=no
29938    if test "x$BDEPS_FTP" = xwget; then
29939       VALID_TOOL=yes
29940       wget -O $tmpfile $with_builddeps_server/$resource
29941    fi
29942    if test "x$BDEPS_FTP" = xlftp; then
29943       VALID_TOOL=yes
29944       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29945    fi
29946    if test "x$BDEPS_FTP" = xftp; then
29947        VALID_TOOL=yes
29948        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29949        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29950        FTPUSERPWD=${FTPSERVER%%@*}
29951        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29952            FTPUSER=${userpwd%%:*}
29953            FTPPWD=${userpwd#*@}
29954            FTPSERVER=${FTPSERVER#*@}
29955        else
29956            FTPUSER=ftp
29957            FTPPWD=ftp
29958        fi
29959        # the "pass" command does not work on some
29960        # ftp clients (read ftp.exe) but if it works,
29961        # passive mode is better!
29962        (\
29963            echo "user $FTPUSER $FTPPWD"        ;\
29964            echo "pass"                         ;\
29965            echo "bin"                          ;\
29966            echo "get $FTPPATH $tmpfile"              ;\
29967        ) | ftp -in $FTPSERVER
29968    fi
29969    if test "x$VALID_TOOL" != xyes; then
29970       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29971    fi
29972
29973        mv $tmpfile $installdir/$filename
29974        if test ! -s $installdir/$filename; then
29975            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29976        fi
29977        case "$extension" in
29978            zip)  echo "Unzipping $installdir/$filename..."
29979               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29980            ;;
29981            tar.gz) echo "Untaring $installdir/$filename..."
29982               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29983            ;;
29984            tgz) echo "Untaring $installdir/$filename..."
29985               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29986            ;;
29987            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29988            ;;
29989        esac
29990    fi
29991    if test -f $installdir/$filename.unpacked; then
29992        depdir=$installdir
29993    fi
29994
29995	    fi
29996            # Source the builddeps file again, because in the previous command, the depdir
29997            # was updated to point at the current build dependency install directory.
29998            . $builddepsfile
29999            # Now extract variables from the builddeps.conf files.
30000            theroot=${builddep_cups_ROOT}
30001            thecflags=${builddep_cups_CFLAGS}
30002            thelibs=${builddep_cups_LIBS}
30003            if test "x$depdir" = x; then
30004                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30005            fi
30006            CUPS=$depdir
30007            if test "x$theroot" != x; then
30008               CUPS="$theroot"
30009            fi
30010            if test "x$thecflags" != x; then
30011               CUPS_CFLAGS="$thecflags"
30012            fi
30013            if test "x$thelibs" != x; then
30014               CUPS_LIBS="$thelibs"
30015            fi
30016            CUPS_FOUND=yes
30017
30018        fi
30019
30020    fi
30021
30022	fi
30023	if test "x$CUPS_FOUND" = xno; then
30024	    # Are the cups headers installed in the default /usr/include location?
30025	    for ac_header in cups/cups.h cups/ppd.h
30026do :
30027  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30028ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30029if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30030  cat >>confdefs.h <<_ACEOF
30031#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30032_ACEOF
30033 CUPS_FOUND=yes
30034	                      CUPS_CFLAGS=
30035	                      DEFAULT_CUPS=yes
30036fi
30037
30038done
30039
30040	fi
30041	if test "x$CUPS_FOUND" = xno; then
30042	    # Getting nervous now? Lets poke around for standard Solaris third-party
30043	    # package installation locations.
30044	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30045$as_echo_n "checking for cups headers... " >&6; }
30046	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30047	       # An SFW package seems to be installed!
30048	       CUPS_FOUND=yes
30049	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30050	    elif test -s /opt/csw/include/cups/cups.h; then
30051	       # A CSW package seems to be installed!
30052	       CUPS_FOUND=yes
30053	       CUPS_CFLAGS="-I/opt/csw/include"
30054	    fi
30055	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30056$as_echo "$CUPS_FOUND" >&6; }
30057	fi
30058	if test "x$CUPS_FOUND" = xno; then
30059
30060    # Print a helpful message on how to acquire the necessary build dependency.
30061    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30062    MISSING_DEPENDENCY=cups
30063    PKGHANDLER_COMMAND=
30064
30065    case $PKGHANDLER in
30066	apt-get)
30067                apt_help     $MISSING_DEPENDENCY ;;
30068    yum)
30069                yum_help     $MISSING_DEPENDENCY ;;
30070	port)
30071                port_help    $MISSING_DEPENDENCY ;;
30072	pkgutil)
30073                pkgutil_help $MISSING_DEPENDENCY ;;
30074	pkgadd)
30075                pkgadd_help  $MISSING_DEPENDENCY ;;
30076    * )
30077      break ;;
30078    esac
30079
30080    if test "x$PKGHANDLER_COMMAND" != x; then
30081        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30082    fi
30083
30084	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30085	fi
30086fi
30087
30088
30089
30090
30091
30092
30093###############################################################################
30094#
30095# The ubiquitous freetype2 library is used to render fonts.
30096#
30097
30098# Check whether --with-freetype was given.
30099if test "${with_freetype+set}" = set; then :
30100  withval=$with_freetype;
30101fi
30102
30103
30104# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30105USING_SYSTEM_FT_LIB=false
30106
30107if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30108	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30109		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30110$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30111	fi
30112	FREETYPE2_CFLAGS=
30113	FREETYPE2_LIBS=
30114        FREETYPE2_LIB_PATH=
30115else
30116	FREETYPE2_FOUND=no
30117
30118	if test "x$with_freetype" != x; then
30119
30120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30121
30122  # Input might be given as Windows format, start by converting to
30123  # unix format.
30124  path="$with_freetype"
30125  new_path=`$CYGPATH -u "$path"`
30126
30127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30130  # "foo.exe" is OK but "foo" is an error.
30131  #
30132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30133  # It is also a way to make sure we got the proper file name for the real test later on.
30134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30135  if test "x$test_shortpath" = x; then
30136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30137$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30138    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30139  fi
30140
30141  # Call helper function which possibly converts this using DOS-style short mode.
30142  # If so, the updated path is stored in $new_path.
30143
30144  input_path="$new_path"
30145  # Check if we need to convert this using DOS-style short mode. If the path
30146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30147  # take no chances and rewrite it.
30148  # Note: m4 eats our [], so we need to use [ and ] instead.
30149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30150  if test "x$has_forbidden_chars" != x; then
30151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30155      # Going to short mode and back again did indeed matter. Since short mode is
30156      # case insensitive, let's make it lowercase to improve readability.
30157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30158      # Now convert it back to Unix-stile (cygpath)
30159      input_path=`$CYGPATH -u "$shortmode_path"`
30160      new_path="$input_path"
30161    fi
30162  fi
30163
30164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30165  if test "x$test_cygdrive_prefix" = x; then
30166    # As a simple fix, exclude /usr/bin since it's not a real path.
30167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30169      # a path prefixed by /cygdrive for fixpath to work.
30170      new_path="$CYGWIN_ROOT_PATH$input_path"
30171    fi
30172  fi
30173
30174
30175  if test "x$path" != "x$new_path"; then
30176    with_freetype="$new_path"
30177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30178$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30179  fi
30180
30181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30182
30183  path="$with_freetype"
30184  has_colon=`$ECHO $path | $GREP ^.:`
30185  new_path="$path"
30186  if test "x$has_colon" = x; then
30187    # Not in mixed or Windows style, start by that.
30188    new_path=`cmd //c echo $path`
30189  fi
30190
30191
30192  input_path="$new_path"
30193  # Check if we need to convert this using DOS-style short mode. If the path
30194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30195  # take no chances and rewrite it.
30196  # Note: m4 eats our [], so we need to use [ and ] instead.
30197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30198  if test "x$has_forbidden_chars" != x; then
30199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30201  fi
30202
30203
30204  windows_path="$new_path"
30205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30206    unix_path=`$CYGPATH -u "$windows_path"`
30207    new_path="$unix_path"
30208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30210    new_path="$unix_path"
30211  fi
30212
30213  if test "x$path" != "x$new_path"; then
30214    with_freetype="$new_path"
30215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30216$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30217  fi
30218
30219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30221
30222  else
30223    # We're on a posix platform. Hooray! :)
30224    path="$with_freetype"
30225
30226    if test ! -f "$path" && test ! -d "$path"; then
30227      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30228    fi
30229
30230    has_space=`$ECHO "$path" | $GREP " "`
30231    if test "x$has_space" != x; then
30232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30233$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30234      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30235    fi
30236  fi
30237
30238	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30239            FREETYPE2_LIB_PATH="$with_freetype/lib"
30240            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30241                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30242                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30243            fi
30244            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30245                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30246            fi
30247	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30248            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30249                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30250            fi
30251 	    FREETYPE2_FOUND=yes
30252   	    if test "x$FREETYPE2_FOUND" = xyes; then
30253	        # Verify that the directories exist
30254                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30255		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30256		fi
30257	        # List the contents of the lib.
30258		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30259                if test "x$FREETYPELIB" = x; then
30260		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30261		fi
30262	        # Check one h-file
30263                if ! test -s "$with_freetype/include/ft2build.h"; then
30264		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30265		fi
30266            fi
30267        fi
30268	if test "x$FREETYPE2_FOUND" = xno; then
30269
30270
30271    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30272        # Source the builddeps file again, to make sure it uses the latest variables!
30273        . $builddepsfile
30274        # Look for a target and build machine specific resource!
30275        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30276        if test "x$resource" = x; then
30277            # Ok, lets instead look for a target specific resource
30278            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30279        fi
30280        if test "x$resource" = x; then
30281            # Ok, lets instead look for a build specific resource
30282            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30283        fi
30284        if test "x$resource" = x; then
30285            # Ok, lets instead look for a generic resource
30286            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30287            resource=${builddep_freetype2}
30288        fi
30289        if test "x$resource" != x; then
30290            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30291$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30292	    # If the resource in the builddeps.conf file is an existing directory,
30293	    # for example /java/linux/cups
30294	    if test -d ${resource}; then
30295	       depdir=${resource}
30296	    else
30297
30298# freetype2 is for example mymodule
30299# $resource is for example libs/general/libmymod_1_2_3.zip
30300# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30301# $with_builddeps_dir is for example /localhome/builddeps
30302# depdir is the name of the variable into which we store the depdir, eg MYMOD
30303# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30304# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30305    filename=`basename $resource`
30306    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30307    filebase=${filename%%.*}
30308    extension=${filename#*.}
30309    installdir=$with_builddeps_dir/$filebase
30310    if test ! -f $installdir/$filename.unpacked; then
30311        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30312$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30313        if test ! -d $installdir; then
30314            mkdir -p $installdir
30315        fi
30316        if test ! -d $installdir; then
30317            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30318        fi
30319        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30320        touch $tmpfile
30321        if test ! -f $tmpfile; then
30322            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30323        fi
30324
30325    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30326    # $tmpfile is the local file name for the downloaded file.
30327    VALID_TOOL=no
30328    if test "x$BDEPS_FTP" = xwget; then
30329       VALID_TOOL=yes
30330       wget -O $tmpfile $with_builddeps_server/$resource
30331    fi
30332    if test "x$BDEPS_FTP" = xlftp; then
30333       VALID_TOOL=yes
30334       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30335    fi
30336    if test "x$BDEPS_FTP" = xftp; then
30337        VALID_TOOL=yes
30338        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30339        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30340        FTPUSERPWD=${FTPSERVER%%@*}
30341        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30342            FTPUSER=${userpwd%%:*}
30343            FTPPWD=${userpwd#*@}
30344            FTPSERVER=${FTPSERVER#*@}
30345        else
30346            FTPUSER=ftp
30347            FTPPWD=ftp
30348        fi
30349        # the "pass" command does not work on some
30350        # ftp clients (read ftp.exe) but if it works,
30351        # passive mode is better!
30352        (\
30353            echo "user $FTPUSER $FTPPWD"        ;\
30354            echo "pass"                         ;\
30355            echo "bin"                          ;\
30356            echo "get $FTPPATH $tmpfile"              ;\
30357        ) | ftp -in $FTPSERVER
30358    fi
30359    if test "x$VALID_TOOL" != xyes; then
30360       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30361    fi
30362
30363        mv $tmpfile $installdir/$filename
30364        if test ! -s $installdir/$filename; then
30365            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30366        fi
30367        case "$extension" in
30368            zip)  echo "Unzipping $installdir/$filename..."
30369               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30370            ;;
30371            tar.gz) echo "Untaring $installdir/$filename..."
30372               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30373            ;;
30374            tgz) echo "Untaring $installdir/$filename..."
30375               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30376            ;;
30377            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30378            ;;
30379        esac
30380    fi
30381    if test -f $installdir/$filename.unpacked; then
30382        depdir=$installdir
30383    fi
30384
30385	    fi
30386            # Source the builddeps file again, because in the previous command, the depdir
30387            # was updated to point at the current build dependency install directory.
30388            . $builddepsfile
30389            # Now extract variables from the builddeps.conf files.
30390            theroot=${builddep_freetype2_ROOT}
30391            thecflags=${builddep_freetype2_CFLAGS}
30392            thelibs=${builddep_freetype2_LIBS}
30393            if test "x$depdir" = x; then
30394                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30395            fi
30396            FREETYPE2=$depdir
30397            if test "x$theroot" != x; then
30398               FREETYPE2="$theroot"
30399            fi
30400            if test "x$thecflags" != x; then
30401               FREETYPE2_CFLAGS="$thecflags"
30402            fi
30403            if test "x$thelibs" != x; then
30404               FREETYPE2_LIBS="$thelibs"
30405            fi
30406            FREETYPE2_FOUND=yes
30407            else FREETYPE2_FOUND=no
30408
30409        fi
30410        else FREETYPE2_FOUND=no
30411
30412    fi
30413
30414            USING_SYSTEM_FT_LIB=true
30415	fi
30416	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
30417            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30418
30419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30420
30421  # Input might be given as Windows format, start by converting to
30422  # unix format.
30423  path="$FREETYPELOCATION"
30424  new_path=`$CYGPATH -u "$path"`
30425
30426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30429  # "foo.exe" is OK but "foo" is an error.
30430  #
30431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30432  # It is also a way to make sure we got the proper file name for the real test later on.
30433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30434  if test "x$test_shortpath" = x; then
30435    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30436$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30437    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30438  fi
30439
30440  # Call helper function which possibly converts this using DOS-style short mode.
30441  # If so, the updated path is stored in $new_path.
30442
30443  input_path="$new_path"
30444  # Check if we need to convert this using DOS-style short mode. If the path
30445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30446  # take no chances and rewrite it.
30447  # Note: m4 eats our [], so we need to use [ and ] instead.
30448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30449  if test "x$has_forbidden_chars" != x; then
30450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30454      # Going to short mode and back again did indeed matter. Since short mode is
30455      # case insensitive, let's make it lowercase to improve readability.
30456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30457      # Now convert it back to Unix-stile (cygpath)
30458      input_path=`$CYGPATH -u "$shortmode_path"`
30459      new_path="$input_path"
30460    fi
30461  fi
30462
30463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30464  if test "x$test_cygdrive_prefix" = x; then
30465    # As a simple fix, exclude /usr/bin since it's not a real path.
30466    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30468      # a path prefixed by /cygdrive for fixpath to work.
30469      new_path="$CYGWIN_ROOT_PATH$input_path"
30470    fi
30471  fi
30472
30473
30474  if test "x$path" != "x$new_path"; then
30475    FREETYPELOCATION="$new_path"
30476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30477$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30478  fi
30479
30480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30481
30482  path="$FREETYPELOCATION"
30483  has_colon=`$ECHO $path | $GREP ^.:`
30484  new_path="$path"
30485  if test "x$has_colon" = x; then
30486    # Not in mixed or Windows style, start by that.
30487    new_path=`cmd //c echo $path`
30488  fi
30489
30490
30491  input_path="$new_path"
30492  # Check if we need to convert this using DOS-style short mode. If the path
30493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30494  # take no chances and rewrite it.
30495  # Note: m4 eats our [], so we need to use [ and ] instead.
30496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30497  if test "x$has_forbidden_chars" != x; then
30498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30500  fi
30501
30502
30503  windows_path="$new_path"
30504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30505    unix_path=`$CYGPATH -u "$windows_path"`
30506    new_path="$unix_path"
30507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30509    new_path="$unix_path"
30510  fi
30511
30512  if test "x$path" != "x$new_path"; then
30513    FREETYPELOCATION="$new_path"
30514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30515$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30516  fi
30517
30518  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30519  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30520
30521  else
30522    # We're on a posix platform. Hooray! :)
30523    path="$FREETYPELOCATION"
30524
30525    if test ! -f "$path" && test ! -d "$path"; then
30526      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30527    fi
30528
30529    has_space=`$ECHO "$path" | $GREP " "`
30530    if test "x$has_space" != x; then
30531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30532$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30533      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30534    fi
30535  fi
30536
30537	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30538$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30539	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30540	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30541	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30542 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30543                if ! test -s "$FREETYPE2_LIBS"; then
30544		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30545		fi
30546                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30547		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30548		fi
30549                USING_SYSTEM_FT_LIB=true
30550                FREETYPE2_FOUND=yes
30551	    fi
30552	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30553$as_echo "$FREETYPE2_FOUND" >&6; }
30554        fi
30555	if test "x$FREETYPE2_FOUND" = xno; then
30556
30557pkg_failed=no
30558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30559$as_echo_n "checking for FREETYPE2... " >&6; }
30560
30561if test -n "$FREETYPE2_CFLAGS"; then
30562    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30563 elif test -n "$PKG_CONFIG"; then
30564    if test -n "$PKG_CONFIG" && \
30565    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30566  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30567  ac_status=$?
30568  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30569  test $ac_status = 0; }; then
30570  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30571else
30572  pkg_failed=yes
30573fi
30574 else
30575    pkg_failed=untried
30576fi
30577if test -n "$FREETYPE2_LIBS"; then
30578    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30579 elif test -n "$PKG_CONFIG"; then
30580    if test -n "$PKG_CONFIG" && \
30581    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30582  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30583  ac_status=$?
30584  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30585  test $ac_status = 0; }; then
30586  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30587else
30588  pkg_failed=yes
30589fi
30590 else
30591    pkg_failed=untried
30592fi
30593
30594
30595
30596if test $pkg_failed = yes; then
30597
30598if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30599        _pkg_short_errors_supported=yes
30600else
30601        _pkg_short_errors_supported=no
30602fi
30603        if test $_pkg_short_errors_supported = yes; then
30604	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30605        else
30606	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30607        fi
30608	# Put the nasty error message in config.log where it belongs
30609	echo "$FREETYPE2_PKG_ERRORS" >&5
30610
30611	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30612$as_echo "no" >&6; }
30613                FREETYPE2_FOUND=no
30614elif test $pkg_failed = untried; then
30615	FREETYPE2_FOUND=no
30616else
30617	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30618	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30620$as_echo "yes" >&6; }
30621	FREETYPE2_FOUND=yes
30622fi
30623            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30624            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30625            USING_SYSTEM_FT_LIB=true
30626            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30627            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30628              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30629            fi
30630	fi
30631	if test "x$FREETYPE2_FOUND" = xno; then
30632	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30633$as_echo_n "checking for freetype in some standard locations... " >&6; }
30634
30635	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30636	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30637	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30638	    fi
30639	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30640	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30641	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30642	    fi
30643
30644	    PREV_CXXCFLAGS="$CXXFLAGS"
30645	    PREV_LDFLAGS="$LDFLAGS"
30646	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30647	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30648	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30649/* end confdefs.h.  */
30650#include<ft2build.h>
30651	                    #include FT_FREETYPE_H
30652	                   int main() { return 0; }
30653
30654_ACEOF
30655if ac_fn_cxx_try_link "$LINENO"; then :
30656
30657	                      # Yes, the default cflags and libs did the trick.
30658	                      FREETYPE2_FOUND=yes
30659	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30660	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30661
30662else
30663
30664	                      FREETYPE2_FOUND=no
30665
30666fi
30667rm -f core conftest.err conftest.$ac_objext \
30668    conftest$ac_exeext conftest.$ac_ext
30669            CXXCFLAGS="$PREV_CXXFLAGS"
30670	    LDFLAGS="$PREV_LDFLAGS"
30671	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30672$as_echo "$FREETYPE2_FOUND" >&6; }
30673            USING_SYSTEM_FT_LIB=true
30674	fi
30675	if test "x$FREETYPE2_FOUND" = xno; then
30676
30677    # Print a helpful message on how to acquire the necessary build dependency.
30678    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30679    MISSING_DEPENDENCY=freetype2
30680    PKGHANDLER_COMMAND=
30681
30682    case $PKGHANDLER in
30683	apt-get)
30684                apt_help     $MISSING_DEPENDENCY ;;
30685    yum)
30686                yum_help     $MISSING_DEPENDENCY ;;
30687	port)
30688                port_help    $MISSING_DEPENDENCY ;;
30689	pkgutil)
30690                pkgutil_help $MISSING_DEPENDENCY ;;
30691	pkgadd)
30692                pkgadd_help  $MISSING_DEPENDENCY ;;
30693    * )
30694      break ;;
30695    esac
30696
30697    if test "x$PKGHANDLER_COMMAND" != x; then
30698        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30699    fi
30700
30701		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30702	fi
30703
30704        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30705            # AC_CHECK_LIB does not support use of cl.exe
30706            PREV_LDFLAGS="$LDFLAGS"
30707            LDFLAGS="$FREETYPE2_LIBS"
30708            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30709$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30710if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30711  $as_echo_n "(cached) " >&6
30712else
30713  ac_check_lib_save_LIBS=$LIBS
30714LIBS="-lfreetype  $LIBS"
30715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30716/* end confdefs.h.  */
30717
30718/* Override any GCC internal prototype to avoid an error.
30719   Use char because int might match the return type of a GCC
30720   builtin and then its argument prototype would still apply.  */
30721#ifdef __cplusplus
30722extern "C"
30723#endif
30724char FT_Init_FreeType ();
30725int
30726main ()
30727{
30728return FT_Init_FreeType ();
30729  ;
30730  return 0;
30731}
30732_ACEOF
30733if ac_fn_cxx_try_link "$LINENO"; then :
30734  ac_cv_lib_freetype_FT_Init_FreeType=yes
30735else
30736  ac_cv_lib_freetype_FT_Init_FreeType=no
30737fi
30738rm -f core conftest.err conftest.$ac_objext \
30739    conftest$ac_exeext conftest.$ac_ext
30740LIBS=$ac_check_lib_save_LIBS
30741fi
30742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30743$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30744if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30745  FREETYPE2_FOUND=true
30746else
30747  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30748fi
30749
30750            LDFLAGS="$PREV_LDFLAGS"
30751        fi
30752fi
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762###############################################################################
30763#
30764# Check for alsa headers and libraries. Used on Linux/GNU systems.
30765#
30766
30767# Check whether --with-alsa was given.
30768if test "${with_alsa+set}" = set; then :
30769  withval=$with_alsa;
30770fi
30771
30772
30773# Check whether --with-alsa-include was given.
30774if test "${with_alsa_include+set}" = set; then :
30775  withval=$with_alsa_include;
30776fi
30777
30778
30779# Check whether --with-alsa-lib was given.
30780if test "${with_alsa_lib+set}" = set; then :
30781  withval=$with_alsa_lib;
30782fi
30783
30784
30785if test "x$ALSA_NOT_NEEDED" = xyes; then
30786	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30787		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30788$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30789	fi
30790	ALSA_CFLAGS=
30791	ALSA_LIBS=
30792else
30793	ALSA_FOUND=no
30794
30795	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30796	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30797	fi
30798
30799	if test "x${with_alsa}" != x; then
30800	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30801	    ALSA_CFLAGS="-I${with_alsa}/include"
30802	    ALSA_FOUND=yes
30803	fi
30804	if test "x${with_alsa_include}" != x; then
30805	    ALSA_CFLAGS="-I${with_alsa_include}"
30806	    ALSA_FOUND=yes
30807	fi
30808	if test "x${with_alsa_lib}" != x; then
30809	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30810	    ALSA_FOUND=yes
30811	fi
30812	if test "x$ALSA_FOUND" = xno; then
30813
30814
30815    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30816        # Source the builddeps file again, to make sure it uses the latest variables!
30817        . $builddepsfile
30818        # Look for a target and build machine specific resource!
30819        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30820        if test "x$resource" = x; then
30821            # Ok, lets instead look for a target specific resource
30822            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30823        fi
30824        if test "x$resource" = x; then
30825            # Ok, lets instead look for a build specific resource
30826            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30827        fi
30828        if test "x$resource" = x; then
30829            # Ok, lets instead look for a generic resource
30830            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30831            resource=${builddep_alsa}
30832        fi
30833        if test "x$resource" != x; then
30834            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30835$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30836	    # If the resource in the builddeps.conf file is an existing directory,
30837	    # for example /java/linux/cups
30838	    if test -d ${resource}; then
30839	       depdir=${resource}
30840	    else
30841
30842# alsa is for example mymodule
30843# $resource is for example libs/general/libmymod_1_2_3.zip
30844# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30845# $with_builddeps_dir is for example /localhome/builddeps
30846# depdir is the name of the variable into which we store the depdir, eg MYMOD
30847# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30848# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30849    filename=`basename $resource`
30850    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30851    filebase=${filename%%.*}
30852    extension=${filename#*.}
30853    installdir=$with_builddeps_dir/$filebase
30854    if test ! -f $installdir/$filename.unpacked; then
30855        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30856$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30857        if test ! -d $installdir; then
30858            mkdir -p $installdir
30859        fi
30860        if test ! -d $installdir; then
30861            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30862        fi
30863        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30864        touch $tmpfile
30865        if test ! -f $tmpfile; then
30866            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30867        fi
30868
30869    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30870    # $tmpfile is the local file name for the downloaded file.
30871    VALID_TOOL=no
30872    if test "x$BDEPS_FTP" = xwget; then
30873       VALID_TOOL=yes
30874       wget -O $tmpfile $with_builddeps_server/$resource
30875    fi
30876    if test "x$BDEPS_FTP" = xlftp; then
30877       VALID_TOOL=yes
30878       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30879    fi
30880    if test "x$BDEPS_FTP" = xftp; then
30881        VALID_TOOL=yes
30882        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30883        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30884        FTPUSERPWD=${FTPSERVER%%@*}
30885        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30886            FTPUSER=${userpwd%%:*}
30887            FTPPWD=${userpwd#*@}
30888            FTPSERVER=${FTPSERVER#*@}
30889        else
30890            FTPUSER=ftp
30891            FTPPWD=ftp
30892        fi
30893        # the "pass" command does not work on some
30894        # ftp clients (read ftp.exe) but if it works,
30895        # passive mode is better!
30896        (\
30897            echo "user $FTPUSER $FTPPWD"        ;\
30898            echo "pass"                         ;\
30899            echo "bin"                          ;\
30900            echo "get $FTPPATH $tmpfile"              ;\
30901        ) | ftp -in $FTPSERVER
30902    fi
30903    if test "x$VALID_TOOL" != xyes; then
30904       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30905    fi
30906
30907        mv $tmpfile $installdir/$filename
30908        if test ! -s $installdir/$filename; then
30909            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30910        fi
30911        case "$extension" in
30912            zip)  echo "Unzipping $installdir/$filename..."
30913               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30914            ;;
30915            tar.gz) echo "Untaring $installdir/$filename..."
30916               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30917            ;;
30918            tgz) echo "Untaring $installdir/$filename..."
30919               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30920            ;;
30921            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30922            ;;
30923        esac
30924    fi
30925    if test -f $installdir/$filename.unpacked; then
30926        depdir=$installdir
30927    fi
30928
30929	    fi
30930            # Source the builddeps file again, because in the previous command, the depdir
30931            # was updated to point at the current build dependency install directory.
30932            . $builddepsfile
30933            # Now extract variables from the builddeps.conf files.
30934            theroot=${builddep_alsa_ROOT}
30935            thecflags=${builddep_alsa_CFLAGS}
30936            thelibs=${builddep_alsa_LIBS}
30937            if test "x$depdir" = x; then
30938                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30939            fi
30940            ALSA=$depdir
30941            if test "x$theroot" != x; then
30942               ALSA="$theroot"
30943            fi
30944            if test "x$thecflags" != x; then
30945               ALSA_CFLAGS="$thecflags"
30946            fi
30947            if test "x$thelibs" != x; then
30948               ALSA_LIBS="$thelibs"
30949            fi
30950            ALSA_FOUND=yes
30951            else ALSA_FOUND=no
30952
30953        fi
30954        else ALSA_FOUND=no
30955
30956    fi
30957
30958	fi
30959	if test "x$ALSA_FOUND" = xno; then
30960
30961pkg_failed=no
30962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30963$as_echo_n "checking for ALSA... " >&6; }
30964
30965if test -n "$ALSA_CFLAGS"; then
30966    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30967 elif test -n "$PKG_CONFIG"; then
30968    if test -n "$PKG_CONFIG" && \
30969    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30970  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30971  ac_status=$?
30972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30973  test $ac_status = 0; }; then
30974  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30975else
30976  pkg_failed=yes
30977fi
30978 else
30979    pkg_failed=untried
30980fi
30981if test -n "$ALSA_LIBS"; then
30982    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30983 elif test -n "$PKG_CONFIG"; then
30984    if test -n "$PKG_CONFIG" && \
30985    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30986  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30987  ac_status=$?
30988  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30989  test $ac_status = 0; }; then
30990  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30991else
30992  pkg_failed=yes
30993fi
30994 else
30995    pkg_failed=untried
30996fi
30997
30998
30999
31000if test $pkg_failed = yes; then
31001
31002if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31003        _pkg_short_errors_supported=yes
31004else
31005        _pkg_short_errors_supported=no
31006fi
31007        if test $_pkg_short_errors_supported = yes; then
31008	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31009        else
31010	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31011        fi
31012	# Put the nasty error message in config.log where it belongs
31013	echo "$ALSA_PKG_ERRORS" >&5
31014
31015	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31016$as_echo "no" >&6; }
31017                ALSA_FOUND=no
31018elif test $pkg_failed = untried; then
31019	ALSA_FOUND=no
31020else
31021	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31022	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31024$as_echo "yes" >&6; }
31025	ALSA_FOUND=yes
31026fi
31027	fi
31028	if test "x$ALSA_FOUND" = xno; then
31029	    for ac_header in alsa/asoundlib.h
31030do :
31031  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31032if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31033  cat >>confdefs.h <<_ACEOF
31034#define HAVE_ALSA_ASOUNDLIB_H 1
31035_ACEOF
31036 ALSA_FOUND=yes
31037	                      ALSA_CFLAGS=-Iignoreme
31038	                      ALSA_LIBS=-lasound
31039	                      DEFAULT_ALSA=yes
31040else
31041  ALSA_FOUND=no
31042fi
31043
31044done
31045
31046	fi
31047	if test "x$ALSA_FOUND" = xno; then
31048
31049    # Print a helpful message on how to acquire the necessary build dependency.
31050    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31051    MISSING_DEPENDENCY=alsa
31052    PKGHANDLER_COMMAND=
31053
31054    case $PKGHANDLER in
31055	apt-get)
31056                apt_help     $MISSING_DEPENDENCY ;;
31057    yum)
31058                yum_help     $MISSING_DEPENDENCY ;;
31059	port)
31060                port_help    $MISSING_DEPENDENCY ;;
31061	pkgutil)
31062                pkgutil_help $MISSING_DEPENDENCY ;;
31063	pkgadd)
31064                pkgadd_help  $MISSING_DEPENDENCY ;;
31065    * )
31066      break ;;
31067    esac
31068
31069    if test "x$PKGHANDLER_COMMAND" != x; then
31070        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31071    fi
31072
31073	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31074	fi
31075fi
31076
31077
31078
31079
31080
31081
31082
31083###############################################################################
31084#
31085# Check for the jpeg library
31086#
31087
31088USE_EXTERNAL_LIBJPEG=true
31089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31090$as_echo_n "checking for main in -ljpeg... " >&6; }
31091if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31092  $as_echo_n "(cached) " >&6
31093else
31094  ac_check_lib_save_LIBS=$LIBS
31095LIBS="-ljpeg  $LIBS"
31096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31097/* end confdefs.h.  */
31098
31099
31100int
31101main ()
31102{
31103return main ();
31104  ;
31105  return 0;
31106}
31107_ACEOF
31108if ac_fn_cxx_try_link "$LINENO"; then :
31109  ac_cv_lib_jpeg_main=yes
31110else
31111  ac_cv_lib_jpeg_main=no
31112fi
31113rm -f core conftest.err conftest.$ac_objext \
31114    conftest$ac_exeext conftest.$ac_ext
31115LIBS=$ac_check_lib_save_LIBS
31116fi
31117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31118$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31119if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
31120  cat >>confdefs.h <<_ACEOF
31121#define HAVE_LIBJPEG 1
31122_ACEOF
31123
31124  LIBS="-ljpeg $LIBS"
31125
31126else
31127   USE_EXTERNAL_LIBJPEG=false
31128               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31129$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31130
31131fi
31132
31133
31134
31135###############################################################################
31136#
31137# Check for the gif library
31138#
31139
31140USE_EXTERNAL_LIBJPEG=true
31141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
31142$as_echo_n "checking for main in -lgif... " >&6; }
31143if test "${ac_cv_lib_gif_main+set}" = set; then :
31144  $as_echo_n "(cached) " >&6
31145else
31146  ac_check_lib_save_LIBS=$LIBS
31147LIBS="-lgif  $LIBS"
31148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31149/* end confdefs.h.  */
31150
31151
31152int
31153main ()
31154{
31155return main ();
31156  ;
31157  return 0;
31158}
31159_ACEOF
31160if ac_fn_cxx_try_link "$LINENO"; then :
31161  ac_cv_lib_gif_main=yes
31162else
31163  ac_cv_lib_gif_main=no
31164fi
31165rm -f core conftest.err conftest.$ac_objext \
31166    conftest$ac_exeext conftest.$ac_ext
31167LIBS=$ac_check_lib_save_LIBS
31168fi
31169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
31170$as_echo "$ac_cv_lib_gif_main" >&6; }
31171if test "x$ac_cv_lib_gif_main" = x""yes; then :
31172  cat >>confdefs.h <<_ACEOF
31173#define HAVE_LIBGIF 1
31174_ACEOF
31175
31176  LIBS="-lgif $LIBS"
31177
31178else
31179   USE_EXTERNAL_LIBGIF=false
31180               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
31181$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
31182
31183fi
31184
31185
31186
31187###############################################################################
31188#
31189# Check for the zlib library
31190#
31191
31192
31193# Check whether --with-zlib was given.
31194if test "${with_zlib+set}" = set; then :
31195  withval=$with_zlib;
31196fi
31197
31198
31199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31200$as_echo_n "checking for compress in -lz... " >&6; }
31201if test "${ac_cv_lib_z_compress+set}" = set; then :
31202  $as_echo_n "(cached) " >&6
31203else
31204  ac_check_lib_save_LIBS=$LIBS
31205LIBS="-lz  $LIBS"
31206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31207/* end confdefs.h.  */
31208
31209/* Override any GCC internal prototype to avoid an error.
31210   Use char because int might match the return type of a GCC
31211   builtin and then its argument prototype would still apply.  */
31212#ifdef __cplusplus
31213extern "C"
31214#endif
31215char compress ();
31216int
31217main ()
31218{
31219return compress ();
31220  ;
31221  return 0;
31222}
31223_ACEOF
31224if ac_fn_cxx_try_link "$LINENO"; then :
31225  ac_cv_lib_z_compress=yes
31226else
31227  ac_cv_lib_z_compress=no
31228fi
31229rm -f core conftest.err conftest.$ac_objext \
31230    conftest$ac_exeext conftest.$ac_ext
31231LIBS=$ac_check_lib_save_LIBS
31232fi
31233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31234$as_echo "$ac_cv_lib_z_compress" >&6; }
31235if test "x$ac_cv_lib_z_compress" = x""yes; then :
31236   ZLIB_FOUND=yes
31237else
31238   ZLIB_FOUND=no
31239fi
31240
31241
31242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31243$as_echo_n "checking for which zlib to use... " >&6; }
31244
31245DEFAULT_ZLIB=bundled
31246if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31247#
31248# On macosx default is system...on others default is
31249#
31250    DEFAULT_ZLIB=system
31251fi
31252
31253if test "x${ZLIB_FOUND}" != "xyes"; then
31254#
31255# If we don't find any system...set default to bundled
31256#
31257    DEFAULT_ZLIB=bundled
31258fi
31259
31260#
31261# If user didn't specify, use DEFAULT_ZLIB
31262#
31263if test "x${with_zlib}" = "x"; then
31264    with_zlib=${DEFAULT_ZLIB}
31265fi
31266
31267if test "x${with_zlib}" = "xbundled"; then
31268    USE_EXTERNAL_LIBZ=false
31269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31270$as_echo "bundled" >&6; }
31271elif test "x${with_zlib}" = "xsystem"; then
31272    if test "x${ZLIB_FOUND}" = "xyes"; then
31273        USE_EXTERNAL_LIBZ=true
31274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31275$as_echo "system" >&6; }
31276    else
31277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31278$as_echo "system not found" >&6; }
31279        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31280    fi
31281else
31282    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31283fi
31284
31285
31286
31287###############################################################################
31288LIBZIP_CAN_USE_MMAP=true
31289
31290
31291
31292###############################################################################
31293#
31294# Check if altzone exists in time.h
31295#
31296
31297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31298/* end confdefs.h.  */
31299#include <time.h>
31300int
31301main ()
31302{
31303return (int)altzone;
31304  ;
31305  return 0;
31306}
31307_ACEOF
31308if ac_fn_cxx_try_link "$LINENO"; then :
31309  has_altzone=yes
31310else
31311  has_altzone=no
31312fi
31313rm -f core conftest.err conftest.$ac_objext \
31314    conftest$ac_exeext conftest.$ac_ext
31315if test "x$has_altzone" = xyes; then
31316
31317$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31318
31319fi
31320
31321###############################################################################
31322#
31323# Check the maths library
31324#
31325
31326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31327$as_echo_n "checking for cos in -lm... " >&6; }
31328if test "${ac_cv_lib_m_cos+set}" = set; then :
31329  $as_echo_n "(cached) " >&6
31330else
31331  ac_check_lib_save_LIBS=$LIBS
31332LIBS="-lm  $LIBS"
31333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31334/* end confdefs.h.  */
31335
31336/* Override any GCC internal prototype to avoid an error.
31337   Use char because int might match the return type of a GCC
31338   builtin and then its argument prototype would still apply.  */
31339#ifdef __cplusplus
31340extern "C"
31341#endif
31342char cos ();
31343int
31344main ()
31345{
31346return cos ();
31347  ;
31348  return 0;
31349}
31350_ACEOF
31351if ac_fn_cxx_try_link "$LINENO"; then :
31352  ac_cv_lib_m_cos=yes
31353else
31354  ac_cv_lib_m_cos=no
31355fi
31356rm -f core conftest.err conftest.$ac_objext \
31357    conftest$ac_exeext conftest.$ac_ext
31358LIBS=$ac_check_lib_save_LIBS
31359fi
31360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
31361$as_echo "$ac_cv_lib_m_cos" >&6; }
31362if test "x$ac_cv_lib_m_cos" = x""yes; then :
31363  cat >>confdefs.h <<_ACEOF
31364#define HAVE_LIBM 1
31365_ACEOF
31366
31367  LIBS="-lm $LIBS"
31368
31369else
31370
31371                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
31372$as_echo "$as_me: Maths library was not found" >&6;}
31373
31374fi
31375
31376
31377
31378###############################################################################
31379#
31380# Check for libdl.so
31381
31382save_LIBS="$LIBS"
31383LIBS=""
31384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
31385$as_echo_n "checking for dlopen in -ldl... " >&6; }
31386if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
31387  $as_echo_n "(cached) " >&6
31388else
31389  ac_check_lib_save_LIBS=$LIBS
31390LIBS="-ldl  $LIBS"
31391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31392/* end confdefs.h.  */
31393
31394/* Override any GCC internal prototype to avoid an error.
31395   Use char because int might match the return type of a GCC
31396   builtin and then its argument prototype would still apply.  */
31397#ifdef __cplusplus
31398extern "C"
31399#endif
31400char dlopen ();
31401int
31402main ()
31403{
31404return dlopen ();
31405  ;
31406  return 0;
31407}
31408_ACEOF
31409if ac_fn_cxx_try_link "$LINENO"; then :
31410  ac_cv_lib_dl_dlopen=yes
31411else
31412  ac_cv_lib_dl_dlopen=no
31413fi
31414rm -f core conftest.err conftest.$ac_objext \
31415    conftest$ac_exeext conftest.$ac_ext
31416LIBS=$ac_check_lib_save_LIBS
31417fi
31418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31419$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31420if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
31421  cat >>confdefs.h <<_ACEOF
31422#define HAVE_LIBDL 1
31423_ACEOF
31424
31425  LIBS="-ldl $LIBS"
31426
31427fi
31428
31429LIBDL="$LIBS"
31430
31431LIBS="$save_LIBS"
31432
31433
31434
31435###############################################################################
31436#
31437# statically link libstdc++ before C++ ABI is stablized on Linux unless
31438# dynamic build is configured on command line.
31439#
31440
31441# Check whether --with-stdc++lib was given.
31442if test "${with_stdc__lib+set}" = set; then :
31443  withval=$with_stdc__lib;
31444    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31445        && test "x$with_stdc__lib" != xdefault; then
31446      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31447    fi
31448
31449else
31450  with_stdc__lib=default
31451
31452fi
31453
31454
31455if test "x$OPENJDK_TARGET_OS" = xlinux; then
31456    # Test if -lstdc++ works.
31457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31458$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31459    ac_ext=cpp
31460ac_cpp='$CXXCPP $CPPFLAGS'
31461ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31462ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31463ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31464
31465    OLD_CXXFLAGS="$CXXFLAGS"
31466    CXXFLAGS="$CXXFLAGS -lstdc++"
31467    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31468/* end confdefs.h.  */
31469
31470int
31471main ()
31472{
31473return 0;
31474  ;
31475  return 0;
31476}
31477_ACEOF
31478if ac_fn_cxx_try_link "$LINENO"; then :
31479  has_dynamic_libstdcxx=yes
31480else
31481  has_dynamic_libstdcxx=no
31482fi
31483rm -f core conftest.err conftest.$ac_objext \
31484    conftest$ac_exeext conftest.$ac_ext
31485    CXXFLAGS="$OLD_CXXFLAGS"
31486    ac_ext=cpp
31487ac_cpp='$CXXCPP $CPPFLAGS'
31488ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31489ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31490ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31491
31492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31493$as_echo "$has_dynamic_libstdcxx" >&6; }
31494
31495    # Test if stdc++ can be linked statically.
31496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31497$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31498    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31499    ac_ext=cpp
31500ac_cpp='$CXXCPP $CPPFLAGS'
31501ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31502ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31503ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31504
31505    OLD_LIBS="$LIBS"
31506    OLD_CXX="$CXX"
31507    LIBS="$STATIC_STDCXX_FLAGS"
31508    CXX="$CC"
31509    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31510/* end confdefs.h.  */
31511
31512int
31513main ()
31514{
31515return 0;
31516  ;
31517  return 0;
31518}
31519_ACEOF
31520if ac_fn_cxx_try_link "$LINENO"; then :
31521  has_static_libstdcxx=yes
31522else
31523  has_static_libstdcxx=no
31524fi
31525rm -f core conftest.err conftest.$ac_objext \
31526    conftest$ac_exeext conftest.$ac_ext
31527    LIBS="$OLD_LIBS"
31528    CXX="$OLD_CXX"
31529    ac_ext=cpp
31530ac_cpp='$CXXCPP $CPPFLAGS'
31531ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31532ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31533ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31534
31535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31536$as_echo "$has_static_libstdcxx" >&6; }
31537
31538    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31539        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31540    fi
31541
31542    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31543        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31544    fi
31545
31546    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31547        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31548    fi
31549
31550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31551$as_echo_n "checking how to link with libstdc++... " >&6; }
31552    # If dynamic was requested, it's available since it would fail above otherwise.
31553    # If dynamic wasn't requested, go with static unless it isn't available.
31554    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31555        LIBCXX="$LIBCXX -lstdc++"
31556        LDCXX="$CXX"
31557        STATIC_CXX_SETTING="STATIC_CXX=false"
31558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31559$as_echo "dynamic" >&6; }
31560    else
31561        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31562        LDCXX="$CC"
31563        STATIC_CXX_SETTING="STATIC_CXX=true"
31564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31565$as_echo "static" >&6; }
31566    fi
31567fi
31568
31569
31570# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31571if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31572    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31573fi
31574
31575# TODO better (platform agnostic) test
31576if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31577    LIBCXX="-lstdc++"
31578fi
31579
31580
31581
31582
31583
31584# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31585
31586# When using cygwin or msys, we need a wrapper binary that renames
31587# /cygdrive/c/ arguments into c:/ arguments and peeks into
31588# @files and rewrites these too! This wrapper binary is
31589# called fixpath.
31590FIXPATH=
31591if test "x$OPENJDK_BUILD_OS" = xwindows; then
31592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31593$as_echo_n "checking if fixpath can be created... " >&6; }
31594    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31595    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31596    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31597      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31598      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31599      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31600      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31601    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31602      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31603      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31604
31605      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31606      # @ was chosen as separator to minimize risk of other tools messing around with it
31607      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31608      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31609
31610      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31611    fi
31612    rm -f $OUTPUT_ROOT/fixpath*
31613    cd $OUTPUT_ROOT
31614    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31615    cd $CURDIR
31616
31617    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31619$as_echo "no" >&6; }
31620        cat $OUTPUT_ROOT/fixpath1.log
31621        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31622    fi
31623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31624$as_echo "yes" >&6; }
31625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31626$as_echo_n "checking if fixpath.exe works... " >&6; }
31627    cd $OUTPUT_ROOT
31628    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31629    cd $CURDIR
31630    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31632$as_echo "no" >&6; }
31633        cat $OUTPUT_ROOT/fixpath2.log
31634        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31635    fi
31636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31637$as_echo "yes" >&6; }
31638    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31639fi
31640
31641
31642
31643
31644###############################################################################
31645#
31646# We need to do some final tweaking, when everything else is done.
31647#
31648###############################################################################
31649
31650
31651HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31652
31653
31654# The name of the Service Agent jar.
31655SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31656if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31657  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31658fi
31659
31660
31661
31662
31663###############################################################################
31664#
31665# Configure parts of the build that only affect the build performance,
31666# not the result.
31667#
31668###############################################################################
31669
31670
31671  # How many cores do we have on this build system?
31672
31673# Check whether --with-num-cores was given.
31674if test "${with_num_cores+set}" = set; then :
31675  withval=$with_num_cores;
31676fi
31677
31678  if test "x$with_num_cores" = x; then
31679    # The number of cores were not specified, try to probe them.
31680
31681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31682$as_echo_n "checking for number of cores... " >&6; }
31683    NUM_CORES=1
31684    FOUND_CORES=no
31685
31686    if test -f /proc/cpuinfo; then
31687        # Looks like a Linux (or cygwin) system
31688        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31689        FOUND_CORES=yes
31690    elif test -x /usr/sbin/psrinfo; then
31691        # Looks like a Solaris system
31692        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31693        FOUND_CORES=yes
31694    elif test -x /usr/sbin/system_profiler; then
31695        # Looks like a MacOSX system
31696        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31697        FOUND_CORES=yes
31698    elif test -n "$NUMBER_OF_PROCESSORS"; then
31699        # On windows, look in the env
31700        NUM_CORES=$NUMBER_OF_PROCESSORS
31701        FOUND_CORES=yes
31702    fi
31703
31704    if test "x$FOUND_CORES" = xyes; then
31705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31706$as_echo "$NUM_CORES" >&6; }
31707    else
31708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31709$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31711$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31712    fi
31713
31714
31715  else
31716    NUM_CORES=$with_num_cores
31717  fi
31718
31719
31720
31721  # How much memory do we have on this build system?
31722
31723# Check whether --with-memory-size was given.
31724if test "${with_memory_size+set}" = set; then :
31725  withval=$with_memory_size;
31726fi
31727
31728  if test "x$with_memory_size" = x; then
31729    # The memory size was not specified, try to probe it.
31730
31731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31732$as_echo_n "checking for memory size... " >&6; }
31733    # Default to 1024 MB
31734    MEMORY_SIZE=1024
31735    FOUND_MEM=no
31736
31737    if test -f /proc/meminfo; then
31738        # Looks like a Linux (or cygwin) system
31739        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31740        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31741        FOUND_MEM=yes
31742    elif test -x /usr/sbin/prtconf; then
31743        # Looks like a Solaris system
31744        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31745        FOUND_MEM=yes
31746    elif test -x /usr/sbin/system_profiler; then
31747        # Looks like a MacOSX system
31748        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31749        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31750        FOUND_MEM=yes
31751    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31752        # Windows, but without cygwin
31753        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31754        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31755        FOUND_MEM=yes
31756    fi
31757
31758    if test "x$FOUND_MEM" = xyes; then
31759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31760$as_echo "$MEMORY_SIZE MB" >&6; }
31761    else
31762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31763$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31764        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31765$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31766    fi
31767
31768  else
31769    MEMORY_SIZE=$with_memory_size
31770  fi
31771
31772
31773
31774  # Provide a decent default number of parallel jobs for make depending on
31775  # number of cores, amount of memory and machine architecture.
31776
31777# Check whether --with-jobs was given.
31778if test "${with_jobs+set}" = set; then :
31779  withval=$with_jobs;
31780fi
31781
31782  if test "x$with_jobs" = x; then
31783    # Number of jobs was not specified, calculate.
31784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
31785$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
31786    # Approximate memory in GB, rounding up a bit.
31787    memory_gb=`expr $MEMORY_SIZE / 1100`
31788    # Pick the lowest of memory in gb and number of cores.
31789    if test "$memory_gb" -lt "$NUM_CORES"; then
31790      JOBS="$memory_gb"
31791    else
31792      JOBS="$NUM_CORES"
31793      # On bigger machines, leave some room for other processes to run
31794      if test "$JOBS" -gt "4"; then
31795        JOBS=`expr $JOBS '*' 90 / 100`
31796      fi
31797    fi
31798    # Cap number of jobs to 16
31799    if test "$JOBS" -gt "16"; then
31800      JOBS=16
31801    fi
31802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
31803$as_echo "$JOBS" >&6; }
31804  else
31805    JOBS=$with_jobs
31806  fi
31807
31808
31809
31810# Setup smart javac (after cores and memory have been setup)
31811
31812
31813# Check whether --with-sjavac-server-java was given.
31814if test "${with_sjavac_server_java+set}" = set; then :
31815  withval=$with_sjavac_server_java;
31816fi
31817
31818
31819if test "x$with_sjavac_server_java" != x; then
31820    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31821    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31822    if test "x$FOUND_VERSION" = x; then
31823        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31824    fi
31825else
31826    SJAVAC_SERVER_JAVA=""
31827    # Hotspot specific options.
31828
31829    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31830    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31831    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31832    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31833    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31834        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31835    fi
31836
31837    # JRockit specific options.
31838
31839    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31840    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31841    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31842    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31843    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31844        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31845    fi
31846
31847    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31848fi
31849
31850
31851
31852# Check whether --with-sjavac-server-cores was given.
31853if test "${with_sjavac_server_cores+set}" = set; then :
31854  withval=$with_sjavac_server_cores;
31855fi
31856
31857if test "x$with_sjavac_server_cores" != x; then
31858    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31859else
31860    if test "$NUM_CORES" -gt 16; then
31861        # We set this arbitrary limit because we want to limit the heap
31862        # size of the javac server.
31863        # In the future we will make the javac compilers in the server
31864        # share more and more state, thus enabling us to use more and
31865        # more concurrent threads in the server.
31866        SJAVAC_SERVER_CORES="16"
31867    else
31868        SJAVAC_SERVER_CORES="$NUM_CORES"
31869    fi
31870
31871    if test "$MEMORY_SIZE" -gt "17000"; then
31872        MAX_HEAP_MEM=10000
31873
31874    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31875    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31876    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31877    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31878    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31879        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31880    fi
31881
31882
31883    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31884    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31885    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31886    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31887    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31888        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31889    fi
31890
31891    elif test "$MEMORY_SIZE" -gt "10000"; then
31892        MAX_HEAP_MEM=6000
31893
31894    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31895    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31896    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31897    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31898    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31899        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31900    fi
31901
31902
31903    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31904    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31905    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31906    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31907    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31908        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31909    fi
31910
31911    elif test "$MEMORY_SIZE" -gt "5000"; then
31912        MAX_HEAP_MEM=3000
31913
31914    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31915    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31916    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31917    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31918    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31919        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31920    fi
31921
31922
31923    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31924    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31925    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31926    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31927    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31928        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31929    fi
31930
31931    elif test "$MEMORY_SIZE" -gt "3800"; then
31932        MAX_HEAP_MEM=2500
31933
31934    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31935    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31936    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31937    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31938    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31939        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31940    fi
31941
31942    elif test "$MEMORY_SIZE" -gt "1900"; then
31943        MAX_HEAP_MEM=1200
31944
31945    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31946    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31947    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31948    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31949    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31950        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31951    fi
31952
31953    elif test "$MEMORY_SIZE" -gt "1000"; then
31954        MAX_HEAP_MEM=900
31955
31956    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31957    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31958    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31959    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31960    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31961        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31962    fi
31963
31964    else
31965        MAX_HEAP_MEM=512
31966
31967    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31968    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31969    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31970    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31971    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31972        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31973    fi
31974
31975    fi
31976
31977
31978    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31979    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31980    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31981    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31982    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31983        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31984    fi
31985
31986
31987    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31988    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31989    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31990    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31991    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31992        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31993    fi
31994
31995
31996    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31997    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31998    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31999    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32000    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32001        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32002    fi
32003
32004
32005    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32006    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32008$as_echo_n "checking if number of server cores must be reduced... " >&6; }
32009        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32011$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32012    fi
32013fi
32014
32015
32016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32017$as_echo_n "checking whether to use sjavac... " >&6; }
32018# Check whether --enable-sjavac was given.
32019if test "${enable_sjavac+set}" = set; then :
32020  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32021else
32022  ENABLE_SJAVAC='no'
32023fi
32024
32025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32026$as_echo "$ENABLE_SJAVAC" >&6; }
32027
32028
32029if test "x$ENABLE_SJAVAC" = xyes; then
32030    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32031else
32032    SJAVAC_SERVER_DIR=
32033fi
32034
32035
32036
32037
32038# Can the C/C++ compiler use precompiled headers?
32039
32040
32041###############################################################################
32042#
32043# Can the C/C++ compiler use precompiled headers?
32044#
32045# Check whether --enable-precompiled-headers was given.
32046if test "${enable_precompiled_headers+set}" = set; then :
32047  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32048else
32049  ENABLE_PRECOMPH=yes
32050fi
32051
32052
32053USE_PRECOMPILED_HEADER=1
32054if test "x$ENABLE_PRECOMPH" = xno; then
32055    USE_PRECOMPILED_HEADER=0
32056fi
32057
32058if test "x$ENABLE_PRECOMPH" = xyes; then
32059    # Check that the compiler actually supports precomp headers.
32060    if test "x$GCC" = xyes; then
32061         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32062$as_echo_n "checking that precompiled headers work... " >&6; }
32063         echo "int alfa();" > conftest.h
32064         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32065         if test ! -f conftest.hpp.gch; then
32066             USE_PRECOMPILED_HEADER=0
32067             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32068$as_echo "no" >&6; }
32069         else
32070             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32071$as_echo "yes" >&6; }
32072         fi
32073         rm -f conftest.h conftest.hpp.gch
32074    fi
32075fi
32076
32077
32078
32079
32080# Setup use of ccache, if available
32081
32082    # Check whether --enable-ccache was given.
32083if test "${enable_ccache+set}" = set; then :
32084  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32085else
32086  ENABLE_CCACHE=yes
32087fi
32088
32089    if test "x$ENABLE_CCACHE" = xyes; then
32090        # Extract the first word of "ccache", so it can be a program name with args.
32091set dummy ccache; ac_word=$2
32092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32093$as_echo_n "checking for $ac_word... " >&6; }
32094if test "${ac_cv_path_CCACHE+set}" = set; then :
32095  $as_echo_n "(cached) " >&6
32096else
32097  case $CCACHE in
32098  [\\/]* | ?:[\\/]*)
32099  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32100  ;;
32101  *)
32102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32103for as_dir in $PATH
32104do
32105  IFS=$as_save_IFS
32106  test -z "$as_dir" && as_dir=.
32107    for ac_exec_ext in '' $ac_executable_extensions; do
32108  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32109    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32111    break 2
32112  fi
32113done
32114  done
32115IFS=$as_save_IFS
32116
32117  ;;
32118esac
32119fi
32120CCACHE=$ac_cv_path_CCACHE
32121if test -n "$CCACHE"; then
32122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32123$as_echo "$CCACHE" >&6; }
32124else
32125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32126$as_echo "no" >&6; }
32127fi
32128
32129
32130    else
32131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32132$as_echo_n "checking for ccache... " >&6; }
32133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32134$as_echo "explicitly disabled" >&6; }
32135        CCACHE=
32136    fi
32137
32138
32139
32140# Check whether --with-ccache-dir was given.
32141if test "${with_ccache_dir+set}" = set; then :
32142  withval=$with_ccache_dir;
32143fi
32144
32145
32146    if test "x$with_ccache_dir" != x; then
32147        # When using a non home ccache directory, assume the use is to share ccache files
32148        # with other users. Thus change the umask.
32149        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32150    fi
32151    CCACHE_FOUND=""
32152    if test "x$CCACHE" != x; then
32153
32154    if test "x$CCACHE" != x; then
32155        CCACHE_FOUND="true"
32156        # Only use ccache if it is 3.1.4 or later, which supports
32157        # precompiled headers.
32158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
32159$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
32160        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
32161        if test "x$HAS_GOOD_CCACHE" = x; then
32162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
32163$as_echo "no, disabling ccache" >&6; }
32164            CCACHE=
32165        else
32166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32167$as_echo "yes" >&6; }
32168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
32169$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
32170            PUSHED_FLAGS="$CXXFLAGS"
32171            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
32172            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32173/* end confdefs.h.  */
32174
32175int
32176main ()
32177{
32178
32179  ;
32180  return 0;
32181}
32182_ACEOF
32183if ac_fn_cxx_try_compile "$LINENO"; then :
32184  CC_KNOWS_CCACHE_TRICK=yes
32185else
32186  CC_KNOWS_CCACHE_TRICK=no
32187fi
32188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32189            CXXFLAGS="$PUSHED_FLAGS"
32190            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
32191                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32192$as_echo "yes" >&6; }
32193            else
32194                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
32195$as_echo "no, disabling ccaching of precompiled headers" >&6; }
32196                CCACHE=
32197            fi
32198        fi
32199    fi
32200
32201    if test "x$CCACHE" != x; then
32202        CCACHE_SLOPPINESS=time_macros
32203        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
32204        CCACHE_FLAGS=-fpch-preprocess
32205
32206        if test "x$SET_CCACHE_DIR" != x; then
32207            mkdir -p $CCACHE_DIR > /dev/null 2>&1
32208	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
32209        fi
32210    fi
32211
32212    fi
32213
32214
32215###############################################################################
32216#
32217# And now the finish...
32218#
32219###############################################################################
32220
32221# Check for some common pitfalls
32222
32223  if test x"$OPENJDK_BUILD_OS" = xwindows; then
32224    file_to_test="$SRC_ROOT/LICENSE"
32225    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
32226      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
32227    fi
32228  fi
32229
32230
32231
32232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
32233$as_echo_n "checking if build directory is on local disk... " >&6; }
32234
32235	# df -l lists only local disks; if the given directory is not found then
32236	# a non-zero exit code is given
32237  if test "x$DF" = x; then
32238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32239      # msys does not have df; use Windows "net use" instead.
32240      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
32241      if test "x$IS_NETWORK_DISK" = x; then
32242        OUTPUT_DIR_IS_LOCAL="yes"
32243      else
32244        OUTPUT_DIR_IS_LOCAL="no"
32245      fi
32246    else
32247      # No df here, say it's local
32248      OUTPUT_DIR_IS_LOCAL="yes"
32249    fi
32250  else
32251    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
32252      OUTPUT_DIR_IS_LOCAL="yes"
32253    else
32254      OUTPUT_DIR_IS_LOCAL="no"
32255    fi
32256  fi
32257
32258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
32259$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
32260
32261
32262
32263# Check if the user has any old-style ALT_ variables set.
32264FOUND_ALT_VARIABLES=`env | grep ^ALT_`
32265
32266# Before generating output files, test if they exist. If they do, this is a reconfigure.
32267# Since we can't properly handle the dependencies for this, warn the user about the situation
32268if test -e $OUTPUT_ROOT/spec.gmk; then
32269  IS_RECONFIGURE=yes
32270else
32271  IS_RECONFIGURE=no
32272fi
32273
32274if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
32275  HIDE_PERFORMANCE_HINTS=yes
32276else
32277  HIDE_PERFORMANCE_HINTS=no
32278  # Hide it the next time around...
32279  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
32280fi
32281
32282
32283
32284# At the end, call the custom hook. (Dummy macro if no custom sources available)
32285
32286
32287# We're messing a bit with internal autoconf variables to put the config.status
32288# in the output directory instead of the current directory.
32289CONFIG_STATUS="$OUTPUT_ROOT/config.status"
32290# Create the actual output files. Now the main work of configure is done.
32291cat >confcache <<\_ACEOF
32292# This file is a shell script that caches the results of configure
32293# tests run on this system so they can be shared between configure
32294# scripts and configure runs, see configure's option --config-cache.
32295# It is not useful on other systems.  If it contains results you don't
32296# want to keep, you may remove or edit it.
32297#
32298# config.status only pays attention to the cache file if you give it
32299# the --recheck option to rerun configure.
32300#
32301# `ac_cv_env_foo' variables (set or unset) will be overridden when
32302# loading this file, other *unset* `ac_cv_foo' will be assigned the
32303# following values.
32304
32305_ACEOF
32306
32307# The following way of writing the cache mishandles newlines in values,
32308# but we know of no workaround that is simple, portable, and efficient.
32309# So, we kill variables containing newlines.
32310# Ultrix sh set writes to stderr and can't be redirected directly,
32311# and sets the high bit in the cache file unless we assign to the vars.
32312(
32313  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32314    eval ac_val=\$$ac_var
32315    case $ac_val in #(
32316    *${as_nl}*)
32317      case $ac_var in #(
32318      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32319$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32320      esac
32321      case $ac_var in #(
32322      _ | IFS | as_nl) ;; #(
32323      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32324      *) { eval $ac_var=; unset $ac_var;} ;;
32325      esac ;;
32326    esac
32327  done
32328
32329  (set) 2>&1 |
32330    case $as_nl`(ac_space=' '; set) 2>&1` in #(
32331    *${as_nl}ac_space=\ *)
32332      # `set' does not quote correctly, so add quotes: double-quote
32333      # substitution turns \\\\ into \\, and sed turns \\ into \.
32334      sed -n \
32335	"s/'/'\\\\''/g;
32336	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32337      ;; #(
32338    *)
32339      # `set' quotes correctly as required by POSIX, so do not add quotes.
32340      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32341      ;;
32342    esac |
32343    sort
32344) |
32345  sed '
32346     /^ac_cv_env_/b end
32347     t clear
32348     :clear
32349     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32350     t end
32351     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32352     :end' >>confcache
32353if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32354  if test -w "$cache_file"; then
32355    test "x$cache_file" != "x/dev/null" &&
32356      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32357$as_echo "$as_me: updating cache $cache_file" >&6;}
32358    cat confcache >$cache_file
32359  else
32360    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32361$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32362  fi
32363fi
32364rm -f confcache
32365
32366test "x$prefix" = xNONE && prefix=$ac_default_prefix
32367# Let make expand exec_prefix.
32368test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32369
32370DEFS=-DHAVE_CONFIG_H
32371
32372ac_libobjs=
32373ac_ltlibobjs=
32374U=
32375for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32376  # 1. Remove the extension, and $U if already installed.
32377  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32378  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32379  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32380  #    will be set to the directory where LIBOBJS objects are built.
32381  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32382  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32383done
32384LIBOBJS=$ac_libobjs
32385
32386LTLIBOBJS=$ac_ltlibobjs
32387
32388
32389
32390: ${CONFIG_STATUS=./config.status}
32391ac_write_fail=0
32392ac_clean_files_save=$ac_clean_files
32393ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32394{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32395$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32396as_write_fail=0
32397cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32398#! $SHELL
32399# Generated by $as_me.
32400# Run this file to recreate the current configuration.
32401# Compiler output produced by configure, useful for debugging
32402# configure, is in config.log if it exists.
32403
32404debug=false
32405ac_cs_recheck=false
32406ac_cs_silent=false
32407
32408SHELL=\${CONFIG_SHELL-$SHELL}
32409export SHELL
32410_ASEOF
32411cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32412## -------------------- ##
32413## M4sh Initialization. ##
32414## -------------------- ##
32415
32416# Be more Bourne compatible
32417DUALCASE=1; export DUALCASE # for MKS sh
32418if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32419  emulate sh
32420  NULLCMD=:
32421  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32422  # is contrary to our usage.  Disable this feature.
32423  alias -g '${1+"$@"}'='"$@"'
32424  setopt NO_GLOB_SUBST
32425else
32426  case `(set -o) 2>/dev/null` in #(
32427  *posix*) :
32428    set -o posix ;; #(
32429  *) :
32430     ;;
32431esac
32432fi
32433
32434
32435as_nl='
32436'
32437export as_nl
32438# Printing a long string crashes Solaris 7 /usr/bin/printf.
32439as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32440as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32441as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32442# Prefer a ksh shell builtin over an external printf program on Solaris,
32443# but without wasting forks for bash or zsh.
32444if test -z "$BASH_VERSION$ZSH_VERSION" \
32445    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32446  as_echo='print -r --'
32447  as_echo_n='print -rn --'
32448elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32449  as_echo='printf %s\n'
32450  as_echo_n='printf %s'
32451else
32452  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32453    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32454    as_echo_n='/usr/ucb/echo -n'
32455  else
32456    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32457    as_echo_n_body='eval
32458      arg=$1;
32459      case $arg in #(
32460      *"$as_nl"*)
32461	expr "X$arg" : "X\\(.*\\)$as_nl";
32462	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32463      esac;
32464      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32465    '
32466    export as_echo_n_body
32467    as_echo_n='sh -c $as_echo_n_body as_echo'
32468  fi
32469  export as_echo_body
32470  as_echo='sh -c $as_echo_body as_echo'
32471fi
32472
32473# The user is always right.
32474if test "${PATH_SEPARATOR+set}" != set; then
32475  PATH_SEPARATOR=:
32476  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32477    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32478      PATH_SEPARATOR=';'
32479  }
32480fi
32481
32482
32483# IFS
32484# We need space, tab and new line, in precisely that order.  Quoting is
32485# there to prevent editors from complaining about space-tab.
32486# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32487# splitting by setting IFS to empty value.)
32488IFS=" ""	$as_nl"
32489
32490# Find who we are.  Look in the path if we contain no directory separator.
32491case $0 in #((
32492  *[\\/]* ) as_myself=$0 ;;
32493  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32494for as_dir in $PATH
32495do
32496  IFS=$as_save_IFS
32497  test -z "$as_dir" && as_dir=.
32498    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32499  done
32500IFS=$as_save_IFS
32501
32502     ;;
32503esac
32504# We did not find ourselves, most probably we were run as `sh COMMAND'
32505# in which case we are not to be found in the path.
32506if test "x$as_myself" = x; then
32507  as_myself=$0
32508fi
32509if test ! -f "$as_myself"; then
32510  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32511  exit 1
32512fi
32513
32514# Unset variables that we do not need and which cause bugs (e.g. in
32515# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32516# suppresses any "Segmentation fault" message there.  '((' could
32517# trigger a bug in pdksh 5.2.14.
32518for as_var in BASH_ENV ENV MAIL MAILPATH
32519do eval test x\${$as_var+set} = xset \
32520  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32521done
32522PS1='$ '
32523PS2='> '
32524PS4='+ '
32525
32526# NLS nuisances.
32527LC_ALL=C
32528export LC_ALL
32529LANGUAGE=C
32530export LANGUAGE
32531
32532# CDPATH.
32533(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32534
32535
32536# as_fn_error STATUS ERROR [LINENO LOG_FD]
32537# ----------------------------------------
32538# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32539# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32540# script with STATUS, using 1 if that was 0.
32541as_fn_error ()
32542{
32543  as_status=$1; test $as_status -eq 0 && as_status=1
32544  if test "$4"; then
32545    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32546    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32547  fi
32548  $as_echo "$as_me: error: $2" >&2
32549  as_fn_exit $as_status
32550} # as_fn_error
32551
32552
32553# as_fn_set_status STATUS
32554# -----------------------
32555# Set $? to STATUS, without forking.
32556as_fn_set_status ()
32557{
32558  return $1
32559} # as_fn_set_status
32560
32561# as_fn_exit STATUS
32562# -----------------
32563# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32564as_fn_exit ()
32565{
32566  set +e
32567  as_fn_set_status $1
32568  exit $1
32569} # as_fn_exit
32570
32571# as_fn_unset VAR
32572# ---------------
32573# Portably unset VAR.
32574as_fn_unset ()
32575{
32576  { eval $1=; unset $1;}
32577}
32578as_unset=as_fn_unset
32579# as_fn_append VAR VALUE
32580# ----------------------
32581# Append the text in VALUE to the end of the definition contained in VAR. Take
32582# advantage of any shell optimizations that allow amortized linear growth over
32583# repeated appends, instead of the typical quadratic growth present in naive
32584# implementations.
32585if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32586  eval 'as_fn_append ()
32587  {
32588    eval $1+=\$2
32589  }'
32590else
32591  as_fn_append ()
32592  {
32593    eval $1=\$$1\$2
32594  }
32595fi # as_fn_append
32596
32597# as_fn_arith ARG...
32598# ------------------
32599# Perform arithmetic evaluation on the ARGs, and store the result in the
32600# global $as_val. Take advantage of shells that can avoid forks. The arguments
32601# must be portable across $(()) and expr.
32602if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32603  eval 'as_fn_arith ()
32604  {
32605    as_val=$(( $* ))
32606  }'
32607else
32608  as_fn_arith ()
32609  {
32610    as_val=`expr "$@" || test $? -eq 1`
32611  }
32612fi # as_fn_arith
32613
32614
32615if expr a : '\(a\)' >/dev/null 2>&1 &&
32616   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32617  as_expr=expr
32618else
32619  as_expr=false
32620fi
32621
32622if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32623  as_basename=basename
32624else
32625  as_basename=false
32626fi
32627
32628if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32629  as_dirname=dirname
32630else
32631  as_dirname=false
32632fi
32633
32634as_me=`$as_basename -- "$0" ||
32635$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32636	 X"$0" : 'X\(//\)$' \| \
32637	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32638$as_echo X/"$0" |
32639    sed '/^.*\/\([^/][^/]*\)\/*$/{
32640	    s//\1/
32641	    q
32642	  }
32643	  /^X\/\(\/\/\)$/{
32644	    s//\1/
32645	    q
32646	  }
32647	  /^X\/\(\/\).*/{
32648	    s//\1/
32649	    q
32650	  }
32651	  s/.*/./; q'`
32652
32653# Avoid depending upon Character Ranges.
32654as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32655as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32656as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32657as_cr_digits='0123456789'
32658as_cr_alnum=$as_cr_Letters$as_cr_digits
32659
32660ECHO_C= ECHO_N= ECHO_T=
32661case `echo -n x` in #(((((
32662-n*)
32663  case `echo 'xy\c'` in
32664  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32665  xy)  ECHO_C='\c';;
32666  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32667       ECHO_T='	';;
32668  esac;;
32669*)
32670  ECHO_N='-n';;
32671esac
32672
32673rm -f conf$$ conf$$.exe conf$$.file
32674if test -d conf$$.dir; then
32675  rm -f conf$$.dir/conf$$.file
32676else
32677  rm -f conf$$.dir
32678  mkdir conf$$.dir 2>/dev/null
32679fi
32680if (echo >conf$$.file) 2>/dev/null; then
32681  if ln -s conf$$.file conf$$ 2>/dev/null; then
32682    as_ln_s='ln -s'
32683    # ... but there are two gotchas:
32684    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32685    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32686    # In both cases, we have to default to `cp -p'.
32687    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32688      as_ln_s='cp -p'
32689  elif ln conf$$.file conf$$ 2>/dev/null; then
32690    as_ln_s=ln
32691  else
32692    as_ln_s='cp -p'
32693  fi
32694else
32695  as_ln_s='cp -p'
32696fi
32697rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32698rmdir conf$$.dir 2>/dev/null
32699
32700
32701# as_fn_mkdir_p
32702# -------------
32703# Create "$as_dir" as a directory, including parents if necessary.
32704as_fn_mkdir_p ()
32705{
32706
32707  case $as_dir in #(
32708  -*) as_dir=./$as_dir;;
32709  esac
32710  test -d "$as_dir" || eval $as_mkdir_p || {
32711    as_dirs=
32712    while :; do
32713      case $as_dir in #(
32714      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32715      *) as_qdir=$as_dir;;
32716      esac
32717      as_dirs="'$as_qdir' $as_dirs"
32718      as_dir=`$as_dirname -- "$as_dir" ||
32719$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32720	 X"$as_dir" : 'X\(//\)[^/]' \| \
32721	 X"$as_dir" : 'X\(//\)$' \| \
32722	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32723$as_echo X"$as_dir" |
32724    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32725	    s//\1/
32726	    q
32727	  }
32728	  /^X\(\/\/\)[^/].*/{
32729	    s//\1/
32730	    q
32731	  }
32732	  /^X\(\/\/\)$/{
32733	    s//\1/
32734	    q
32735	  }
32736	  /^X\(\/\).*/{
32737	    s//\1/
32738	    q
32739	  }
32740	  s/.*/./; q'`
32741      test -d "$as_dir" && break
32742    done
32743    test -z "$as_dirs" || eval "mkdir $as_dirs"
32744  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32745
32746
32747} # as_fn_mkdir_p
32748if mkdir -p . 2>/dev/null; then
32749  as_mkdir_p='mkdir -p "$as_dir"'
32750else
32751  test -d ./-p && rmdir ./-p
32752  as_mkdir_p=false
32753fi
32754
32755if test -x / >/dev/null 2>&1; then
32756  as_test_x='test -x'
32757else
32758  if ls -dL / >/dev/null 2>&1; then
32759    as_ls_L_option=L
32760  else
32761    as_ls_L_option=
32762  fi
32763  as_test_x='
32764    eval sh -c '\''
32765      if test -d "$1"; then
32766	test -d "$1/.";
32767      else
32768	case $1 in #(
32769	-*)set "./$1";;
32770	esac;
32771	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32772	???[sx]*):;;*)false;;esac;fi
32773    '\'' sh
32774  '
32775fi
32776as_executable_p=$as_test_x
32777
32778# Sed expression to map a string onto a valid CPP name.
32779as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32780
32781# Sed expression to map a string onto a valid variable name.
32782as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32783
32784
32785exec 6>&1
32786## ----------------------------------- ##
32787## Main body of $CONFIG_STATUS script. ##
32788## ----------------------------------- ##
32789_ASEOF
32790test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32791
32792cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32793# Save the log message, to keep $0 and so on meaningful, and to
32794# report actual input values of CONFIG_FILES etc. instead of their
32795# values after options handling.
32796ac_log="
32797This file was extended by OpenJDK $as_me jdk8, which was
32798generated by GNU Autoconf 2.67.  Invocation command line was
32799
32800  CONFIG_FILES    = $CONFIG_FILES
32801  CONFIG_HEADERS  = $CONFIG_HEADERS
32802  CONFIG_LINKS    = $CONFIG_LINKS
32803  CONFIG_COMMANDS = $CONFIG_COMMANDS
32804  $ $0 $@
32805
32806on `(hostname || uname -n) 2>/dev/null | sed 1q`
32807"
32808
32809_ACEOF
32810
32811case $ac_config_files in *"
32812"*) set x $ac_config_files; shift; ac_config_files=$*;;
32813esac
32814
32815case $ac_config_headers in *"
32816"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32817esac
32818
32819
32820cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32821# Files that config.status was made for.
32822config_files="$ac_config_files"
32823config_headers="$ac_config_headers"
32824
32825_ACEOF
32826
32827cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32828ac_cs_usage="\
32829\`$as_me' instantiates files and other configuration actions
32830from templates according to the current configuration.  Unless the files
32831and actions are specified as TAGs, all are instantiated by default.
32832
32833Usage: $0 [OPTION]... [TAG]...
32834
32835  -h, --help       print this help, then exit
32836  -V, --version    print version number and configuration settings, then exit
32837      --config     print configuration, then exit
32838  -q, --quiet, --silent
32839                   do not print progress messages
32840  -d, --debug      don't remove temporary files
32841      --recheck    update $as_me by reconfiguring in the same conditions
32842      --file=FILE[:TEMPLATE]
32843                   instantiate the configuration file FILE
32844      --header=FILE[:TEMPLATE]
32845                   instantiate the configuration header FILE
32846
32847Configuration files:
32848$config_files
32849
32850Configuration headers:
32851$config_headers
32852
32853Report bugs to <build-dev@openjdk.java.net>.
32854OpenJDK home page: <http://openjdk.java.net>."
32855
32856_ACEOF
32857cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32858ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32859ac_cs_version="\\
32860OpenJDK config.status jdk8
32861configured by $0, generated by GNU Autoconf 2.67,
32862  with options \\"\$ac_cs_config\\"
32863
32864Copyright (C) 2010 Free Software Foundation, Inc.
32865This config.status script is free software; the Free Software Foundation
32866gives unlimited permission to copy, distribute and modify it."
32867
32868ac_pwd='$ac_pwd'
32869srcdir='$srcdir'
32870AWK='$AWK'
32871test -n "\$AWK" || AWK=awk
32872_ACEOF
32873
32874cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32875# The default lists apply if the user does not specify any file.
32876ac_need_defaults=:
32877while test $# != 0
32878do
32879  case $1 in
32880  --*=?*)
32881    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32882    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32883    ac_shift=:
32884    ;;
32885  --*=)
32886    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32887    ac_optarg=
32888    ac_shift=:
32889    ;;
32890  *)
32891    ac_option=$1
32892    ac_optarg=$2
32893    ac_shift=shift
32894    ;;
32895  esac
32896
32897  case $ac_option in
32898  # Handling of the options.
32899  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32900    ac_cs_recheck=: ;;
32901  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32902    $as_echo "$ac_cs_version"; exit ;;
32903  --config | --confi | --conf | --con | --co | --c )
32904    $as_echo "$ac_cs_config"; exit ;;
32905  --debug | --debu | --deb | --de | --d | -d )
32906    debug=: ;;
32907  --file | --fil | --fi | --f )
32908    $ac_shift
32909    case $ac_optarg in
32910    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32911    '') as_fn_error $? "missing file argument" ;;
32912    esac
32913    as_fn_append CONFIG_FILES " '$ac_optarg'"
32914    ac_need_defaults=false;;
32915  --header | --heade | --head | --hea )
32916    $ac_shift
32917    case $ac_optarg in
32918    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32919    esac
32920    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32921    ac_need_defaults=false;;
32922  --he | --h)
32923    # Conflict between --help and --header
32924    as_fn_error $? "ambiguous option: \`$1'
32925Try \`$0 --help' for more information.";;
32926  --help | --hel | -h )
32927    $as_echo "$ac_cs_usage"; exit ;;
32928  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32929  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32930    ac_cs_silent=: ;;
32931
32932  # This is an error.
32933  -*) as_fn_error $? "unrecognized option: \`$1'
32934Try \`$0 --help' for more information." ;;
32935
32936  *) as_fn_append ac_config_targets " $1"
32937     ac_need_defaults=false ;;
32938
32939  esac
32940  shift
32941done
32942
32943ac_configure_extra_args=
32944
32945if $ac_cs_silent; then
32946  exec 6>/dev/null
32947  ac_configure_extra_args="$ac_configure_extra_args --silent"
32948fi
32949
32950_ACEOF
32951cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32952if \$ac_cs_recheck; then
32953  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32954  shift
32955  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32956  CONFIG_SHELL='$SHELL'
32957  export CONFIG_SHELL
32958  exec "\$@"
32959fi
32960
32961_ACEOF
32962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32963exec 5>>config.log
32964{
32965  echo
32966  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32967## Running $as_me. ##
32968_ASBOX
32969  $as_echo "$ac_log"
32970} >&5
32971
32972_ACEOF
32973cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32974_ACEOF
32975
32976cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32977
32978# Handling of arguments.
32979for ac_config_target in $ac_config_targets
32980do
32981  case $ac_config_target in
32982    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32983    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32984    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32985    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32986    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32987    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32988    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32989
32990  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32991  esac
32992done
32993
32994
32995# If the user did not use the arguments to specify the items to instantiate,
32996# then the envvar interface is used.  Set only those that are not.
32997# We use the long form for the default assignment because of an extremely
32998# bizarre bug on SunOS 4.1.3.
32999if $ac_need_defaults; then
33000  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33001  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33002fi
33003
33004# Have a temporary directory for convenience.  Make it in the build tree
33005# simply because there is no reason against having it here, and in addition,
33006# creating and moving files from /tmp can sometimes cause problems.
33007# Hook for its removal unless debugging.
33008# Note that there is a small window in which the directory will not be cleaned:
33009# after its creation but before its name has been assigned to `$tmp'.
33010$debug ||
33011{
33012  tmp=
33013  trap 'exit_status=$?
33014  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
33015' 0
33016  trap 'as_fn_exit 1' 1 2 13 15
33017}
33018# Create a (secure) tmp directory for tmp files.
33019
33020{
33021  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33022  test -n "$tmp" && test -d "$tmp"
33023}  ||
33024{
33025  tmp=./conf$$-$RANDOM
33026  (umask 077 && mkdir "$tmp")
33027} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33028
33029# Set up the scripts for CONFIG_FILES section.
33030# No need to generate them if there are no CONFIG_FILES.
33031# This happens for instance with `./config.status config.h'.
33032if test -n "$CONFIG_FILES"; then
33033
33034
33035ac_cr=`echo X | tr X '\015'`
33036# On cygwin, bash can eat \r inside `` if the user requested igncr.
33037# But we know of no other shell where ac_cr would be empty at this
33038# point, so we can use a bashism as a fallback.
33039if test "x$ac_cr" = x; then
33040  eval ac_cr=\$\'\\r\'
33041fi
33042ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33043if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33044  ac_cs_awk_cr='\\r'
33045else
33046  ac_cs_awk_cr=$ac_cr
33047fi
33048
33049echo 'BEGIN {' >"$tmp/subs1.awk" &&
33050_ACEOF
33051
33052
33053{
33054  echo "cat >conf$$subs.awk <<_ACEOF" &&
33055  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33056  echo "_ACEOF"
33057} >conf$$subs.sh ||
33058  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33059ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33060ac_delim='%!_!# '
33061for ac_last_try in false false false false false :; do
33062  . ./conf$$subs.sh ||
33063    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33064
33065  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33066  if test $ac_delim_n = $ac_delim_num; then
33067    break
33068  elif $ac_last_try; then
33069    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33070  else
33071    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33072  fi
33073done
33074rm -f conf$$subs.sh
33075
33076cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33077cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
33078_ACEOF
33079sed -n '
33080h
33081s/^/S["/; s/!.*/"]=/
33082p
33083g
33084s/^[^!]*!//
33085:repl
33086t repl
33087s/'"$ac_delim"'$//
33088t delim
33089:nl
33090h
33091s/\(.\{148\}\)..*/\1/
33092t more1
33093s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33094p
33095n
33096b repl
33097:more1
33098s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33099p
33100g
33101s/.\{148\}//
33102t nl
33103:delim
33104h
33105s/\(.\{148\}\)..*/\1/
33106t more2
33107s/["\\]/\\&/g; s/^/"/; s/$/"/
33108p
33109b
33110:more2
33111s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33112p
33113g
33114s/.\{148\}//
33115t delim
33116' <conf$$subs.awk | sed '
33117/^[^""]/{
33118  N
33119  s/\n//
33120}
33121' >>$CONFIG_STATUS || ac_write_fail=1
33122rm -f conf$$subs.awk
33123cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33124_ACAWK
33125cat >>"\$tmp/subs1.awk" <<_ACAWK &&
33126  for (key in S) S_is_set[key] = 1
33127  FS = ""
33128
33129}
33130{
33131  line = $ 0
33132  nfields = split(line, field, "@")
33133  substed = 0
33134  len = length(field[1])
33135  for (i = 2; i < nfields; i++) {
33136    key = field[i]
33137    keylen = length(key)
33138    if (S_is_set[key]) {
33139      value = S[key]
33140      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33141      len += length(value) + length(field[++i])
33142      substed = 1
33143    } else
33144      len += 1 + keylen
33145  }
33146
33147  print line
33148}
33149
33150_ACAWK
33151_ACEOF
33152cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33153if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33154  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33155else
33156  cat
33157fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
33158  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33159_ACEOF
33160
33161# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33162# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33163# trailing colons and then remove the whole line if VPATH becomes empty
33164# (actually we leave an empty line to preserve line numbers).
33165if test "x$srcdir" = x.; then
33166  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
33167h
33168s///
33169s/^/:/
33170s/[	 ]*$/:/
33171s/:\$(srcdir):/:/g
33172s/:\${srcdir}:/:/g
33173s/:@srcdir@:/:/g
33174s/^:*//
33175s/:*$//
33176x
33177s/\(=[	 ]*\).*/\1/
33178G
33179s/\n//
33180s/^[^=]*=[	 ]*$//
33181}'
33182fi
33183
33184cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33185fi # test -n "$CONFIG_FILES"
33186
33187# Set up the scripts for CONFIG_HEADERS section.
33188# No need to generate them if there are no CONFIG_HEADERS.
33189# This happens for instance with `./config.status Makefile'.
33190if test -n "$CONFIG_HEADERS"; then
33191cat >"$tmp/defines.awk" <<\_ACAWK ||
33192BEGIN {
33193_ACEOF
33194
33195# Transform confdefs.h into an awk script `defines.awk', embedded as
33196# here-document in config.status, that substitutes the proper values into
33197# config.h.in to produce config.h.
33198
33199# Create a delimiter string that does not exist in confdefs.h, to ease
33200# handling of long lines.
33201ac_delim='%!_!# '
33202for ac_last_try in false false :; do
33203  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
33204  if test -z "$ac_t"; then
33205    break
33206  elif $ac_last_try; then
33207    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33208  else
33209    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33210  fi
33211done
33212
33213# For the awk script, D is an array of macro values keyed by name,
33214# likewise P contains macro parameters if any.  Preserve backslash
33215# newline sequences.
33216
33217ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33218sed -n '
33219s/.\{148\}/&'"$ac_delim"'/g
33220t rset
33221:rset
33222s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
33223t def
33224d
33225:def
33226s/\\$//
33227t bsnl
33228s/["\\]/\\&/g
33229s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33230D["\1"]=" \3"/p
33231s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
33232d
33233:bsnl
33234s/["\\]/\\&/g
33235s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33236D["\1"]=" \3\\\\\\n"\\/p
33237t cont
33238s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33239t cont
33240d
33241:cont
33242n
33243s/.\{148\}/&'"$ac_delim"'/g
33244t clear
33245:clear
33246s/\\$//
33247t bsnlc
33248s/["\\]/\\&/g; s/^/"/; s/$/"/p
33249d
33250:bsnlc
33251s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33252b cont
33253' <confdefs.h | sed '
33254s/'"$ac_delim"'/"\\\
33255"/g' >>$CONFIG_STATUS || ac_write_fail=1
33256
33257cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33258  for (key in D) D_is_set[key] = 1
33259  FS = ""
33260}
33261/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33262  line = \$ 0
33263  split(line, arg, " ")
33264  if (arg[1] == "#") {
33265    defundef = arg[2]
33266    mac1 = arg[3]
33267  } else {
33268    defundef = substr(arg[1], 2)
33269    mac1 = arg[2]
33270  }
33271  split(mac1, mac2, "(") #)
33272  macro = mac2[1]
33273  prefix = substr(line, 1, index(line, defundef) - 1)
33274  if (D_is_set[macro]) {
33275    # Preserve the white space surrounding the "#".
33276    print prefix "define", macro P[macro] D[macro]
33277    next
33278  } else {
33279    # Replace #undef with comments.  This is necessary, for example,
33280    # in the case of _POSIX_SOURCE, which is predefined and required
33281    # on some systems where configure will not decide to define it.
33282    if (defundef == "undef") {
33283      print "/*", prefix defundef, macro, "*/"
33284      next
33285    }
33286  }
33287}
33288{ print }
33289_ACAWK
33290_ACEOF
33291cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33292  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33293fi # test -n "$CONFIG_HEADERS"
33294
33295
33296eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
33297shift
33298for ac_tag
33299do
33300  case $ac_tag in
33301  :[FHLC]) ac_mode=$ac_tag; continue;;
33302  esac
33303  case $ac_mode$ac_tag in
33304  :[FHL]*:*);;
33305  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
33306  :[FH]-) ac_tag=-:-;;
33307  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33308  esac
33309  ac_save_IFS=$IFS
33310  IFS=:
33311  set x $ac_tag
33312  IFS=$ac_save_IFS
33313  shift
33314  ac_file=$1
33315  shift
33316
33317  case $ac_mode in
33318  :L) ac_source=$1;;
33319  :[FH])
33320    ac_file_inputs=
33321    for ac_f
33322    do
33323      case $ac_f in
33324      -) ac_f="$tmp/stdin";;
33325      *) # Look for the file first in the build tree, then in the source tree
33326	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
33327	 # because $ac_f cannot contain `:'.
33328	 test -f "$ac_f" ||
33329	   case $ac_f in
33330	   [\\/$]*) false;;
33331	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33332	   esac ||
33333	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
33334      esac
33335      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33336      as_fn_append ac_file_inputs " '$ac_f'"
33337    done
33338
33339    # Let's still pretend it is `configure' which instantiates (i.e., don't
33340    # use $as_me), people would be surprised to read:
33341    #    /* config.h.  Generated by config.status.  */
33342    configure_input='Generated from '`
33343	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33344	`' by configure.'
33345    if test x"$ac_file" != x-; then
33346      configure_input="$ac_file.  $configure_input"
33347      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33348$as_echo "$as_me: creating $ac_file" >&6;}
33349    fi
33350    # Neutralize special characters interpreted by sed in replacement strings.
33351    case $configure_input in #(
33352    *\&* | *\|* | *\\* )
33353       ac_sed_conf_input=`$as_echo "$configure_input" |
33354       sed 's/[\\\\&|]/\\\\&/g'`;; #(
33355    *) ac_sed_conf_input=$configure_input;;
33356    esac
33357
33358    case $ac_tag in
33359    *:-:* | *:-) cat >"$tmp/stdin" \
33360      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
33361    esac
33362    ;;
33363  esac
33364
33365  ac_dir=`$as_dirname -- "$ac_file" ||
33366$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33367	 X"$ac_file" : 'X\(//\)[^/]' \| \
33368	 X"$ac_file" : 'X\(//\)$' \| \
33369	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33370$as_echo X"$ac_file" |
33371    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33372	    s//\1/
33373	    q
33374	  }
33375	  /^X\(\/\/\)[^/].*/{
33376	    s//\1/
33377	    q
33378	  }
33379	  /^X\(\/\/\)$/{
33380	    s//\1/
33381	    q
33382	  }
33383	  /^X\(\/\).*/{
33384	    s//\1/
33385	    q
33386	  }
33387	  s/.*/./; q'`
33388  as_dir="$ac_dir"; as_fn_mkdir_p
33389  ac_builddir=.
33390
33391case "$ac_dir" in
33392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33393*)
33394  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33395  # A ".." for each directory in $ac_dir_suffix.
33396  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33397  case $ac_top_builddir_sub in
33398  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33399  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33400  esac ;;
33401esac
33402ac_abs_top_builddir=$ac_pwd
33403ac_abs_builddir=$ac_pwd$ac_dir_suffix
33404# for backward compatibility:
33405ac_top_builddir=$ac_top_build_prefix
33406
33407case $srcdir in
33408  .)  # We are building in place.
33409    ac_srcdir=.
33410    ac_top_srcdir=$ac_top_builddir_sub
33411    ac_abs_top_srcdir=$ac_pwd ;;
33412  [\\/]* | ?:[\\/]* )  # Absolute name.
33413    ac_srcdir=$srcdir$ac_dir_suffix;
33414    ac_top_srcdir=$srcdir
33415    ac_abs_top_srcdir=$srcdir ;;
33416  *) # Relative name.
33417    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33418    ac_top_srcdir=$ac_top_build_prefix$srcdir
33419    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33420esac
33421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33422
33423
33424  case $ac_mode in
33425  :F)
33426  #
33427  # CONFIG_FILE
33428  #
33429
33430_ACEOF
33431
33432cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33433# If the template does not know about datarootdir, expand it.
33434# FIXME: This hack should be removed a few years after 2.60.
33435ac_datarootdir_hack=; ac_datarootdir_seen=
33436ac_sed_dataroot='
33437/datarootdir/ {
33438  p
33439  q
33440}
33441/@datadir@/p
33442/@docdir@/p
33443/@infodir@/p
33444/@localedir@/p
33445/@mandir@/p'
33446case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33447*datarootdir*) ac_datarootdir_seen=yes;;
33448*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33449  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33450$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33451_ACEOF
33452cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33453  ac_datarootdir_hack='
33454  s&@datadir@&$datadir&g
33455  s&@docdir@&$docdir&g
33456  s&@infodir@&$infodir&g
33457  s&@localedir@&$localedir&g
33458  s&@mandir@&$mandir&g
33459  s&\\\${datarootdir}&$datarootdir&g' ;;
33460esac
33461_ACEOF
33462
33463# Neutralize VPATH when `$srcdir' = `.'.
33464# Shell code in configure.ac might set extrasub.
33465# FIXME: do we really want to maintain this feature?
33466cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33467ac_sed_extra="$ac_vpsub
33468$extrasub
33469_ACEOF
33470cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33471:t
33472/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33473s|@configure_input@|$ac_sed_conf_input|;t t
33474s&@top_builddir@&$ac_top_builddir_sub&;t t
33475s&@top_build_prefix@&$ac_top_build_prefix&;t t
33476s&@srcdir@&$ac_srcdir&;t t
33477s&@abs_srcdir@&$ac_abs_srcdir&;t t
33478s&@top_srcdir@&$ac_top_srcdir&;t t
33479s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33480s&@builddir@&$ac_builddir&;t t
33481s&@abs_builddir@&$ac_abs_builddir&;t t
33482s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33483$ac_datarootdir_hack
33484"
33485eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33486  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33487
33488test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33489  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33490  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33491  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33492which seems to be undefined.  Please make sure it is defined" >&5
33493$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33494which seems to be undefined.  Please make sure it is defined" >&2;}
33495
33496  rm -f "$tmp/stdin"
33497  case $ac_file in
33498  -) cat "$tmp/out" && rm -f "$tmp/out";;
33499  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33500  esac \
33501  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33502 ;;
33503  :H)
33504  #
33505  # CONFIG_HEADER
33506  #
33507  if test x"$ac_file" != x-; then
33508    {
33509      $as_echo "/* $configure_input  */" \
33510      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33511    } >"$tmp/config.h" \
33512      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33513    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33514      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33515$as_echo "$as_me: $ac_file is unchanged" >&6;}
33516    else
33517      rm -f "$ac_file"
33518      mv "$tmp/config.h" "$ac_file" \
33519	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33520    fi
33521  else
33522    $as_echo "/* $configure_input  */" \
33523      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33524      || as_fn_error $? "could not create -" "$LINENO" 5
33525  fi
33526 ;;
33527
33528
33529  esac
33530
33531done # for ac_tag
33532
33533
33534as_fn_exit 0
33535_ACEOF
33536ac_clean_files=$ac_clean_files_save
33537
33538test $ac_write_fail = 0 ||
33539  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33540
33541
33542# configure is writing to config.log, and then calls config.status.
33543# config.status does its own redirection, appending to config.log.
33544# Unfortunately, on DOS this fails, as config.log is still kept open
33545# by configure, so config.status won't be able to write to it; its
33546# output is simply discarded.  So we exec the FD to /dev/null,
33547# effectively closing config.log, so it can be properly (re)opened and
33548# appended to by config.status.  When coming back to configure, we
33549# need to make the FD available again.
33550if test "$no_create" != yes; then
33551  ac_cs_success=:
33552  ac_config_status_args=
33553  test "$silent" = yes &&
33554    ac_config_status_args="$ac_config_status_args --quiet"
33555  exec 5>/dev/null
33556  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33557  exec 5>>config.log
33558  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33559  # would make configure fail if this is the last instruction.
33560  $ac_cs_success || as_fn_exit 1
33561fi
33562if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33563  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33564$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33565fi
33566
33567
33568# Make the compare script executable
33569$CHMOD +x $OUTPUT_ROOT/compare.sh
33570
33571# Finally output some useful information to the user
33572
33573# Finally output some useful information to the user
33574
33575if test "x$CCACHE_FOUND" != x; then
33576	if  test "x$HAS_GOOD_CCACHE" = x; then
33577		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33578		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33579	else
33580		CCACHE_STATUS="installed and in use"
33581	fi
33582else
33583	if test "x$GCC" = xyes; then
33584		CCACHE_STATUS="not installed (consider installing)"
33585		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33586	else
33587		CCACHE_STATUS="not available for your system"
33588	fi
33589fi
33590
33591printf "\n"
33592printf "====================================================\n"
33593printf "A new configuration has been successfully created in\n"
33594printf "$OUTPUT_ROOT\n"
33595if test "x$CONFIGURE_COMMAND_LINE" != x; then
33596	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33597else
33598	printf "using default settings.\n"
33599fi
33600
33601printf "\n"
33602printf "Configuration summary:\n"
33603printf "* Debug level:    $DEBUG_LEVEL\n"
33604printf "* JDK variant:    $JDK_VARIANT\n"
33605printf "* JVM variants:   $with_jvm_variants\n"
33606printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33607
33608printf "\n"
33609printf "Tools summary:\n"
33610if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33611  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33612fi
33613printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33614printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33615printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33616
33617printf "\n"
33618printf "Build performance summary:\n"
33619printf "* Cores to use:   $JOBS\n"
33620printf "* Memory limit:   $MEMORY_SIZE MB\n"
33621printf "* ccache status:  $CCACHE_STATUS\n"
33622printf "\n"
33623
33624if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33625	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33626	printf "$CCACHE_HELP_MSG\n"
33627
33628    # Print a helpful message on how to acquire the necessary build dependency.
33629    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33630    MISSING_DEPENDENCY=ccache
33631    PKGHANDLER_COMMAND=
33632
33633    case $PKGHANDLER in
33634	apt-get)
33635                apt_help     $MISSING_DEPENDENCY ;;
33636    yum)
33637                yum_help     $MISSING_DEPENDENCY ;;
33638	port)
33639                port_help    $MISSING_DEPENDENCY ;;
33640	pkgutil)
33641                pkgutil_help $MISSING_DEPENDENCY ;;
33642	pkgadd)
33643                pkgadd_help  $MISSING_DEPENDENCY ;;
33644    * )
33645      break ;;
33646    esac
33647
33648    if test "x$PKGHANDLER_COMMAND" != x; then
33649        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33650    fi
33651
33652	printf "$HELP_MSG\n"
33653	printf "\n"
33654fi
33655
33656if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33657	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33658	printf "will result in longer build times.\n"
33659	printf "\n"
33660fi
33661
33662if test "x$FOUND_ALT_VARIABLES" != "x"; then
33663	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33664	printf "These are not respected, and will be ignored. It is recommended\n"
33665	printf "that you clean your environment. The following variables are set:\n"
33666	printf "$FOUND_ALT_VARIABLES\n"
33667	printf "\n"
33668fi
33669
33670if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33671	printf "WARNING: Your build output directory is not on a local disk.\n"
33672	printf "This will severely degrade build performance!\n"
33673	printf "It is recommended that you create an output directory on a local disk,\n"
33674	printf "and run the configure script again from that directory.\n"
33675	printf "\n"
33676fi
33677
33678if test "x$IS_RECONFIGURE" = "xyes"; then
33679	printf "WARNING: The result of this configuration has overridden an older\n"
33680	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33681	printf "proper build. Failure to do so might result in strange build problems.\n"
33682	printf "\n"
33683fi
33684
33685