generated-configure.sh revision 651:980ccff2d4f5
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
728VS_PATH
729VS_LIB
730VS_INCLUDE
731CYGWIN_LINK
732AR_OUT_OPTION
733LD_OUT_OPTION
734EXE_OUT_OPTION
735CC_OUT_OPTION
736BUILD_HOTSPOT
737HOTSPOT_DIST
738BUILD_OUTPUT
739OVERRIDE_SRC_ROOT
740ADD_SRC_ROOT
741JDK_TOPDIR
742NASHORN_TOPDIR
743HOTSPOT_TOPDIR
744JAXWS_TOPDIR
745JAXP_TOPDIR
746CORBA_TOPDIR
747LANGTOOLS_TOPDIR
748BOOT_JDK_JVMARGS
749JAVAC_FLAGS
750BOOT_JDK_SOURCETARGET
751BOOT_JDK
752BOOT_TOOLSJAR
753BOOT_RTJAR
754JAVA_CHECK
755JAVAC_CHECK
756COOKED_BUILD_NUMBER
757JDK_VERSION
758COPYRIGHT_YEAR
759MACOSX_BUNDLE_ID_BASE
760MACOSX_BUNDLE_NAME_BASE
761COMPANY_NAME
762JDK_RC_PLATFORM_NAME
763PRODUCT_SUFFIX
764PRODUCT_NAME
765LAUNCHER_NAME
766MILESTONE
767JDK_BUILD_NUMBER
768JDK_UPDATE_VERSION
769JDK_MICRO_VERSION
770JDK_MINOR_VERSION
771JDK_MAJOR_VERSION
772USER_RELEASE_SUFFIX
773COMPRESS_JARS
774UNLIMITED_CRYPTO
775CACERTS_FILE
776TEST_IN_BUILD
777BUILD_HEADLESS
778SUPPORT_HEADFUL
779SUPPORT_HEADLESS
780BDEPS_FTP
781BDEPS_UNZIP
782OS_VERSION_MICRO
783OS_VERSION_MINOR
784OS_VERSION_MAJOR
785PKG_CONFIG
786TIME
787STAT
788HG
789READELF
790OTOOL
791LDD
792ZIP
793UNZIP
794FIND_DELETE
795MAKE
796CHECK_TOOLSDIR_MAKE
797CHECK_TOOLSDIR_GMAKE
798CHECK_MAKE
799CHECK_GMAKE
800PKGHANDLER
801OUTPUT_ROOT
802CONF_NAME
803SPEC
804BUILD_VARIANT_RELEASE
805DEBUG_CLASSFILES
806FASTDEBUG
807VARIANT
808DEBUG_LEVEL
809MACOSX_UNIVERSAL
810JVM_VARIANT_ZEROSHARK
811JVM_VARIANT_ZERO
812JVM_VARIANT_KERNEL
813JVM_VARIANT_MINIMAL1
814JVM_VARIANT_CLIENT
815JVM_VARIANT_SERVER
816JVM_VARIANTS
817JDK_VARIANT
818SET_OPENJDK
819BUILD_LOG_WRAPPER
820BUILD_LOG_PREVIOUS
821BUILD_LOG
822SYS_ROOT
823PATH_SEP
824SRC_ROOT
825DEFINE_CROSS_COMPILE_ARCH
826LP64
827OPENJDK_TARGET_OS_API_DIR
828OPENJDK_TARGET_CPU_JLI_CFLAGS
829OPENJDK_TARGET_CPU_OSARCH
830OPENJDK_TARGET_CPU_ISADIR
831OPENJDK_TARGET_CPU_LIBDIR
832OPENJDK_TARGET_CPU_LEGACY_LIB
833OPENJDK_TARGET_CPU_LEGACY
834REQUIRED_OS_VERSION
835REQUIRED_OS_NAME
836COMPILE_TYPE
837OPENJDK_TARGET_CPU_ENDIAN
838OPENJDK_TARGET_CPU_BITS
839OPENJDK_TARGET_CPU_ARCH
840OPENJDK_TARGET_CPU
841OPENJDK_TARGET_OS_API
842OPENJDK_TARGET_OS
843OPENJDK_BUILD_CPU_ENDIAN
844OPENJDK_BUILD_CPU_BITS
845OPENJDK_BUILD_CPU_ARCH
846OPENJDK_BUILD_CPU
847OPENJDK_BUILD_OS_API
848OPENJDK_BUILD_OS
849OPENJDK_BUILD_AUTOCONF_NAME
850OPENJDK_TARGET_AUTOCONF_NAME
851target_os
852target_vendor
853target_cpu
854target
855host_os
856host_vendor
857host_cpu
858host
859build_os
860build_vendor
861build_cpu
862build
863SETFILE
864DF
865READLINK
866CYGPATH
867NAWK
868SED
869FGREP
870EGREP
871GREP
872AWK
873XARGS
874WHICH
875WC
876UNIQ
877UNAME
878TR
879TOUCH
880TEE
881TAR
882TAIL
883SORT
884SH
885RM
886THEPWDCMD
887PRINTF
888MV
889MKTEMP
890MKDIR
891LS
892LN
893HEAD
894FIND
895FILE
896EXPR
897ECHO
898DIRNAME
899DIFF
900DATE
901CUT
902CPIO
903CP
904COMM
905CMP
906CHMOD
907CAT
908BASH
909BASENAME
910DATE_WHEN_CONFIGURED
911CONFIGURE_COMMAND_LINE
912CUSTOM_MAKE_DIR
913target_alias
914host_alias
915build_alias
916LIBS
917ECHO_T
918ECHO_N
919ECHO_C
920DEFS
921mandir
922localedir
923libdir
924psdir
925pdfdir
926dvidir
927htmldir
928infodir
929docdir
930oldincludedir
931includedir
932localstatedir
933sharedstatedir
934sysconfdir
935datadir
936datarootdir
937libexecdir
938sbindir
939bindir
940program_transform_name
941prefix
942exec_prefix
943PACKAGE_URL
944PACKAGE_BUGREPORT
945PACKAGE_STRING
946PACKAGE_VERSION
947PACKAGE_TARNAME
948PACKAGE_NAME
949PATH_SEPARATOR
950SHELL'
951ac_subst_files=''
952ac_user_opts='
953enable_option_checking
954with_custom_make_dir
955with_target_bits
956with_sys_root
957with_tools_dir
958with_devkit
959enable_openjdk_only
960with_jdk_variant
961with_jvm_variants
962enable_debug
963with_debug_level
964with_conf_name
965with_builddeps_conf
966with_builddeps_server
967with_builddeps_dir
968with_builddeps_group
969enable_headful
970enable_hotspot_test_in_build
971with_cacerts_file
972enable_unlimited_crypto
973with_milestone
974with_build_number
975with_user_release_suffix
976with_boot_jdk
977with_boot_jdk_jvmargs
978with_add_source_root
979with_override_source_root
980with_adds_and_overrides
981with_override_langtools
982with_override_corba
983with_override_jaxp
984with_override_jaxws
985with_override_hotspot
986with_override_jdk
987with_import_hotspot
988with_msvcr_dll
989with_extra_cflags
990with_extra_cxxflags
991with_extra_ldflags
992enable_debug_symbols
993enable_zip_debug_info
994enable_macosx_runtime_support
995with_x
996with_cups
997with_cups_include
998with_freetype
999with_alsa
1000with_alsa_include
1001with_alsa_lib
1002with_zlib
1003with_stdc__lib
1004with_num_cores
1005with_memory_size
1006with_jobs
1007with_sjavac_server_java
1008with_sjavac_server_cores
1009enable_sjavac
1010enable_precompiled_headers
1011enable_ccache
1012with_ccache_dir
1013'
1014      ac_precious_vars='build_alias
1015host_alias
1016target_alias
1017PKG_CONFIG
1018CC
1019CFLAGS
1020LDFLAGS
1021LIBS
1022CPPFLAGS
1023CXX
1024CXXFLAGS
1025CCC
1026OBJC
1027OBJCFLAGS
1028CPP
1029CXXCPP
1030XMKMF
1031FREETYPE2_CFLAGS
1032FREETYPE2_LIBS
1033ALSA_CFLAGS
1034ALSA_LIBS'
1035
1036
1037# Initialize some variables set by options.
1038ac_init_help=
1039ac_init_version=false
1040ac_unrecognized_opts=
1041ac_unrecognized_sep=
1042# The variables have the same names as the options, with
1043# dashes changed to underlines.
1044cache_file=/dev/null
1045exec_prefix=NONE
1046no_create=
1047no_recursion=
1048prefix=NONE
1049program_prefix=NONE
1050program_suffix=NONE
1051program_transform_name=s,x,x,
1052silent=
1053site=
1054srcdir=
1055verbose=
1056x_includes=NONE
1057x_libraries=NONE
1058
1059# Installation directory options.
1060# These are left unexpanded so users can "make install exec_prefix=/foo"
1061# and all the variables that are supposed to be based on exec_prefix
1062# by default will actually change.
1063# Use braces instead of parens because sh, perl, etc. also accept them.
1064# (The list follows the same order as the GNU Coding Standards.)
1065bindir='${exec_prefix}/bin'
1066sbindir='${exec_prefix}/sbin'
1067libexecdir='${exec_prefix}/libexec'
1068datarootdir='${prefix}/share'
1069datadir='${datarootdir}'
1070sysconfdir='${prefix}/etc'
1071sharedstatedir='${prefix}/com'
1072localstatedir='${prefix}/var'
1073includedir='${prefix}/include'
1074oldincludedir='/usr/include'
1075docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1076infodir='${datarootdir}/info'
1077htmldir='${docdir}'
1078dvidir='${docdir}'
1079pdfdir='${docdir}'
1080psdir='${docdir}'
1081libdir='${exec_prefix}/lib'
1082localedir='${datarootdir}/locale'
1083mandir='${datarootdir}/man'
1084
1085ac_prev=
1086ac_dashdash=
1087for ac_option
1088do
1089  # If the previous option needs an argument, assign it.
1090  if test -n "$ac_prev"; then
1091    eval $ac_prev=\$ac_option
1092    ac_prev=
1093    continue
1094  fi
1095
1096  case $ac_option in
1097  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1098  *=)   ac_optarg= ;;
1099  *)    ac_optarg=yes ;;
1100  esac
1101
1102  # Accept the important Cygnus configure options, so we can diagnose typos.
1103
1104  case $ac_dashdash$ac_option in
1105  --)
1106    ac_dashdash=yes ;;
1107
1108  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1109    ac_prev=bindir ;;
1110  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1111    bindir=$ac_optarg ;;
1112
1113  -build | --build | --buil | --bui | --bu)
1114    ac_prev=build_alias ;;
1115  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1116    build_alias=$ac_optarg ;;
1117
1118  -cache-file | --cache-file | --cache-fil | --cache-fi \
1119  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1120    ac_prev=cache_file ;;
1121  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1122  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1123    cache_file=$ac_optarg ;;
1124
1125  --config-cache | -C)
1126    cache_file=config.cache ;;
1127
1128  -datadir | --datadir | --datadi | --datad)
1129    ac_prev=datadir ;;
1130  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1131    datadir=$ac_optarg ;;
1132
1133  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1134  | --dataroo | --dataro | --datar)
1135    ac_prev=datarootdir ;;
1136  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1137  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1138    datarootdir=$ac_optarg ;;
1139
1140  -disable-* | --disable-*)
1141    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1142    # Reject names that are not valid shell variable names.
1143    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1144      as_fn_error $? "invalid feature name: $ac_useropt"
1145    ac_useropt_orig=$ac_useropt
1146    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1147    case $ac_user_opts in
1148      *"
1149"enable_$ac_useropt"
1150"*) ;;
1151      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1152	 ac_unrecognized_sep=', ';;
1153    esac
1154    eval enable_$ac_useropt=no ;;
1155
1156  -docdir | --docdir | --docdi | --doc | --do)
1157    ac_prev=docdir ;;
1158  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1159    docdir=$ac_optarg ;;
1160
1161  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1162    ac_prev=dvidir ;;
1163  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1164    dvidir=$ac_optarg ;;
1165
1166  -enable-* | --enable-*)
1167    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1168    # Reject names that are not valid shell variable names.
1169    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1170      as_fn_error $? "invalid feature name: $ac_useropt"
1171    ac_useropt_orig=$ac_useropt
1172    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1173    case $ac_user_opts in
1174      *"
1175"enable_$ac_useropt"
1176"*) ;;
1177      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1178	 ac_unrecognized_sep=', ';;
1179    esac
1180    eval enable_$ac_useropt=\$ac_optarg ;;
1181
1182  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1183  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1184  | --exec | --exe | --ex)
1185    ac_prev=exec_prefix ;;
1186  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1187  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1188  | --exec=* | --exe=* | --ex=*)
1189    exec_prefix=$ac_optarg ;;
1190
1191  -gas | --gas | --ga | --g)
1192    # Obsolete; use --with-gas.
1193    with_gas=yes ;;
1194
1195  -help | --help | --hel | --he | -h)
1196    ac_init_help=long ;;
1197  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1198    ac_init_help=recursive ;;
1199  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1200    ac_init_help=short ;;
1201
1202  -host | --host | --hos | --ho)
1203    ac_prev=host_alias ;;
1204  -host=* | --host=* | --hos=* | --ho=*)
1205    host_alias=$ac_optarg ;;
1206
1207  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1208    ac_prev=htmldir ;;
1209  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1210  | --ht=*)
1211    htmldir=$ac_optarg ;;
1212
1213  -includedir | --includedir | --includedi | --included | --include \
1214  | --includ | --inclu | --incl | --inc)
1215    ac_prev=includedir ;;
1216  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1217  | --includ=* | --inclu=* | --incl=* | --inc=*)
1218    includedir=$ac_optarg ;;
1219
1220  -infodir | --infodir | --infodi | --infod | --info | --inf)
1221    ac_prev=infodir ;;
1222  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1223    infodir=$ac_optarg ;;
1224
1225  -libdir | --libdir | --libdi | --libd)
1226    ac_prev=libdir ;;
1227  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1228    libdir=$ac_optarg ;;
1229
1230  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1231  | --libexe | --libex | --libe)
1232    ac_prev=libexecdir ;;
1233  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1234  | --libexe=* | --libex=* | --libe=*)
1235    libexecdir=$ac_optarg ;;
1236
1237  -localedir | --localedir | --localedi | --localed | --locale)
1238    ac_prev=localedir ;;
1239  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1240    localedir=$ac_optarg ;;
1241
1242  -localstatedir | --localstatedir | --localstatedi | --localstated \
1243  | --localstate | --localstat | --localsta | --localst | --locals)
1244    ac_prev=localstatedir ;;
1245  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1246  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1247    localstatedir=$ac_optarg ;;
1248
1249  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1250    ac_prev=mandir ;;
1251  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1252    mandir=$ac_optarg ;;
1253
1254  -nfp | --nfp | --nf)
1255    # Obsolete; use --without-fp.
1256    with_fp=no ;;
1257
1258  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1259  | --no-cr | --no-c | -n)
1260    no_create=yes ;;
1261
1262  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1263  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1264    no_recursion=yes ;;
1265
1266  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1267  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1268  | --oldin | --oldi | --old | --ol | --o)
1269    ac_prev=oldincludedir ;;
1270  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1271  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1272  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1273    oldincludedir=$ac_optarg ;;
1274
1275  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1276    ac_prev=prefix ;;
1277  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1278    prefix=$ac_optarg ;;
1279
1280  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1281  | --program-pre | --program-pr | --program-p)
1282    ac_prev=program_prefix ;;
1283  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1284  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1285    program_prefix=$ac_optarg ;;
1286
1287  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1288  | --program-suf | --program-su | --program-s)
1289    ac_prev=program_suffix ;;
1290  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1291  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1292    program_suffix=$ac_optarg ;;
1293
1294  -program-transform-name | --program-transform-name \
1295  | --program-transform-nam | --program-transform-na \
1296  | --program-transform-n | --program-transform- \
1297  | --program-transform | --program-transfor \
1298  | --program-transfo | --program-transf \
1299  | --program-trans | --program-tran \
1300  | --progr-tra | --program-tr | --program-t)
1301    ac_prev=program_transform_name ;;
1302  -program-transform-name=* | --program-transform-name=* \
1303  | --program-transform-nam=* | --program-transform-na=* \
1304  | --program-transform-n=* | --program-transform-=* \
1305  | --program-transform=* | --program-transfor=* \
1306  | --program-transfo=* | --program-transf=* \
1307  | --program-trans=* | --program-tran=* \
1308  | --progr-tra=* | --program-tr=* | --program-t=*)
1309    program_transform_name=$ac_optarg ;;
1310
1311  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1312    ac_prev=pdfdir ;;
1313  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1314    pdfdir=$ac_optarg ;;
1315
1316  -psdir | --psdir | --psdi | --psd | --ps)
1317    ac_prev=psdir ;;
1318  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1319    psdir=$ac_optarg ;;
1320
1321  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1322  | -silent | --silent | --silen | --sile | --sil)
1323    silent=yes ;;
1324
1325  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1326    ac_prev=sbindir ;;
1327  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1328  | --sbi=* | --sb=*)
1329    sbindir=$ac_optarg ;;
1330
1331  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1332  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1333  | --sharedst | --shareds | --shared | --share | --shar \
1334  | --sha | --sh)
1335    ac_prev=sharedstatedir ;;
1336  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1337  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1338  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1339  | --sha=* | --sh=*)
1340    sharedstatedir=$ac_optarg ;;
1341
1342  -site | --site | --sit)
1343    ac_prev=site ;;
1344  -site=* | --site=* | --sit=*)
1345    site=$ac_optarg ;;
1346
1347  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1348    ac_prev=srcdir ;;
1349  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1350    srcdir=$ac_optarg ;;
1351
1352  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1353  | --syscon | --sysco | --sysc | --sys | --sy)
1354    ac_prev=sysconfdir ;;
1355  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1356  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1357    sysconfdir=$ac_optarg ;;
1358
1359  -target | --target | --targe | --targ | --tar | --ta | --t)
1360    ac_prev=target_alias ;;
1361  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1362    target_alias=$ac_optarg ;;
1363
1364  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1365    verbose=yes ;;
1366
1367  -version | --version | --versio | --versi | --vers | -V)
1368    ac_init_version=: ;;
1369
1370  -with-* | --with-*)
1371    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1372    # Reject names that are not valid shell variable names.
1373    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1374      as_fn_error $? "invalid package name: $ac_useropt"
1375    ac_useropt_orig=$ac_useropt
1376    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1377    case $ac_user_opts in
1378      *"
1379"with_$ac_useropt"
1380"*) ;;
1381      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1382	 ac_unrecognized_sep=', ';;
1383    esac
1384    eval with_$ac_useropt=\$ac_optarg ;;
1385
1386  -without-* | --without-*)
1387    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1388    # Reject names that are not valid shell variable names.
1389    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1390      as_fn_error $? "invalid package name: $ac_useropt"
1391    ac_useropt_orig=$ac_useropt
1392    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1393    case $ac_user_opts in
1394      *"
1395"with_$ac_useropt"
1396"*) ;;
1397      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1398	 ac_unrecognized_sep=', ';;
1399    esac
1400    eval with_$ac_useropt=no ;;
1401
1402  --x)
1403    # Obsolete; use --with-x.
1404    with_x=yes ;;
1405
1406  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1407  | --x-incl | --x-inc | --x-in | --x-i)
1408    ac_prev=x_includes ;;
1409  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1410  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1411    x_includes=$ac_optarg ;;
1412
1413  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1414  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1415    ac_prev=x_libraries ;;
1416  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1417  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1418    x_libraries=$ac_optarg ;;
1419
1420  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1421Try \`$0 --help' for more information"
1422    ;;
1423
1424  *=*)
1425    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1426    # Reject names that are not valid shell variable names.
1427    case $ac_envvar in #(
1428      '' | [0-9]* | *[!_$as_cr_alnum]* )
1429      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1430    esac
1431    eval $ac_envvar=\$ac_optarg
1432    export $ac_envvar ;;
1433
1434  *)
1435    # FIXME: should be removed in autoconf 3.0.
1436    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1437    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1438      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1439    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1440    ;;
1441
1442  esac
1443done
1444
1445if test -n "$ac_prev"; then
1446  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1447  as_fn_error $? "missing argument to $ac_option"
1448fi
1449
1450if test -n "$ac_unrecognized_opts"; then
1451  case $enable_option_checking in
1452    no) ;;
1453    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1454    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1455  esac
1456fi
1457
1458# Check all directory arguments for consistency.
1459for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1460		datadir sysconfdir sharedstatedir localstatedir includedir \
1461		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1462		libdir localedir mandir
1463do
1464  eval ac_val=\$$ac_var
1465  # Remove trailing slashes.
1466  case $ac_val in
1467    */ )
1468      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1469      eval $ac_var=\$ac_val;;
1470  esac
1471  # Be sure to have absolute directory names.
1472  case $ac_val in
1473    [\\/$]* | ?:[\\/]* )  continue;;
1474    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1475  esac
1476  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1477done
1478
1479# There might be people who depend on the old broken behavior: `$host'
1480# used to hold the argument of --host etc.
1481# FIXME: To remove some day.
1482build=$build_alias
1483host=$host_alias
1484target=$target_alias
1485
1486# FIXME: To remove some day.
1487if test "x$host_alias" != x; then
1488  if test "x$build_alias" = x; then
1489    cross_compiling=maybe
1490    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1491    If a cross compiler is detected then cross compile mode will be used" >&2
1492  elif test "x$build_alias" != "x$host_alias"; then
1493    cross_compiling=yes
1494  fi
1495fi
1496
1497ac_tool_prefix=
1498test -n "$host_alias" && ac_tool_prefix=$host_alias-
1499
1500test "$silent" = yes && exec 6>/dev/null
1501
1502
1503ac_pwd=`pwd` && test -n "$ac_pwd" &&
1504ac_ls_di=`ls -di .` &&
1505ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1506  as_fn_error $? "working directory cannot be determined"
1507test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1508  as_fn_error $? "pwd does not report name of working directory"
1509
1510
1511# Find the source files, if location was not specified.
1512if test -z "$srcdir"; then
1513  ac_srcdir_defaulted=yes
1514  # Try the directory containing this script, then the parent directory.
1515  ac_confdir=`$as_dirname -- "$as_myself" ||
1516$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1517	 X"$as_myself" : 'X\(//\)[^/]' \| \
1518	 X"$as_myself" : 'X\(//\)$' \| \
1519	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1520$as_echo X"$as_myself" |
1521    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1522	    s//\1/
1523	    q
1524	  }
1525	  /^X\(\/\/\)[^/].*/{
1526	    s//\1/
1527	    q
1528	  }
1529	  /^X\(\/\/\)$/{
1530	    s//\1/
1531	    q
1532	  }
1533	  /^X\(\/\).*/{
1534	    s//\1/
1535	    q
1536	  }
1537	  s/.*/./; q'`
1538  srcdir=$ac_confdir
1539  if test ! -r "$srcdir/$ac_unique_file"; then
1540    srcdir=..
1541  fi
1542else
1543  ac_srcdir_defaulted=no
1544fi
1545if test ! -r "$srcdir/$ac_unique_file"; then
1546  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1547  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1548fi
1549ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1550ac_abs_confdir=`(
1551	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1552	pwd)`
1553# When building in place, set srcdir=.
1554if test "$ac_abs_confdir" = "$ac_pwd"; then
1555  srcdir=.
1556fi
1557# Remove unnecessary trailing slashes from srcdir.
1558# Double slashes in file names in object file debugging info
1559# mess up M-x gdb in Emacs.
1560case $srcdir in
1561*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1562esac
1563for ac_var in $ac_precious_vars; do
1564  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1565  eval ac_env_${ac_var}_value=\$${ac_var}
1566  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1567  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1568done
1569
1570#
1571# Report the --help message.
1572#
1573if test "$ac_init_help" = "long"; then
1574  # Omit some internal or obsolete options to make the list less imposing.
1575  # This message is too long to be a string in the A/UX 3.1 sh.
1576  cat <<_ACEOF
1577\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1578
1579Usage: $0 [OPTION]... [VAR=VALUE]...
1580
1581To assign environment variables (e.g., CC, CFLAGS...), specify them as
1582VAR=VALUE.  See below for descriptions of some of the useful variables.
1583
1584Defaults for the options are specified in brackets.
1585
1586Configuration:
1587  -h, --help              display this help and exit
1588      --help=short        display options specific to this package
1589      --help=recursive    display the short help of all the included packages
1590  -V, --version           display version information and exit
1591  -q, --quiet, --silent   do not print \`checking ...' messages
1592      --cache-file=FILE   cache test results in FILE [disabled]
1593  -C, --config-cache      alias for \`--cache-file=config.cache'
1594  -n, --no-create         do not create output files
1595      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1596
1597Installation directories:
1598  --prefix=PREFIX         install architecture-independent files in PREFIX
1599                          [$ac_default_prefix]
1600  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1601                          [PREFIX]
1602
1603By default, \`make install' will install all the files in
1604\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1605an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1606for instance \`--prefix=\$HOME'.
1607
1608For better control, use the options below.
1609
1610Fine tuning of the installation directories:
1611  --bindir=DIR            user executables [EPREFIX/bin]
1612  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1613  --libexecdir=DIR        program executables [EPREFIX/libexec]
1614  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1615  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1616  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1617  --libdir=DIR            object code libraries [EPREFIX/lib]
1618  --includedir=DIR        C header files [PREFIX/include]
1619  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1620  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1621  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1622  --infodir=DIR           info documentation [DATAROOTDIR/info]
1623  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1624  --mandir=DIR            man documentation [DATAROOTDIR/man]
1625  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1626  --htmldir=DIR           html documentation [DOCDIR]
1627  --dvidir=DIR            dvi documentation [DOCDIR]
1628  --pdfdir=DIR            pdf documentation [DOCDIR]
1629  --psdir=DIR             ps documentation [DOCDIR]
1630_ACEOF
1631
1632  cat <<\_ACEOF
1633
1634X features:
1635  --x-includes=DIR    X include files are in DIR
1636  --x-libraries=DIR   X library files are in DIR
1637
1638System types:
1639  --build=BUILD     configure for building on BUILD [guessed]
1640  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1641  --target=TARGET   configure for building compilers for TARGET [HOST]
1642_ACEOF
1643fi
1644
1645if test -n "$ac_init_help"; then
1646  case $ac_init_help in
1647     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1648   esac
1649  cat <<\_ACEOF
1650
1651Optional Features:
1652  --disable-option-checking  ignore unrecognized --enable/--with options
1653  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1654  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1655  --enable-openjdk-only   suppress building custom source even if present
1656                          [disabled]
1657  --enable-debug          set the debug level to fastdebug (shorthand for
1658                          --with-debug-level=fastdebug) [disabled]
1659  --disable-headful       disable building headful support (graphical UI
1660                          support) [enabled]
1661  --enable-hotspot-test-in-build
1662                          run the Queens test after Hotspot build [disabled]
1663  --enable-unlimited-crypto
1664                          Enable unlimited crypto policy [disabled]
1665  --disable-debug-symbols disable generation of debug symbols [enabled]
1666  --disable-zip-debug-info
1667                          disable zipping of debug-info files [enabled]
1668  --disable-macosx-runtime-support
1669                          disable the use of MacOSX Java runtime support
1670                          framework [enabled]
1671  --enable-sjavac         use sjavac to do fast incremental compiles
1672                          [disabled]
1673  --disable-precompiled-headers
1674                          disable using precompiled headers when compiling C++
1675                          [enabled]
1676  --disable-ccache        disable using ccache to speed up recompilations
1677                          [enabled]
1678
1679Optional Packages:
1680  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1681  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1682  --with-custom-make-dir  use this directory for custom build/make files
1683  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1684                          support it), e.g. --with-target-bits=32 [guessed]
1685  --with-sys-root         pass this sys-root to the compilers and tools (for
1686                          cross-compiling)
1687  --with-tools-dir        search this directory for compilers and tools (for
1688                          cross-compiling)
1689  --with-devkit           use this directory as base for tools-dir and
1690                          sys-root (for cross-compiling)
1691  --with-jdk-variant      JDK variant to build (normal) [normal]
1692  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1693                          client, minimal1, kernel, zero, zeroshark) [server]
1694  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1695                          [release]
1696  --with-conf-name        use this as the name of the configuration [generated
1697                          from important configuration options]
1698  --with-builddeps-conf   use this configuration file for the builddeps
1699  --with-builddeps-server download and use build dependencies from this server
1700                          url
1701  --with-builddeps-dir    store downloaded build dependencies here
1702                          [/localhome/builddeps]
1703  --with-builddeps-group  chgrp the downloaded build dependencies to this
1704                          group
1705  --with-cacerts-file     specify alternative cacerts file
1706  --with-milestone        Set milestone value for build [internal]
1707  --with-build-number     Set build number value for build [b00]
1708  --with-user-release-suffix
1709                          Add a custom string to the version string if build
1710                          number isn't set.[username_builddateb00]
1711  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1712  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1713                          invocations of the Boot JDK, overriding the default
1714                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1715                          -enableassertions"
1716  --with-add-source-root  for each and every source directory, look in this
1717                          additional source root for the same directory; if it
1718                          exists and have files in it, include it in the build
1719  --with-override-source-root
1720                          for each and every source directory, look in this
1721                          override source root for the same directory; if it
1722                          exists, use that directory instead and ignore the
1723                          directory in the original source root
1724  --with-adds-and-overrides
1725                          use the subdirs 'adds' and 'overrides' in the
1726                          specified directory as add-source-root and
1727                          override-source-root
1728  --with-override-langtools
1729                          use this langtools dir for the build
1730  --with-override-corba   use this corba dir for the build
1731  --with-override-jaxp    use this jaxp dir for the build
1732  --with-override-jaxws   use this jaxws dir for the build
1733  --with-override-hotspot use this hotspot dir for the build
1734  --with-override-jdk     use this jdk dir for the build
1735  --with-import-hotspot   import hotspot binaries from this jdk image or
1736                          hotspot build dist dir instead of building from
1737                          source
1738  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1739                          only) [probed]
1740  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1741  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1742  --with-extra-ldflags    extra flags to be used when linking jdk
1743  --with-x                use the X Window System
1744  --with-cups             specify prefix directory for the cups package
1745                          (expecting the headers under PATH/include)
1746  --with-cups-include     specify directory for the cups include files
1747  --with-freetype         specify prefix directory for the freetype2 package
1748                          (expecting the libraries under PATH/lib and the
1749                          headers under PATH/include)
1750  --with-alsa             specify prefix directory for the alsa package
1751                          (expecting the libraries under PATH/lib and the
1752                          headers under PATH/include)
1753  --with-alsa-include     specify directory for the alsa include files
1754  --with-alsa-lib         specify directory for the alsa library
1755  --with-zlib             use zlib from build system or OpenJDK source
1756                          (system, bundled) [bundled]
1757  --with-stdc++lib=<static>,<dynamic>,<default>
1758                          force linking of the C++ runtime on Linux to either
1759                          static or dynamic, default is static with dynamic as
1760                          fallback
1761  --with-num-cores        number of cores in the build system, e.g.
1762                          --with-num-cores=8 [probed]
1763  --with-memory-size      memory (in MB) available in the build system, e.g.
1764                          --with-memory-size=1024 [probed]
1765  --with-jobs             number of parallel jobs to let make run [calculated
1766                          based on cores and memory]
1767  --with-sjavac-server-java
1768                          use this java binary for running the sjavac
1769                          background server [Boot JDK java]
1770  --with-sjavac-server-cores
1771                          use at most this number of concurrent threads on the
1772                          sjavac server [probed]
1773  --with-ccache-dir       where to store ccache files [~/.ccache]
1774
1775Some influential environment variables:
1776  PKG_CONFIG  path to pkg-config utility
1777  CC          C compiler command
1778  CFLAGS      C compiler flags
1779  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1780              nonstandard directory <lib dir>
1781  LIBS        libraries to pass to the linker, e.g. -l<library>
1782  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1783              you have headers in a nonstandard directory <include dir>
1784  CXX         C++ compiler command
1785  CXXFLAGS    C++ compiler flags
1786  OBJC        Objective C compiler command
1787  OBJCFLAGS   Objective C compiler flags
1788  CPP         C preprocessor
1789  CXXCPP      C++ preprocessor
1790  XMKMF       Path to xmkmf, Makefile generator for X Window System
1791  FREETYPE2_CFLAGS
1792              C compiler flags for FREETYPE2, overriding pkg-config
1793  FREETYPE2_LIBS
1794              linker flags for FREETYPE2, overriding pkg-config
1795  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1796  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1797
1798Use these variables to override the choices made by `configure' or to help
1799it to find libraries and programs with nonstandard names/locations.
1800
1801Report bugs to <build-dev@openjdk.java.net>.
1802OpenJDK home page: <http://openjdk.java.net>.
1803_ACEOF
1804ac_status=$?
1805fi
1806
1807if test "$ac_init_help" = "recursive"; then
1808  # If there are subdirs, report their specific --help.
1809  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1810    test -d "$ac_dir" ||
1811      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1812      continue
1813    ac_builddir=.
1814
1815case "$ac_dir" in
1816.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1817*)
1818  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1819  # A ".." for each directory in $ac_dir_suffix.
1820  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1821  case $ac_top_builddir_sub in
1822  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1823  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1824  esac ;;
1825esac
1826ac_abs_top_builddir=$ac_pwd
1827ac_abs_builddir=$ac_pwd$ac_dir_suffix
1828# for backward compatibility:
1829ac_top_builddir=$ac_top_build_prefix
1830
1831case $srcdir in
1832  .)  # We are building in place.
1833    ac_srcdir=.
1834    ac_top_srcdir=$ac_top_builddir_sub
1835    ac_abs_top_srcdir=$ac_pwd ;;
1836  [\\/]* | ?:[\\/]* )  # Absolute name.
1837    ac_srcdir=$srcdir$ac_dir_suffix;
1838    ac_top_srcdir=$srcdir
1839    ac_abs_top_srcdir=$srcdir ;;
1840  *) # Relative name.
1841    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1842    ac_top_srcdir=$ac_top_build_prefix$srcdir
1843    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1844esac
1845ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1846
1847    cd "$ac_dir" || { ac_status=$?; continue; }
1848    # Check for guested configure.
1849    if test -f "$ac_srcdir/configure.gnu"; then
1850      echo &&
1851      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1852    elif test -f "$ac_srcdir/configure"; then
1853      echo &&
1854      $SHELL "$ac_srcdir/configure" --help=recursive
1855    else
1856      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1857    fi || ac_status=$?
1858    cd "$ac_pwd" || { ac_status=$?; break; }
1859  done
1860fi
1861
1862test -n "$ac_init_help" && exit $ac_status
1863if $ac_init_version; then
1864  cat <<\_ACEOF
1865OpenJDK configure jdk8
1866generated by GNU Autoconf 2.67
1867
1868Copyright (C) 2010 Free Software Foundation, Inc.
1869This configure script is free software; the Free Software Foundation
1870gives unlimited permission to copy, distribute and modify it.
1871_ACEOF
1872  exit
1873fi
1874
1875## ------------------------ ##
1876## Autoconf initialization. ##
1877## ------------------------ ##
1878
1879# ac_fn_c_try_compile LINENO
1880# --------------------------
1881# Try to compile conftest.$ac_ext, and return whether this succeeded.
1882ac_fn_c_try_compile ()
1883{
1884  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1885  rm -f conftest.$ac_objext
1886  if { { ac_try="$ac_compile"
1887case "(($ac_try" in
1888  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1889  *) ac_try_echo=$ac_try;;
1890esac
1891eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1892$as_echo "$ac_try_echo"; } >&5
1893  (eval "$ac_compile") 2>conftest.err
1894  ac_status=$?
1895  if test -s conftest.err; then
1896    grep -v '^ *+' conftest.err >conftest.er1
1897    cat conftest.er1 >&5
1898    mv -f conftest.er1 conftest.err
1899  fi
1900  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1901  test $ac_status = 0; } && {
1902	 test -z "$ac_c_werror_flag" ||
1903	 test ! -s conftest.err
1904       } && test -s conftest.$ac_objext; then :
1905  ac_retval=0
1906else
1907  $as_echo "$as_me: failed program was:" >&5
1908sed 's/^/| /' conftest.$ac_ext >&5
1909
1910	ac_retval=1
1911fi
1912  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1913  as_fn_set_status $ac_retval
1914
1915} # ac_fn_c_try_compile
1916
1917# ac_fn_cxx_try_compile LINENO
1918# ----------------------------
1919# Try to compile conftest.$ac_ext, and return whether this succeeded.
1920ac_fn_cxx_try_compile ()
1921{
1922  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1923  rm -f conftest.$ac_objext
1924  if { { ac_try="$ac_compile"
1925case "(($ac_try" in
1926  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1927  *) ac_try_echo=$ac_try;;
1928esac
1929eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1930$as_echo "$ac_try_echo"; } >&5
1931  (eval "$ac_compile") 2>conftest.err
1932  ac_status=$?
1933  if test -s conftest.err; then
1934    grep -v '^ *+' conftest.err >conftest.er1
1935    cat conftest.er1 >&5
1936    mv -f conftest.er1 conftest.err
1937  fi
1938  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1939  test $ac_status = 0; } && {
1940	 test -z "$ac_cxx_werror_flag" ||
1941	 test ! -s conftest.err
1942       } && test -s conftest.$ac_objext; then :
1943  ac_retval=0
1944else
1945  $as_echo "$as_me: failed program was:" >&5
1946sed 's/^/| /' conftest.$ac_ext >&5
1947
1948	ac_retval=1
1949fi
1950  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1951  as_fn_set_status $ac_retval
1952
1953} # ac_fn_cxx_try_compile
1954
1955# ac_fn_objc_try_compile LINENO
1956# -----------------------------
1957# Try to compile conftest.$ac_ext, and return whether this succeeded.
1958ac_fn_objc_try_compile ()
1959{
1960  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1961  rm -f conftest.$ac_objext
1962  if { { ac_try="$ac_compile"
1963case "(($ac_try" in
1964  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1965  *) ac_try_echo=$ac_try;;
1966esac
1967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1968$as_echo "$ac_try_echo"; } >&5
1969  (eval "$ac_compile") 2>conftest.err
1970  ac_status=$?
1971  if test -s conftest.err; then
1972    grep -v '^ *+' conftest.err >conftest.er1
1973    cat conftest.er1 >&5
1974    mv -f conftest.er1 conftest.err
1975  fi
1976  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1977  test $ac_status = 0; } && {
1978	 test -z "$ac_objc_werror_flag" ||
1979	 test ! -s conftest.err
1980       } && test -s conftest.$ac_objext; then :
1981  ac_retval=0
1982else
1983  $as_echo "$as_me: failed program was:" >&5
1984sed 's/^/| /' conftest.$ac_ext >&5
1985
1986	ac_retval=1
1987fi
1988  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1989  as_fn_set_status $ac_retval
1990
1991} # ac_fn_objc_try_compile
1992
1993# ac_fn_c_try_cpp LINENO
1994# ----------------------
1995# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1996ac_fn_c_try_cpp ()
1997{
1998  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999  if { { ac_try="$ac_cpp conftest.$ac_ext"
2000case "(($ac_try" in
2001  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2002  *) ac_try_echo=$ac_try;;
2003esac
2004eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2005$as_echo "$ac_try_echo"; } >&5
2006  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2007  ac_status=$?
2008  if test -s conftest.err; then
2009    grep -v '^ *+' conftest.err >conftest.er1
2010    cat conftest.er1 >&5
2011    mv -f conftest.er1 conftest.err
2012  fi
2013  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2014  test $ac_status = 0; } > conftest.i && {
2015	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2016	 test ! -s conftest.err
2017       }; then :
2018  ac_retval=0
2019else
2020  $as_echo "$as_me: failed program was:" >&5
2021sed 's/^/| /' conftest.$ac_ext >&5
2022
2023    ac_retval=1
2024fi
2025  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2026  as_fn_set_status $ac_retval
2027
2028} # ac_fn_c_try_cpp
2029
2030# ac_fn_cxx_try_cpp LINENO
2031# ------------------------
2032# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2033ac_fn_cxx_try_cpp ()
2034{
2035  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036  if { { ac_try="$ac_cpp conftest.$ac_ext"
2037case "(($ac_try" in
2038  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2039  *) ac_try_echo=$ac_try;;
2040esac
2041eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2042$as_echo "$ac_try_echo"; } >&5
2043  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2044  ac_status=$?
2045  if test -s conftest.err; then
2046    grep -v '^ *+' conftest.err >conftest.er1
2047    cat conftest.er1 >&5
2048    mv -f conftest.er1 conftest.err
2049  fi
2050  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2051  test $ac_status = 0; } > conftest.i && {
2052	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2053	 test ! -s conftest.err
2054       }; then :
2055  ac_retval=0
2056else
2057  $as_echo "$as_me: failed program was:" >&5
2058sed 's/^/| /' conftest.$ac_ext >&5
2059
2060    ac_retval=1
2061fi
2062  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2063  as_fn_set_status $ac_retval
2064
2065} # ac_fn_cxx_try_cpp
2066
2067# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2068# ---------------------------------------------------------
2069# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2070# the include files in INCLUDES and setting the cache variable VAR
2071# accordingly.
2072ac_fn_cxx_check_header_mongrel ()
2073{
2074  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075  if eval "test \"\${$3+set}\"" = set; then :
2076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2077$as_echo_n "checking for $2... " >&6; }
2078if eval "test \"\${$3+set}\"" = set; then :
2079  $as_echo_n "(cached) " >&6
2080fi
2081eval ac_res=\$$3
2082	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2083$as_echo "$ac_res" >&6; }
2084else
2085  # Is the header compilable?
2086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2087$as_echo_n "checking $2 usability... " >&6; }
2088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h.  */
2090$4
2091#include <$2>
2092_ACEOF
2093if ac_fn_cxx_try_compile "$LINENO"; then :
2094  ac_header_compiler=yes
2095else
2096  ac_header_compiler=no
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2100$as_echo "$ac_header_compiler" >&6; }
2101
2102# Is the header present?
2103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2104$as_echo_n "checking $2 presence... " >&6; }
2105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h.  */
2107#include <$2>
2108_ACEOF
2109if ac_fn_cxx_try_cpp "$LINENO"; then :
2110  ac_header_preproc=yes
2111else
2112  ac_header_preproc=no
2113fi
2114rm -f conftest.err conftest.i conftest.$ac_ext
2115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2116$as_echo "$ac_header_preproc" >&6; }
2117
2118# So?  What about this header?
2119case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2120  yes:no: )
2121    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2122$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2123    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2124$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2125    ;;
2126  no:yes:* )
2127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2128$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2129    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2130$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2131    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2132$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2133    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2134$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2135    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2136$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2137( $as_echo "## ----------------------------------------- ##
2138## Report this to build-dev@openjdk.java.net ##
2139## ----------------------------------------- ##"
2140     ) | sed "s/^/$as_me: WARNING:     /" >&2
2141    ;;
2142esac
2143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2144$as_echo_n "checking for $2... " >&6; }
2145if eval "test \"\${$3+set}\"" = set; then :
2146  $as_echo_n "(cached) " >&6
2147else
2148  eval "$3=\$ac_header_compiler"
2149fi
2150eval ac_res=\$$3
2151	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2152$as_echo "$ac_res" >&6; }
2153fi
2154  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2155
2156} # ac_fn_cxx_check_header_mongrel
2157
2158# ac_fn_cxx_try_run LINENO
2159# ------------------------
2160# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2161# that executables *can* be run.
2162ac_fn_cxx_try_run ()
2163{
2164  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2165  if { { ac_try="$ac_link"
2166case "(($ac_try" in
2167  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2168  *) ac_try_echo=$ac_try;;
2169esac
2170eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2171$as_echo "$ac_try_echo"; } >&5
2172  (eval "$ac_link") 2>&5
2173  ac_status=$?
2174  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2175  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2176  { { case "(($ac_try" in
2177  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2178  *) ac_try_echo=$ac_try;;
2179esac
2180eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2181$as_echo "$ac_try_echo"; } >&5
2182  (eval "$ac_try") 2>&5
2183  ac_status=$?
2184  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2185  test $ac_status = 0; }; }; then :
2186  ac_retval=0
2187else
2188  $as_echo "$as_me: program exited with status $ac_status" >&5
2189       $as_echo "$as_me: failed program was:" >&5
2190sed 's/^/| /' conftest.$ac_ext >&5
2191
2192       ac_retval=$ac_status
2193fi
2194  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2195  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2196  as_fn_set_status $ac_retval
2197
2198} # ac_fn_cxx_try_run
2199
2200# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2201# ---------------------------------------------------------
2202# Tests whether HEADER exists and can be compiled using the include files in
2203# INCLUDES, setting the cache variable VAR accordingly.
2204ac_fn_cxx_check_header_compile ()
2205{
2206  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2208$as_echo_n "checking for $2... " >&6; }
2209if eval "test \"\${$3+set}\"" = set; then :
2210  $as_echo_n "(cached) " >&6
2211else
2212  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213/* end confdefs.h.  */
2214$4
2215#include <$2>
2216_ACEOF
2217if ac_fn_cxx_try_compile "$LINENO"; then :
2218  eval "$3=yes"
2219else
2220  eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2223fi
2224eval ac_res=\$$3
2225	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2226$as_echo "$ac_res" >&6; }
2227  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2228
2229} # ac_fn_cxx_check_header_compile
2230
2231# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2232# ----------------------------------------------
2233# Tries to find the compile-time value of EXPR in a program that includes
2234# INCLUDES, setting VAR accordingly. Returns whether the value could be
2235# computed
2236ac_fn_cxx_compute_int ()
2237{
2238  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239  if test "$cross_compiling" = yes; then
2240    # Depending upon the size, compute the lo and hi bounds.
2241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h.  */
2243$4
2244int
2245main ()
2246{
2247static int test_array [1 - 2 * !(($2) >= 0)];
2248test_array [0] = 0
2249
2250  ;
2251  return 0;
2252}
2253_ACEOF
2254if ac_fn_cxx_try_compile "$LINENO"; then :
2255  ac_lo=0 ac_mid=0
2256  while :; do
2257    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2258/* end confdefs.h.  */
2259$4
2260int
2261main ()
2262{
2263static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2264test_array [0] = 0
2265
2266  ;
2267  return 0;
2268}
2269_ACEOF
2270if ac_fn_cxx_try_compile "$LINENO"; then :
2271  ac_hi=$ac_mid; break
2272else
2273  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2274			if test $ac_lo -le $ac_mid; then
2275			  ac_lo= ac_hi=
2276			  break
2277			fi
2278			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281  done
2282else
2283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2284/* end confdefs.h.  */
2285$4
2286int
2287main ()
2288{
2289static int test_array [1 - 2 * !(($2) < 0)];
2290test_array [0] = 0
2291
2292  ;
2293  return 0;
2294}
2295_ACEOF
2296if ac_fn_cxx_try_compile "$LINENO"; then :
2297  ac_hi=-1 ac_mid=-1
2298  while :; do
2299    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h.  */
2301$4
2302int
2303main ()
2304{
2305static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2306test_array [0] = 0
2307
2308  ;
2309  return 0;
2310}
2311_ACEOF
2312if ac_fn_cxx_try_compile "$LINENO"; then :
2313  ac_lo=$ac_mid; break
2314else
2315  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2316			if test $ac_mid -le $ac_hi; then
2317			  ac_lo= ac_hi=
2318			  break
2319			fi
2320			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323  done
2324else
2325  ac_lo= ac_hi=
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330# Binary search between lo and hi bounds.
2331while test "x$ac_lo" != "x$ac_hi"; do
2332  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2334/* end confdefs.h.  */
2335$4
2336int
2337main ()
2338{
2339static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2340test_array [0] = 0
2341
2342  ;
2343  return 0;
2344}
2345_ACEOF
2346if ac_fn_cxx_try_compile "$LINENO"; then :
2347  ac_hi=$ac_mid
2348else
2349  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2350fi
2351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2352done
2353case $ac_lo in #((
2354?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2355'') ac_retval=1 ;;
2356esac
2357  else
2358    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2359/* end confdefs.h.  */
2360$4
2361static long int longval () { return $2; }
2362static unsigned long int ulongval () { return $2; }
2363#include <stdio.h>
2364#include <stdlib.h>
2365int
2366main ()
2367{
2368
2369  FILE *f = fopen ("conftest.val", "w");
2370  if (! f)
2371    return 1;
2372  if (($2) < 0)
2373    {
2374      long int i = longval ();
2375      if (i != ($2))
2376	return 1;
2377      fprintf (f, "%ld", i);
2378    }
2379  else
2380    {
2381      unsigned long int i = ulongval ();
2382      if (i != ($2))
2383	return 1;
2384      fprintf (f, "%lu", i);
2385    }
2386  /* Do not output a trailing newline, as this causes \r\n confusion
2387     on some platforms.  */
2388  return ferror (f) || fclose (f) != 0;
2389
2390  ;
2391  return 0;
2392}
2393_ACEOF
2394if ac_fn_cxx_try_run "$LINENO"; then :
2395  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2396else
2397  ac_retval=1
2398fi
2399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2400  conftest.$ac_objext conftest.beam conftest.$ac_ext
2401rm -f conftest.val
2402
2403  fi
2404  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2405  as_fn_set_status $ac_retval
2406
2407} # ac_fn_cxx_compute_int
2408
2409# ac_fn_cxx_try_link LINENO
2410# -------------------------
2411# Try to link conftest.$ac_ext, and return whether this succeeded.
2412ac_fn_cxx_try_link ()
2413{
2414  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415  rm -f conftest.$ac_objext conftest$ac_exeext
2416  if { { ac_try="$ac_link"
2417case "(($ac_try" in
2418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2419  *) ac_try_echo=$ac_try;;
2420esac
2421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2422$as_echo "$ac_try_echo"; } >&5
2423  (eval "$ac_link") 2>conftest.err
2424  ac_status=$?
2425  if test -s conftest.err; then
2426    grep -v '^ *+' conftest.err >conftest.er1
2427    cat conftest.er1 >&5
2428    mv -f conftest.er1 conftest.err
2429  fi
2430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2431  test $ac_status = 0; } && {
2432	 test -z "$ac_cxx_werror_flag" ||
2433	 test ! -s conftest.err
2434       } && test -s conftest$ac_exeext && {
2435	 test "$cross_compiling" = yes ||
2436	 $as_test_x conftest$ac_exeext
2437       }; then :
2438  ac_retval=0
2439else
2440  $as_echo "$as_me: failed program was:" >&5
2441sed 's/^/| /' conftest.$ac_ext >&5
2442
2443	ac_retval=1
2444fi
2445  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2446  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2447  # interfere with the next link command; also delete a directory that is
2448  # left behind by Apple's compiler.  We do this before executing the actions.
2449  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2450  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2451  as_fn_set_status $ac_retval
2452
2453} # ac_fn_cxx_try_link
2454
2455# ac_fn_cxx_check_func LINENO FUNC VAR
2456# ------------------------------------
2457# Tests whether FUNC exists, setting the cache variable VAR accordingly
2458ac_fn_cxx_check_func ()
2459{
2460  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2462$as_echo_n "checking for $2... " >&6; }
2463if eval "test \"\${$3+set}\"" = set; then :
2464  $as_echo_n "(cached) " >&6
2465else
2466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2467/* end confdefs.h.  */
2468/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2469   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2470#define $2 innocuous_$2
2471
2472/* System header to define __stub macros and hopefully few prototypes,
2473    which can conflict with char $2 (); below.
2474    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2475    <limits.h> exists even on freestanding compilers.  */
2476
2477#ifdef __STDC__
2478# include <limits.h>
2479#else
2480# include <assert.h>
2481#endif
2482
2483#undef $2
2484
2485/* Override any GCC internal prototype to avoid an error.
2486   Use char because int might match the return type of a GCC
2487   builtin and then its argument prototype would still apply.  */
2488#ifdef __cplusplus
2489extern "C"
2490#endif
2491char $2 ();
2492/* The GNU C library defines this for functions which it implements
2493    to always fail with ENOSYS.  Some functions are actually named
2494    something starting with __ and the normal name is an alias.  */
2495#if defined __stub_$2 || defined __stub___$2
2496choke me
2497#endif
2498
2499int
2500main ()
2501{
2502return $2 ();
2503  ;
2504  return 0;
2505}
2506_ACEOF
2507if ac_fn_cxx_try_link "$LINENO"; then :
2508  eval "$3=yes"
2509else
2510  eval "$3=no"
2511fi
2512rm -f core conftest.err conftest.$ac_objext \
2513    conftest$ac_exeext conftest.$ac_ext
2514fi
2515eval ac_res=\$$3
2516	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2517$as_echo "$ac_res" >&6; }
2518  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2519
2520} # ac_fn_cxx_check_func
2521
2522# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2523# -------------------------------------------------------
2524# Tests whether HEADER exists and can be compiled using the include files in
2525# INCLUDES, setting the cache variable VAR accordingly.
2526ac_fn_c_check_header_compile ()
2527{
2528  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2530$as_echo_n "checking for $2... " >&6; }
2531if eval "test \"\${$3+set}\"" = set; then :
2532  $as_echo_n "(cached) " >&6
2533else
2534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2535/* end confdefs.h.  */
2536$4
2537#include <$2>
2538_ACEOF
2539if ac_fn_c_try_compile "$LINENO"; then :
2540  eval "$3=yes"
2541else
2542  eval "$3=no"
2543fi
2544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2545fi
2546eval ac_res=\$$3
2547	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2548$as_echo "$ac_res" >&6; }
2549  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2550
2551} # ac_fn_c_check_header_compile
2552cat >config.log <<_ACEOF
2553This file contains any messages produced by compilers while
2554running configure, to aid debugging if configure makes a mistake.
2555
2556It was created by OpenJDK $as_me jdk8, which was
2557generated by GNU Autoconf 2.67.  Invocation command line was
2558
2559  $ $0 $@
2560
2561_ACEOF
2562exec 5>>config.log
2563{
2564cat <<_ASUNAME
2565## --------- ##
2566## Platform. ##
2567## --------- ##
2568
2569hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2570uname -m = `(uname -m) 2>/dev/null || echo unknown`
2571uname -r = `(uname -r) 2>/dev/null || echo unknown`
2572uname -s = `(uname -s) 2>/dev/null || echo unknown`
2573uname -v = `(uname -v) 2>/dev/null || echo unknown`
2574
2575/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2576/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2577
2578/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2579/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2580/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2581/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2582/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2583/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2584/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2585
2586_ASUNAME
2587
2588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2589for as_dir in $PATH
2590do
2591  IFS=$as_save_IFS
2592  test -z "$as_dir" && as_dir=.
2593    $as_echo "PATH: $as_dir"
2594  done
2595IFS=$as_save_IFS
2596
2597} >&5
2598
2599cat >&5 <<_ACEOF
2600
2601
2602## ----------- ##
2603## Core tests. ##
2604## ----------- ##
2605
2606_ACEOF
2607
2608
2609# Keep a trace of the command line.
2610# Strip out --no-create and --no-recursion so they do not pile up.
2611# Strip out --silent because we don't want to record it for future runs.
2612# Also quote any args containing shell meta-characters.
2613# Make two passes to allow for proper duplicate-argument suppression.
2614ac_configure_args=
2615ac_configure_args0=
2616ac_configure_args1=
2617ac_must_keep_next=false
2618for ac_pass in 1 2
2619do
2620  for ac_arg
2621  do
2622    case $ac_arg in
2623    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2624    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2625    | -silent | --silent | --silen | --sile | --sil)
2626      continue ;;
2627    *\'*)
2628      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2629    esac
2630    case $ac_pass in
2631    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2632    2)
2633      as_fn_append ac_configure_args1 " '$ac_arg'"
2634      if test $ac_must_keep_next = true; then
2635	ac_must_keep_next=false # Got value, back to normal.
2636      else
2637	case $ac_arg in
2638	  *=* | --config-cache | -C | -disable-* | --disable-* \
2639	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2640	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2641	  | -with-* | --with-* | -without-* | --without-* | --x)
2642	    case "$ac_configure_args0 " in
2643	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2644	    esac
2645	    ;;
2646	  -* ) ac_must_keep_next=true ;;
2647	esac
2648      fi
2649      as_fn_append ac_configure_args " '$ac_arg'"
2650      ;;
2651    esac
2652  done
2653done
2654{ ac_configure_args0=; unset ac_configure_args0;}
2655{ ac_configure_args1=; unset ac_configure_args1;}
2656
2657# When interrupted or exit'd, cleanup temporary files, and complete
2658# config.log.  We remove comments because anyway the quotes in there
2659# would cause problems or look ugly.
2660# WARNING: Use '\'' to represent an apostrophe within the trap.
2661# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2662trap 'exit_status=$?
2663  # Save into config.log some information that might help in debugging.
2664  {
2665    echo
2666
2667    $as_echo "## ---------------- ##
2668## Cache variables. ##
2669## ---------------- ##"
2670    echo
2671    # The following way of writing the cache mishandles newlines in values,
2672(
2673  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2674    eval ac_val=\$$ac_var
2675    case $ac_val in #(
2676    *${as_nl}*)
2677      case $ac_var in #(
2678      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2679$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2680      esac
2681      case $ac_var in #(
2682      _ | IFS | as_nl) ;; #(
2683      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2684      *) { eval $ac_var=; unset $ac_var;} ;;
2685      esac ;;
2686    esac
2687  done
2688  (set) 2>&1 |
2689    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2690    *${as_nl}ac_space=\ *)
2691      sed -n \
2692	"s/'\''/'\''\\\\'\'''\''/g;
2693	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2694      ;; #(
2695    *)
2696      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2697      ;;
2698    esac |
2699    sort
2700)
2701    echo
2702
2703    $as_echo "## ----------------- ##
2704## Output variables. ##
2705## ----------------- ##"
2706    echo
2707    for ac_var in $ac_subst_vars
2708    do
2709      eval ac_val=\$$ac_var
2710      case $ac_val in
2711      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2712      esac
2713      $as_echo "$ac_var='\''$ac_val'\''"
2714    done | sort
2715    echo
2716
2717    if test -n "$ac_subst_files"; then
2718      $as_echo "## ------------------- ##
2719## File substitutions. ##
2720## ------------------- ##"
2721      echo
2722      for ac_var in $ac_subst_files
2723      do
2724	eval ac_val=\$$ac_var
2725	case $ac_val in
2726	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2727	esac
2728	$as_echo "$ac_var='\''$ac_val'\''"
2729      done | sort
2730      echo
2731    fi
2732
2733    if test -s confdefs.h; then
2734      $as_echo "## ----------- ##
2735## confdefs.h. ##
2736## ----------- ##"
2737      echo
2738      cat confdefs.h
2739      echo
2740    fi
2741    test "$ac_signal" != 0 &&
2742      $as_echo "$as_me: caught signal $ac_signal"
2743    $as_echo "$as_me: exit $exit_status"
2744  } >&5
2745  rm -f core *.core core.conftest.* &&
2746    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2747    exit $exit_status
2748' 0
2749for ac_signal in 1 2 13 15; do
2750  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2751done
2752ac_signal=0
2753
2754# confdefs.h avoids OS command line length limits that DEFS can exceed.
2755rm -f -r conftest* confdefs.h
2756
2757$as_echo "/* confdefs.h */" > confdefs.h
2758
2759# Predefined preprocessor variables.
2760
2761cat >>confdefs.h <<_ACEOF
2762#define PACKAGE_NAME "$PACKAGE_NAME"
2763_ACEOF
2764
2765cat >>confdefs.h <<_ACEOF
2766#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2767_ACEOF
2768
2769cat >>confdefs.h <<_ACEOF
2770#define PACKAGE_VERSION "$PACKAGE_VERSION"
2771_ACEOF
2772
2773cat >>confdefs.h <<_ACEOF
2774#define PACKAGE_STRING "$PACKAGE_STRING"
2775_ACEOF
2776
2777cat >>confdefs.h <<_ACEOF
2778#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2779_ACEOF
2780
2781cat >>confdefs.h <<_ACEOF
2782#define PACKAGE_URL "$PACKAGE_URL"
2783_ACEOF
2784
2785
2786# Let the site file select an alternate cache file if it wants to.
2787# Prefer an explicitly selected file to automatically selected ones.
2788ac_site_file1=NONE
2789ac_site_file2=NONE
2790if test -n "$CONFIG_SITE"; then
2791  # We do not want a PATH search for config.site.
2792  case $CONFIG_SITE in #((
2793    -*)  ac_site_file1=./$CONFIG_SITE;;
2794    */*) ac_site_file1=$CONFIG_SITE;;
2795    *)   ac_site_file1=./$CONFIG_SITE;;
2796  esac
2797elif test "x$prefix" != xNONE; then
2798  ac_site_file1=$prefix/share/config.site
2799  ac_site_file2=$prefix/etc/config.site
2800else
2801  ac_site_file1=$ac_default_prefix/share/config.site
2802  ac_site_file2=$ac_default_prefix/etc/config.site
2803fi
2804for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2805do
2806  test "x$ac_site_file" = xNONE && continue
2807  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2808    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2809$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2810    sed 's/^/| /' "$ac_site_file" >&5
2811    . "$ac_site_file" \
2812      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2814as_fn_error $? "failed to load site script $ac_site_file
2815See \`config.log' for more details" "$LINENO" 5 ; }
2816  fi
2817done
2818
2819if test -r "$cache_file"; then
2820  # Some versions of bash will fail to source /dev/null (special files
2821  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2822  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2823    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2824$as_echo "$as_me: loading cache $cache_file" >&6;}
2825    case $cache_file in
2826      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2827      *)                      . "./$cache_file";;
2828    esac
2829  fi
2830else
2831  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2832$as_echo "$as_me: creating cache $cache_file" >&6;}
2833  >$cache_file
2834fi
2835
2836# Check that the precious variables saved in the cache have kept the same
2837# value.
2838ac_cache_corrupted=false
2839for ac_var in $ac_precious_vars; do
2840  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2841  eval ac_new_set=\$ac_env_${ac_var}_set
2842  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2843  eval ac_new_val=\$ac_env_${ac_var}_value
2844  case $ac_old_set,$ac_new_set in
2845    set,)
2846      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2847$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2848      ac_cache_corrupted=: ;;
2849    ,set)
2850      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2851$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2852      ac_cache_corrupted=: ;;
2853    ,);;
2854    *)
2855      if test "x$ac_old_val" != "x$ac_new_val"; then
2856	# differences in whitespace do not lead to failure.
2857	ac_old_val_w=`echo x $ac_old_val`
2858	ac_new_val_w=`echo x $ac_new_val`
2859	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2860	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2861$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2862	  ac_cache_corrupted=:
2863	else
2864	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2865$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2866	  eval $ac_var=\$ac_old_val
2867	fi
2868	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2869$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2870	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2871$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2872      fi;;
2873  esac
2874  # Pass precious variables to config.status.
2875  if test "$ac_new_set" = set; then
2876    case $ac_new_val in
2877    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2878    *) ac_arg=$ac_var=$ac_new_val ;;
2879    esac
2880    case " $ac_configure_args " in
2881      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2882      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2883    esac
2884  fi
2885done
2886if $ac_cache_corrupted; then
2887  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2889  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2890$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2891  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2892fi
2893## -------------------- ##
2894## Main body of script. ##
2895## -------------------- ##
2896
2897ac_ext=c
2898ac_cpp='$CPP $CPPFLAGS'
2899ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2900ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2901ac_compiler_gnu=$ac_cv_c_compiler_gnu
2902
2903
2904
2905ac_aux_dir=
2906for ac_dir in build-aux "$srcdir"/build-aux; do
2907  if test -f "$ac_dir/install-sh"; then
2908    ac_aux_dir=$ac_dir
2909    ac_install_sh="$ac_aux_dir/install-sh -c"
2910    break
2911  elif test -f "$ac_dir/install.sh"; then
2912    ac_aux_dir=$ac_dir
2913    ac_install_sh="$ac_aux_dir/install.sh -c"
2914    break
2915  elif test -f "$ac_dir/shtool"; then
2916    ac_aux_dir=$ac_dir
2917    ac_install_sh="$ac_aux_dir/shtool install -c"
2918    break
2919  fi
2920done
2921if test -z "$ac_aux_dir"; then
2922  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2923fi
2924
2925# These three variables are undocumented and unsupported,
2926# and are intended to be withdrawn in a future Autoconf release.
2927# They can cause serious problems if a builder's source tree is in a directory
2928# whose full name contains unusual characters.
2929ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2930ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2931ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2932
2933
2934# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2935
2936#
2937# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2938# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2939#
2940# This code is free software; you can redistribute it and/or modify it
2941# under the terms of the GNU General Public License version 2 only, as
2942# published by the Free Software Foundation.  Oracle designates this
2943# particular file as subject to the "Classpath" exception as provided
2944# by Oracle in the LICENSE file that accompanied this code.
2945#
2946# This code is distributed in the hope that it will be useful, but WITHOUT
2947# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2948# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2949# version 2 for more details (a copy is included in the LICENSE file that
2950# accompanied this code).
2951#
2952# You should have received a copy of the GNU General Public License version
2953# 2 along with this work; if not, write to the Free Software Foundation,
2954# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2955#
2956# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2957# or visit www.oracle.com if you need additional information or have any
2958# questions.
2959#
2960
2961#
2962# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2963#
2964# This program is free software; you can redistribute it and/or modify
2965# it under the terms of the GNU General Public License as published by
2966# the Free Software Foundation; either version 2 of the License, or
2967# (at your option) any later version.
2968#
2969# This program is distributed in the hope that it will be useful, but
2970# WITHOUT ANY WARRANTY; without even the implied warranty of
2971# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2972# General Public License for more details.
2973#
2974# You should have received a copy of the GNU General Public License
2975# along with this program; if not, write to the Free Software
2976# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2977#
2978# As a special exception to the GNU General Public License, if you
2979# distribute this file as part of a program that contains a
2980# configuration script generated by Autoconf, you may include it under
2981# the same distribution terms that you use for the rest of that program.
2982
2983# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2984# ----------------------------------
2985# PKG_PROG_PKG_CONFIG
2986
2987# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2988#
2989# Check to see whether a particular set of modules exists.  Similar
2990# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2991#
2992#
2993# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2994# this or PKG_CHECK_MODULES is called, or make sure to call
2995# PKG_CHECK_EXISTS manually
2996# --------------------------------------------------------------
2997
2998
2999
3000# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3001# ---------------------------------------------
3002# _PKG_CONFIG
3003
3004# _PKG_SHORT_ERRORS_SUPPORTED
3005# -----------------------------
3006# _PKG_SHORT_ERRORS_SUPPORTED
3007
3008
3009# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3010# [ACTION-IF-NOT-FOUND])
3011#
3012#
3013# Note that if there is a possibility the first call to
3014# PKG_CHECK_MODULES might not happen, you should be sure to include an
3015# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3016#
3017#
3018# --------------------------------------------------------------
3019# PKG_CHECK_MODULES
3020
3021
3022# Include these first...
3023#
3024# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3025# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3026#
3027# This code is free software; you can redistribute it and/or modify it
3028# under the terms of the GNU General Public License version 2 only, as
3029# published by the Free Software Foundation.  Oracle designates this
3030# particular file as subject to the "Classpath" exception as provided
3031# by Oracle in the LICENSE file that accompanied this code.
3032#
3033# This code is distributed in the hope that it will be useful, but WITHOUT
3034# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3035# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3036# version 2 for more details (a copy is included in the LICENSE file that
3037# accompanied this code).
3038#
3039# You should have received a copy of the GNU General Public License version
3040# 2 along with this work; if not, write to the Free Software Foundation,
3041# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3042#
3043# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3044# or visit www.oracle.com if you need additional information or have any
3045# questions.
3046#
3047
3048
3049
3050# This will make sure the given variable points to a full and proper
3051# path. This means:
3052# 1) There will be no spaces in the path. On posix platforms,
3053#    spaces in the path will result in an error. On Windows,
3054#    the path will be rewritten using short-style to be space-free.
3055# 2) The path will be absolute, and it will be in unix-style (on
3056#     cygwin).
3057# $1: The name of the variable to fix
3058
3059
3060# This will make sure the given variable points to a executable
3061# with a full and proper path. This means:
3062# 1) There will be no spaces in the path. On posix platforms,
3063#    spaces in the path will result in an error. On Windows,
3064#    the path will be rewritten using short-style to be space-free.
3065# 2) The path will be absolute, and it will be in unix-style (on
3066#     cygwin).
3067# Any arguments given to the executable is preserved.
3068# If the input variable does not have a directory specification, then
3069# it need to be in the PATH.
3070# $1: The name of the variable to fix
3071
3072
3073
3074
3075
3076
3077# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3078# $1: variable to check
3079# $2: executable name to print in warning (optional)
3080
3081
3082# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3083# Arguments as AC_PATH_PROG:
3084# $1: variable to set
3085# $2: executable name to look for
3086
3087
3088# Setup the most fundamental tools that relies on not much else to set up,
3089# but is used by much of the early bootstrap code.
3090
3091
3092# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3093
3094
3095
3096
3097
3098
3099
3100#%%% Simple tools %%%
3101
3102# Check if we have found a usable version of make
3103# $1: the path to a potential make binary (or empty)
3104# $2: the description on how we found this
3105
3106
3107# Goes looking for a usable version of GNU make.
3108
3109
3110
3111
3112
3113
3114# Check if build directory is on local disk. If not possible to determine,
3115# we prefer to claim it's local.
3116# Argument 1: directory to test
3117# Argument 2: what to do if it is on local disk
3118# Argument 3: what to do otherwise (remote disk or failure)
3119
3120
3121# Check that source files have basic read permissions set. This might
3122# not be the case in cygwin in certain conditions.
3123
3124
3125
3126
3127#
3128# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3129# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3130#
3131# This code is free software; you can redistribute it and/or modify it
3132# under the terms of the GNU General Public License version 2 only, as
3133# published by the Free Software Foundation.  Oracle designates this
3134# particular file as subject to the "Classpath" exception as provided
3135# by Oracle in the LICENSE file that accompanied this code.
3136#
3137# This code is distributed in the hope that it will be useful, but WITHOUT
3138# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3139# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3140# version 2 for more details (a copy is included in the LICENSE file that
3141# accompanied this code).
3142#
3143# You should have received a copy of the GNU General Public License version
3144# 2 along with this work; if not, write to the Free Software Foundation,
3145# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3146#
3147# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3148# or visit www.oracle.com if you need additional information or have any
3149# questions.
3150#
3151
3152
3153
3154
3155
3156# Helper function which possibly converts a path using DOS-style short mode.
3157# If so, the updated path is stored in $new_path.
3158# $1: The path to check
3159
3160
3161# Helper function which possibly converts a path using DOS-style short mode.
3162# If so, the updated path is stored in $new_path.
3163# $1: The path to check
3164
3165
3166# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3167# and could probably be heavily simplified. However, all changes in this
3168# area tend to need lot of testing in different scenarios, and in lack of
3169# proper unit testing, cleaning this up has not been deemed worth the effort
3170# at the moment.
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3181
3182
3183
3184
3185#
3186# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3187# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3188#
3189# This code is free software; you can redistribute it and/or modify it
3190# under the terms of the GNU General Public License version 2 only, as
3191# published by the Free Software Foundation.  Oracle designates this
3192# particular file as subject to the "Classpath" exception as provided
3193# by Oracle in the LICENSE file that accompanied this code.
3194#
3195# This code is distributed in the hope that it will be useful, but WITHOUT
3196# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3197# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3198# version 2 for more details (a copy is included in the LICENSE file that
3199# accompanied this code).
3200#
3201# You should have received a copy of the GNU General Public License version
3202# 2 along with this work; if not, write to the Free Software Foundation,
3203# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3204#
3205# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3206# or visit www.oracle.com if you need additional information or have any
3207# questions.
3208#
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220# ... then the rest
3221#
3222# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3223# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3224#
3225# This code is free software; you can redistribute it and/or modify it
3226# under the terms of the GNU General Public License version 2 only, as
3227# published by the Free Software Foundation.  Oracle designates this
3228# particular file as subject to the "Classpath" exception as provided
3229# by Oracle in the LICENSE file that accompanied this code.
3230#
3231# This code is distributed in the hope that it will be useful, but WITHOUT
3232# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3233# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3234# version 2 for more details (a copy is included in the LICENSE file that
3235# accompanied this code).
3236#
3237# You should have received a copy of the GNU General Public License version
3238# 2 along with this work; if not, write to the Free Software Foundation,
3239# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3240#
3241# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3242# or visit www.oracle.com if you need additional information or have any
3243# questions.
3244#
3245
3246# Execute the check given as argument, and verify the result
3247# If the Boot JDK was previously found, do nothing
3248# $1 A command line (typically autoconf macro) to execute
3249
3250
3251# Test: Is bootjdk explicitely set by command line arguments?
3252
3253
3254# Test: Is bootjdk available from builddeps?
3255
3256
3257# Test: Is $JAVA_HOME set?
3258
3259
3260# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3261
3262
3263# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3264
3265
3266# Look for a jdk in the given path. If there are multiple, try to select the newest.
3267# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3268# $1 = Path to directory containing jdk installations.
3269# $2 = String to append to the found JDK directory to get the proper JDK home
3270
3271
3272# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3273# environmental variable as base for where to look.
3274# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3275
3276
3277# Test: Is there a JDK installed in default, well-known locations?
3278
3279
3280# Check that a command-line tool in the Boot JDK is correct
3281# $1 = name of variable to assign
3282# $2 = name of binary
3283
3284
3285###############################################################################
3286#
3287# We need a Boot JDK to bootstrap the build.
3288#
3289
3290
3291
3292
3293
3294#
3295# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3296# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3297#
3298# This code is free software; you can redistribute it and/or modify it
3299# under the terms of the GNU General Public License version 2 only, as
3300# published by the Free Software Foundation.  Oracle designates this
3301# particular file as subject to the "Classpath" exception as provided
3302# by Oracle in the LICENSE file that accompanied this code.
3303#
3304# This code is distributed in the hope that it will be useful, but WITHOUT
3305# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3306# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3307# version 2 for more details (a copy is included in the LICENSE file that
3308# accompanied this code).
3309#
3310# You should have received a copy of the GNU General Public License version
3311# 2 along with this work; if not, write to the Free Software Foundation,
3312# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3313#
3314# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3315# or visit www.oracle.com if you need additional information or have any
3316# questions.
3317#
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338#
3339# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3340# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3341#
3342# This code is free software; you can redistribute it and/or modify it
3343# under the terms of the GNU General Public License version 2 only, as
3344# published by the Free Software Foundation.  Oracle designates this
3345# particular file as subject to the "Classpath" exception as provided
3346# by Oracle in the LICENSE file that accompanied this code.
3347#
3348# This code is distributed in the hope that it will be useful, but WITHOUT
3349# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3350# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3351# version 2 for more details (a copy is included in the LICENSE file that
3352# accompanied this code).
3353#
3354# You should have received a copy of the GNU General Public License version
3355# 2 along with this work; if not, write to the Free Software Foundation,
3356# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3357#
3358# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3359# or visit www.oracle.com if you need additional information or have any
3360# questions.
3361#
3362
3363
3364
3365
3366
3367cygwin_help() {
3368    case $1 in
3369    unzip)
3370        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3371    zip)
3372        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3373    make)
3374        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3375    * )
3376       break ;;
3377    esac
3378}
3379
3380apt_help() {
3381    case $1 in
3382    devkit)
3383        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3384    openjdk)
3385        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3386    alsa)
3387        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3388    cups)
3389        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3390    freetype2)
3391        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3392    pulse)
3393        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3394    x11)
3395        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3396    ccache)
3397        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3398    * )
3399       break ;;
3400    esac
3401}
3402
3403yum_help() {
3404    case $1 in
3405    devkit)
3406        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3407    openjdk)
3408        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3409    alsa)
3410        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3411    cups)
3412        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3413    freetype2)
3414        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3415    pulse)
3416        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3417    x11)
3418        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3419    ccache)
3420        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3421    * )
3422       break ;;
3423    esac
3424}
3425
3426port_help() {
3427    PKGHANDLER_COMMAND=""
3428}
3429
3430pkgutil_help() {
3431    PKGHANDLER_COMMAND=""
3432}
3433
3434pkgadd_help() {
3435    PKGHANDLER_COMMAND=""
3436}
3437
3438
3439
3440#
3441# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3442# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3443#
3444# This code is free software; you can redistribute it and/or modify it
3445# under the terms of the GNU General Public License version 2 only, as
3446# published by the Free Software Foundation.  Oracle designates this
3447# particular file as subject to the "Classpath" exception as provided
3448# by Oracle in the LICENSE file that accompanied this code.
3449#
3450# This code is distributed in the hope that it will be useful, but WITHOUT
3451# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3452# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3453# version 2 for more details (a copy is included in the LICENSE file that
3454# accompanied this code).
3455#
3456# You should have received a copy of the GNU General Public License version
3457# 2 along with this work; if not, write to the Free Software Foundation,
3458# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3459#
3460# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3461# or visit www.oracle.com if you need additional information or have any
3462# questions.
3463#
3464
3465
3466
3467
3468
3469
3470
3471
3472###############################################################################
3473#
3474# Should we build only OpenJDK even if closed sources are present?
3475#
3476
3477
3478
3479
3480###############################################################################
3481#
3482# Setup version numbers
3483#
3484
3485
3486
3487
3488
3489
3490# Support for customization of the build process. Some build files
3491# will include counterparts from this location, if they exist. This allows
3492# for a degree of customization of the build targets and the rules/recipes
3493# to create them
3494
3495# Check whether --with-custom-make-dir was given.
3496if test "${with_custom_make_dir+set}" = set; then :
3497  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3498fi
3499
3500
3501
3502#
3503# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3504# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3505#
3506# This code is free software; you can redistribute it and/or modify it
3507# under the terms of the GNU General Public License version 2 only, as
3508# published by the Free Software Foundation.  Oracle designates this
3509# particular file as subject to the "Classpath" exception as provided
3510# by Oracle in the LICENSE file that accompanied this code.
3511#
3512# This code is distributed in the hope that it will be useful, but WITHOUT
3513# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3514# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3515# version 2 for more details (a copy is included in the LICENSE file that
3516# accompanied this code).
3517#
3518# You should have received a copy of the GNU General Public License version
3519# 2 along with this work; if not, write to the Free Software Foundation,
3520# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3521#
3522# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3523# or visit www.oracle.com if you need additional information or have any
3524# questions.
3525#
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541#
3542# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3543# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3544#
3545# This code is free software; you can redistribute it and/or modify it
3546# under the terms of the GNU General Public License version 2 only, as
3547# published by the Free Software Foundation.  Oracle designates this
3548# particular file as subject to the "Classpath" exception as provided
3549# by Oracle in the LICENSE file that accompanied this code.
3550#
3551# This code is distributed in the hope that it will be useful, but WITHOUT
3552# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3553# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3554# version 2 for more details (a copy is included in the LICENSE file that
3555# accompanied this code).
3556#
3557# You should have received a copy of the GNU General Public License version
3558# 2 along with this work; if not, write to the Free Software Foundation,
3559# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3560#
3561# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3562# or visit www.oracle.com if you need additional information or have any
3563# questions.
3564#
3565
3566# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3567# Converts autoconf style CPU name to OpenJDK style, into
3568# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3569
3570
3571# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3572# Converts autoconf style OS name to OpenJDK style, into
3573# VAR_OS and VAR_OS_API.
3574
3575
3576# Expects $host_os $host_cpu $build_os and $build_cpu
3577# and $with_target_bits to have been setup!
3578#
3579# Translate the standard triplet(quadruplet) definition
3580# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3581# OPENJDK_BUILD_OS, etc.
3582
3583
3584# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3585# accordingly. Must be done after setting up build and target system, but before
3586# doing anything else with these values.
3587
3588
3589    # Setup the legacy variables, for controlling the old makefiles.
3590    #
3591
3592
3593
3594
3595#%%% Build and target systems %%%
3596
3597
3598
3599
3600# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3601# Add -mX to various FLAGS variables.
3602
3603
3604
3605
3606
3607
3608#
3609# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3610# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3611#
3612# This code is free software; you can redistribute it and/or modify it
3613# under the terms of the GNU General Public License version 2 only, as
3614# published by the Free Software Foundation.  Oracle designates this
3615# particular file as subject to the "Classpath" exception as provided
3616# by Oracle in the LICENSE file that accompanied this code.
3617#
3618# This code is distributed in the hope that it will be useful, but WITHOUT
3619# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3620# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3621# version 2 for more details (a copy is included in the LICENSE file that
3622# accompanied this code).
3623#
3624# You should have received a copy of the GNU General Public License version
3625# 2 along with this work; if not, write to the Free Software Foundation,
3626# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3627#
3628# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3629# or visit www.oracle.com if you need additional information or have any
3630# questions.
3631#
3632
3633
3634
3635
3636
3637
3638
3639
3640#
3641# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3642# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3643#
3644# This code is free software; you can redistribute it and/or modify it
3645# under the terms of the GNU General Public License version 2 only, as
3646# published by the Free Software Foundation.  Oracle designates this
3647# particular file as subject to the "Classpath" exception as provided
3648# by Oracle in the LICENSE file that accompanied this code.
3649#
3650# This code is distributed in the hope that it will be useful, but WITHOUT
3651# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3652# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3653# version 2 for more details (a copy is included in the LICENSE file that
3654# accompanied this code).
3655#
3656# You should have received a copy of the GNU General Public License version
3657# 2 along with this work; if not, write to the Free Software Foundation,
3658# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3659#
3660# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3661# or visit www.oracle.com if you need additional information or have any
3662# questions.
3663#
3664
3665# $1 = compiler to test (CC or CXX)
3666# $2 = human readable name of compiler (C or C++)
3667
3668
3669
3670
3671
3672# $1 = compiler to test (CC or CXX)
3673# $2 = human readable name of compiler (C or C++)
3674# $3 = list of compiler names to search for
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687#
3688# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3689# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3690#
3691# This code is free software; you can redistribute it and/or modify it
3692# under the terms of the GNU General Public License version 2 only, as
3693# published by the Free Software Foundation.  Oracle designates this
3694# particular file as subject to the "Classpath" exception as provided
3695# by Oracle in the LICENSE file that accompanied this code.
3696#
3697# This code is distributed in the hope that it will be useful, but WITHOUT
3698# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3699# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3700# version 2 for more details (a copy is included in the LICENSE file that
3701# accompanied this code).
3702#
3703# You should have received a copy of the GNU General Public License version
3704# 2 along with this work; if not, write to the Free Software Foundation,
3705# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3706#
3707# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3708# or visit www.oracle.com if you need additional information or have any
3709# questions.
3710#
3711
3712
3713
3714
3715
3716
3717
3718# Check if the VS env variables were setup prior to running configure.
3719# If not, then find vcvarsall.bat and run it automatically, and integrate
3720# the set env variables into the spec file.
3721
3722
3723
3724
3725
3726
3727# This line needs to be here, verbatim, after all includes and the dummy hook
3728# definitions. It is replaced with custom functionality when building
3729# custom sources.
3730#CUSTOM_AUTOCONF_INCLUDE
3731
3732# Do not change or remove the following line, it is needed for consistency checks:
3733DATE_WHEN_GENERATED=1362540061
3734
3735###############################################################################
3736#
3737# Initialization / Boot-strapping
3738#
3739# The bootstrapping process needs to solve the "chicken or the egg" problem,
3740# thus it jumps back and forth, each time gaining something needed later on.
3741#
3742###############################################################################
3743
3744# Basic initialization that must happen first of all
3745
3746# Save the original command line. This is passed to us by the wrapper configure script.
3747
3748DATE_WHEN_CONFIGURED=`LANG=C date`
3749
3750{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3751$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3752{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3753$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3754
3755
3756
3757# Start with tools that do not need have cross compilation support
3758# and can be expected to be found in the default PATH. These tools are
3759# used by configure. Nor are these tools expected to be found in the
3760# devkit from the builddeps server either, since they are
3761# needed to download the devkit.
3762
3763# First are all the simple required tools.
3764
3765    for ac_prog in basename
3766do
3767  # Extract the first word of "$ac_prog", so it can be a program name with args.
3768set dummy $ac_prog; ac_word=$2
3769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3770$as_echo_n "checking for $ac_word... " >&6; }
3771if test "${ac_cv_path_BASENAME+set}" = set; then :
3772  $as_echo_n "(cached) " >&6
3773else
3774  case $BASENAME in
3775  [\\/]* | ?:[\\/]*)
3776  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3777  ;;
3778  *)
3779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3780for as_dir in $PATH
3781do
3782  IFS=$as_save_IFS
3783  test -z "$as_dir" && as_dir=.
3784    for ac_exec_ext in '' $ac_executable_extensions; do
3785  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3786    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3788    break 2
3789  fi
3790done
3791  done
3792IFS=$as_save_IFS
3793
3794  ;;
3795esac
3796fi
3797BASENAME=$ac_cv_path_BASENAME
3798if test -n "$BASENAME"; then
3799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3800$as_echo "$BASENAME" >&6; }
3801else
3802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803$as_echo "no" >&6; }
3804fi
3805
3806
3807  test -n "$BASENAME" && break
3808done
3809
3810
3811    if test "x$BASENAME" = x; then
3812        if test "xbasename" = x; then
3813          PROG_NAME=basename
3814        else
3815          PROG_NAME=basename
3816        fi
3817        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3818$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3819        as_fn_error $? "Cannot continue" "$LINENO" 5
3820    fi
3821
3822
3823
3824    for ac_prog in bash
3825do
3826  # Extract the first word of "$ac_prog", so it can be a program name with args.
3827set dummy $ac_prog; ac_word=$2
3828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3829$as_echo_n "checking for $ac_word... " >&6; }
3830if test "${ac_cv_path_BASH+set}" = set; then :
3831  $as_echo_n "(cached) " >&6
3832else
3833  case $BASH in
3834  [\\/]* | ?:[\\/]*)
3835  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3836  ;;
3837  *)
3838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839for as_dir in $PATH
3840do
3841  IFS=$as_save_IFS
3842  test -z "$as_dir" && as_dir=.
3843    for ac_exec_ext in '' $ac_executable_extensions; do
3844  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3845    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3847    break 2
3848  fi
3849done
3850  done
3851IFS=$as_save_IFS
3852
3853  ;;
3854esac
3855fi
3856BASH=$ac_cv_path_BASH
3857if test -n "$BASH"; then
3858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3859$as_echo "$BASH" >&6; }
3860else
3861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3862$as_echo "no" >&6; }
3863fi
3864
3865
3866  test -n "$BASH" && break
3867done
3868
3869
3870    if test "x$BASH" = x; then
3871        if test "xbash" = x; then
3872          PROG_NAME=bash
3873        else
3874          PROG_NAME=bash
3875        fi
3876        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3877$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3878        as_fn_error $? "Cannot continue" "$LINENO" 5
3879    fi
3880
3881
3882
3883    for ac_prog in cat
3884do
3885  # Extract the first word of "$ac_prog", so it can be a program name with args.
3886set dummy $ac_prog; ac_word=$2
3887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3888$as_echo_n "checking for $ac_word... " >&6; }
3889if test "${ac_cv_path_CAT+set}" = set; then :
3890  $as_echo_n "(cached) " >&6
3891else
3892  case $CAT in
3893  [\\/]* | ?:[\\/]*)
3894  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3895  ;;
3896  *)
3897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3898for as_dir in $PATH
3899do
3900  IFS=$as_save_IFS
3901  test -z "$as_dir" && as_dir=.
3902    for ac_exec_ext in '' $ac_executable_extensions; do
3903  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3904    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3906    break 2
3907  fi
3908done
3909  done
3910IFS=$as_save_IFS
3911
3912  ;;
3913esac
3914fi
3915CAT=$ac_cv_path_CAT
3916if test -n "$CAT"; then
3917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3918$as_echo "$CAT" >&6; }
3919else
3920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3921$as_echo "no" >&6; }
3922fi
3923
3924
3925  test -n "$CAT" && break
3926done
3927
3928
3929    if test "x$CAT" = x; then
3930        if test "xcat" = x; then
3931          PROG_NAME=cat
3932        else
3933          PROG_NAME=cat
3934        fi
3935        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3936$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3937        as_fn_error $? "Cannot continue" "$LINENO" 5
3938    fi
3939
3940
3941
3942    for ac_prog in chmod
3943do
3944  # Extract the first word of "$ac_prog", so it can be a program name with args.
3945set dummy $ac_prog; ac_word=$2
3946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3947$as_echo_n "checking for $ac_word... " >&6; }
3948if test "${ac_cv_path_CHMOD+set}" = set; then :
3949  $as_echo_n "(cached) " >&6
3950else
3951  case $CHMOD in
3952  [\\/]* | ?:[\\/]*)
3953  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3954  ;;
3955  *)
3956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3957for as_dir in $PATH
3958do
3959  IFS=$as_save_IFS
3960  test -z "$as_dir" && as_dir=.
3961    for ac_exec_ext in '' $ac_executable_extensions; do
3962  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3963    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3965    break 2
3966  fi
3967done
3968  done
3969IFS=$as_save_IFS
3970
3971  ;;
3972esac
3973fi
3974CHMOD=$ac_cv_path_CHMOD
3975if test -n "$CHMOD"; then
3976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3977$as_echo "$CHMOD" >&6; }
3978else
3979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3980$as_echo "no" >&6; }
3981fi
3982
3983
3984  test -n "$CHMOD" && break
3985done
3986
3987
3988    if test "x$CHMOD" = x; then
3989        if test "xchmod" = x; then
3990          PROG_NAME=chmod
3991        else
3992          PROG_NAME=chmod
3993        fi
3994        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3995$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3996        as_fn_error $? "Cannot continue" "$LINENO" 5
3997    fi
3998
3999
4000
4001    for ac_prog in cmp
4002do
4003  # Extract the first word of "$ac_prog", so it can be a program name with args.
4004set dummy $ac_prog; ac_word=$2
4005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4006$as_echo_n "checking for $ac_word... " >&6; }
4007if test "${ac_cv_path_CMP+set}" = set; then :
4008  $as_echo_n "(cached) " >&6
4009else
4010  case $CMP in
4011  [\\/]* | ?:[\\/]*)
4012  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4013  ;;
4014  *)
4015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4016for as_dir in $PATH
4017do
4018  IFS=$as_save_IFS
4019  test -z "$as_dir" && as_dir=.
4020    for ac_exec_ext in '' $ac_executable_extensions; do
4021  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4022    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4024    break 2
4025  fi
4026done
4027  done
4028IFS=$as_save_IFS
4029
4030  ;;
4031esac
4032fi
4033CMP=$ac_cv_path_CMP
4034if test -n "$CMP"; then
4035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4036$as_echo "$CMP" >&6; }
4037else
4038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4039$as_echo "no" >&6; }
4040fi
4041
4042
4043  test -n "$CMP" && break
4044done
4045
4046
4047    if test "x$CMP" = x; then
4048        if test "xcmp" = x; then
4049          PROG_NAME=cmp
4050        else
4051          PROG_NAME=cmp
4052        fi
4053        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4054$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4055        as_fn_error $? "Cannot continue" "$LINENO" 5
4056    fi
4057
4058
4059
4060    for ac_prog in comm
4061do
4062  # Extract the first word of "$ac_prog", so it can be a program name with args.
4063set dummy $ac_prog; ac_word=$2
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4065$as_echo_n "checking for $ac_word... " >&6; }
4066if test "${ac_cv_path_COMM+set}" = set; then :
4067  $as_echo_n "(cached) " >&6
4068else
4069  case $COMM in
4070  [\\/]* | ?:[\\/]*)
4071  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4072  ;;
4073  *)
4074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4075for as_dir in $PATH
4076do
4077  IFS=$as_save_IFS
4078  test -z "$as_dir" && as_dir=.
4079    for ac_exec_ext in '' $ac_executable_extensions; do
4080  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4081    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4083    break 2
4084  fi
4085done
4086  done
4087IFS=$as_save_IFS
4088
4089  ;;
4090esac
4091fi
4092COMM=$ac_cv_path_COMM
4093if test -n "$COMM"; then
4094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4095$as_echo "$COMM" >&6; }
4096else
4097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4098$as_echo "no" >&6; }
4099fi
4100
4101
4102  test -n "$COMM" && break
4103done
4104
4105
4106    if test "x$COMM" = x; then
4107        if test "xcomm" = x; then
4108          PROG_NAME=comm
4109        else
4110          PROG_NAME=comm
4111        fi
4112        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4113$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4114        as_fn_error $? "Cannot continue" "$LINENO" 5
4115    fi
4116
4117
4118
4119    for ac_prog in cp
4120do
4121  # Extract the first word of "$ac_prog", so it can be a program name with args.
4122set dummy $ac_prog; ac_word=$2
4123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4124$as_echo_n "checking for $ac_word... " >&6; }
4125if test "${ac_cv_path_CP+set}" = set; then :
4126  $as_echo_n "(cached) " >&6
4127else
4128  case $CP in
4129  [\\/]* | ?:[\\/]*)
4130  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4131  ;;
4132  *)
4133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4134for as_dir in $PATH
4135do
4136  IFS=$as_save_IFS
4137  test -z "$as_dir" && as_dir=.
4138    for ac_exec_ext in '' $ac_executable_extensions; do
4139  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4140    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4142    break 2
4143  fi
4144done
4145  done
4146IFS=$as_save_IFS
4147
4148  ;;
4149esac
4150fi
4151CP=$ac_cv_path_CP
4152if test -n "$CP"; then
4153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4154$as_echo "$CP" >&6; }
4155else
4156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4157$as_echo "no" >&6; }
4158fi
4159
4160
4161  test -n "$CP" && break
4162done
4163
4164
4165    if test "x$CP" = x; then
4166        if test "xcp" = x; then
4167          PROG_NAME=cp
4168        else
4169          PROG_NAME=cp
4170        fi
4171        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4172$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4173        as_fn_error $? "Cannot continue" "$LINENO" 5
4174    fi
4175
4176
4177
4178    for ac_prog in cpio
4179do
4180  # Extract the first word of "$ac_prog", so it can be a program name with args.
4181set dummy $ac_prog; ac_word=$2
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4183$as_echo_n "checking for $ac_word... " >&6; }
4184if test "${ac_cv_path_CPIO+set}" = set; then :
4185  $as_echo_n "(cached) " >&6
4186else
4187  case $CPIO in
4188  [\\/]* | ?:[\\/]*)
4189  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4190  ;;
4191  *)
4192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4193for as_dir in $PATH
4194do
4195  IFS=$as_save_IFS
4196  test -z "$as_dir" && as_dir=.
4197    for ac_exec_ext in '' $ac_executable_extensions; do
4198  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4199    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4201    break 2
4202  fi
4203done
4204  done
4205IFS=$as_save_IFS
4206
4207  ;;
4208esac
4209fi
4210CPIO=$ac_cv_path_CPIO
4211if test -n "$CPIO"; then
4212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4213$as_echo "$CPIO" >&6; }
4214else
4215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4216$as_echo "no" >&6; }
4217fi
4218
4219
4220  test -n "$CPIO" && break
4221done
4222
4223
4224    if test "x$CPIO" = x; then
4225        if test "xcpio" = x; then
4226          PROG_NAME=cpio
4227        else
4228          PROG_NAME=cpio
4229        fi
4230        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4231$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4232        as_fn_error $? "Cannot continue" "$LINENO" 5
4233    fi
4234
4235
4236
4237    for ac_prog in cut
4238do
4239  # Extract the first word of "$ac_prog", so it can be a program name with args.
4240set dummy $ac_prog; ac_word=$2
4241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4242$as_echo_n "checking for $ac_word... " >&6; }
4243if test "${ac_cv_path_CUT+set}" = set; then :
4244  $as_echo_n "(cached) " >&6
4245else
4246  case $CUT in
4247  [\\/]* | ?:[\\/]*)
4248  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4249  ;;
4250  *)
4251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4252for as_dir in $PATH
4253do
4254  IFS=$as_save_IFS
4255  test -z "$as_dir" && as_dir=.
4256    for ac_exec_ext in '' $ac_executable_extensions; do
4257  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4258    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4260    break 2
4261  fi
4262done
4263  done
4264IFS=$as_save_IFS
4265
4266  ;;
4267esac
4268fi
4269CUT=$ac_cv_path_CUT
4270if test -n "$CUT"; then
4271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4272$as_echo "$CUT" >&6; }
4273else
4274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4275$as_echo "no" >&6; }
4276fi
4277
4278
4279  test -n "$CUT" && break
4280done
4281
4282
4283    if test "x$CUT" = x; then
4284        if test "xcut" = x; then
4285          PROG_NAME=cut
4286        else
4287          PROG_NAME=cut
4288        fi
4289        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4290$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4291        as_fn_error $? "Cannot continue" "$LINENO" 5
4292    fi
4293
4294
4295
4296    for ac_prog in date
4297do
4298  # Extract the first word of "$ac_prog", so it can be a program name with args.
4299set dummy $ac_prog; ac_word=$2
4300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4301$as_echo_n "checking for $ac_word... " >&6; }
4302if test "${ac_cv_path_DATE+set}" = set; then :
4303  $as_echo_n "(cached) " >&6
4304else
4305  case $DATE in
4306  [\\/]* | ?:[\\/]*)
4307  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4308  ;;
4309  *)
4310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4311for as_dir in $PATH
4312do
4313  IFS=$as_save_IFS
4314  test -z "$as_dir" && as_dir=.
4315    for ac_exec_ext in '' $ac_executable_extensions; do
4316  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4317    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4319    break 2
4320  fi
4321done
4322  done
4323IFS=$as_save_IFS
4324
4325  ;;
4326esac
4327fi
4328DATE=$ac_cv_path_DATE
4329if test -n "$DATE"; then
4330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4331$as_echo "$DATE" >&6; }
4332else
4333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4334$as_echo "no" >&6; }
4335fi
4336
4337
4338  test -n "$DATE" && break
4339done
4340
4341
4342    if test "x$DATE" = x; then
4343        if test "xdate" = x; then
4344          PROG_NAME=date
4345        else
4346          PROG_NAME=date
4347        fi
4348        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4349$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4350        as_fn_error $? "Cannot continue" "$LINENO" 5
4351    fi
4352
4353
4354
4355    for ac_prog in gdiff diff
4356do
4357  # Extract the first word of "$ac_prog", so it can be a program name with args.
4358set dummy $ac_prog; ac_word=$2
4359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4360$as_echo_n "checking for $ac_word... " >&6; }
4361if test "${ac_cv_path_DIFF+set}" = set; then :
4362  $as_echo_n "(cached) " >&6
4363else
4364  case $DIFF in
4365  [\\/]* | ?:[\\/]*)
4366  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4367  ;;
4368  *)
4369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4370for as_dir in $PATH
4371do
4372  IFS=$as_save_IFS
4373  test -z "$as_dir" && as_dir=.
4374    for ac_exec_ext in '' $ac_executable_extensions; do
4375  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4376    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4378    break 2
4379  fi
4380done
4381  done
4382IFS=$as_save_IFS
4383
4384  ;;
4385esac
4386fi
4387DIFF=$ac_cv_path_DIFF
4388if test -n "$DIFF"; then
4389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4390$as_echo "$DIFF" >&6; }
4391else
4392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4393$as_echo "no" >&6; }
4394fi
4395
4396
4397  test -n "$DIFF" && break
4398done
4399
4400
4401    if test "x$DIFF" = x; then
4402        if test "xgdiff diff" = x; then
4403          PROG_NAME=diff
4404        else
4405          PROG_NAME=gdiff diff
4406        fi
4407        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4408$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4409        as_fn_error $? "Cannot continue" "$LINENO" 5
4410    fi
4411
4412
4413
4414    for ac_prog in dirname
4415do
4416  # Extract the first word of "$ac_prog", so it can be a program name with args.
4417set dummy $ac_prog; ac_word=$2
4418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4419$as_echo_n "checking for $ac_word... " >&6; }
4420if test "${ac_cv_path_DIRNAME+set}" = set; then :
4421  $as_echo_n "(cached) " >&6
4422else
4423  case $DIRNAME in
4424  [\\/]* | ?:[\\/]*)
4425  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4426  ;;
4427  *)
4428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4429for as_dir in $PATH
4430do
4431  IFS=$as_save_IFS
4432  test -z "$as_dir" && as_dir=.
4433    for ac_exec_ext in '' $ac_executable_extensions; do
4434  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4435    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4437    break 2
4438  fi
4439done
4440  done
4441IFS=$as_save_IFS
4442
4443  ;;
4444esac
4445fi
4446DIRNAME=$ac_cv_path_DIRNAME
4447if test -n "$DIRNAME"; then
4448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4449$as_echo "$DIRNAME" >&6; }
4450else
4451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4452$as_echo "no" >&6; }
4453fi
4454
4455
4456  test -n "$DIRNAME" && break
4457done
4458
4459
4460    if test "x$DIRNAME" = x; then
4461        if test "xdirname" = x; then
4462          PROG_NAME=dirname
4463        else
4464          PROG_NAME=dirname
4465        fi
4466        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4467$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4468        as_fn_error $? "Cannot continue" "$LINENO" 5
4469    fi
4470
4471
4472
4473    for ac_prog in echo
4474do
4475  # Extract the first word of "$ac_prog", so it can be a program name with args.
4476set dummy $ac_prog; ac_word=$2
4477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4478$as_echo_n "checking for $ac_word... " >&6; }
4479if test "${ac_cv_path_ECHO+set}" = set; then :
4480  $as_echo_n "(cached) " >&6
4481else
4482  case $ECHO in
4483  [\\/]* | ?:[\\/]*)
4484  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4485  ;;
4486  *)
4487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488for as_dir in $PATH
4489do
4490  IFS=$as_save_IFS
4491  test -z "$as_dir" && as_dir=.
4492    for ac_exec_ext in '' $ac_executable_extensions; do
4493  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4494    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4496    break 2
4497  fi
4498done
4499  done
4500IFS=$as_save_IFS
4501
4502  ;;
4503esac
4504fi
4505ECHO=$ac_cv_path_ECHO
4506if test -n "$ECHO"; then
4507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4508$as_echo "$ECHO" >&6; }
4509else
4510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4511$as_echo "no" >&6; }
4512fi
4513
4514
4515  test -n "$ECHO" && break
4516done
4517
4518
4519    if test "x$ECHO" = x; then
4520        if test "xecho" = x; then
4521          PROG_NAME=echo
4522        else
4523          PROG_NAME=echo
4524        fi
4525        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4526$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4527        as_fn_error $? "Cannot continue" "$LINENO" 5
4528    fi
4529
4530
4531
4532    for ac_prog in expr
4533do
4534  # Extract the first word of "$ac_prog", so it can be a program name with args.
4535set dummy $ac_prog; ac_word=$2
4536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4537$as_echo_n "checking for $ac_word... " >&6; }
4538if test "${ac_cv_path_EXPR+set}" = set; then :
4539  $as_echo_n "(cached) " >&6
4540else
4541  case $EXPR in
4542  [\\/]* | ?:[\\/]*)
4543  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4544  ;;
4545  *)
4546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4547for as_dir in $PATH
4548do
4549  IFS=$as_save_IFS
4550  test -z "$as_dir" && as_dir=.
4551    for ac_exec_ext in '' $ac_executable_extensions; do
4552  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4553    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4555    break 2
4556  fi
4557done
4558  done
4559IFS=$as_save_IFS
4560
4561  ;;
4562esac
4563fi
4564EXPR=$ac_cv_path_EXPR
4565if test -n "$EXPR"; then
4566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4567$as_echo "$EXPR" >&6; }
4568else
4569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4570$as_echo "no" >&6; }
4571fi
4572
4573
4574  test -n "$EXPR" && break
4575done
4576
4577
4578    if test "x$EXPR" = x; then
4579        if test "xexpr" = x; then
4580          PROG_NAME=expr
4581        else
4582          PROG_NAME=expr
4583        fi
4584        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4585$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4586        as_fn_error $? "Cannot continue" "$LINENO" 5
4587    fi
4588
4589
4590
4591    for ac_prog in file
4592do
4593  # Extract the first word of "$ac_prog", so it can be a program name with args.
4594set dummy $ac_prog; ac_word=$2
4595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4596$as_echo_n "checking for $ac_word... " >&6; }
4597if test "${ac_cv_path_FILE+set}" = set; then :
4598  $as_echo_n "(cached) " >&6
4599else
4600  case $FILE in
4601  [\\/]* | ?:[\\/]*)
4602  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4603  ;;
4604  *)
4605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4606for as_dir in $PATH
4607do
4608  IFS=$as_save_IFS
4609  test -z "$as_dir" && as_dir=.
4610    for ac_exec_ext in '' $ac_executable_extensions; do
4611  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4612    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4614    break 2
4615  fi
4616done
4617  done
4618IFS=$as_save_IFS
4619
4620  ;;
4621esac
4622fi
4623FILE=$ac_cv_path_FILE
4624if test -n "$FILE"; then
4625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4626$as_echo "$FILE" >&6; }
4627else
4628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4629$as_echo "no" >&6; }
4630fi
4631
4632
4633  test -n "$FILE" && break
4634done
4635
4636
4637    if test "x$FILE" = x; then
4638        if test "xfile" = x; then
4639          PROG_NAME=file
4640        else
4641          PROG_NAME=file
4642        fi
4643        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4644$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4645        as_fn_error $? "Cannot continue" "$LINENO" 5
4646    fi
4647
4648
4649
4650    for ac_prog in find
4651do
4652  # Extract the first word of "$ac_prog", so it can be a program name with args.
4653set dummy $ac_prog; ac_word=$2
4654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4655$as_echo_n "checking for $ac_word... " >&6; }
4656if test "${ac_cv_path_FIND+set}" = set; then :
4657  $as_echo_n "(cached) " >&6
4658else
4659  case $FIND in
4660  [\\/]* | ?:[\\/]*)
4661  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4662  ;;
4663  *)
4664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4665for as_dir in $PATH
4666do
4667  IFS=$as_save_IFS
4668  test -z "$as_dir" && as_dir=.
4669    for ac_exec_ext in '' $ac_executable_extensions; do
4670  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4671    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4673    break 2
4674  fi
4675done
4676  done
4677IFS=$as_save_IFS
4678
4679  ;;
4680esac
4681fi
4682FIND=$ac_cv_path_FIND
4683if test -n "$FIND"; then
4684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4685$as_echo "$FIND" >&6; }
4686else
4687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4688$as_echo "no" >&6; }
4689fi
4690
4691
4692  test -n "$FIND" && break
4693done
4694
4695
4696    if test "x$FIND" = x; then
4697        if test "xfind" = x; then
4698          PROG_NAME=find
4699        else
4700          PROG_NAME=find
4701        fi
4702        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4703$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4704        as_fn_error $? "Cannot continue" "$LINENO" 5
4705    fi
4706
4707
4708
4709    for ac_prog in head
4710do
4711  # Extract the first word of "$ac_prog", so it can be a program name with args.
4712set dummy $ac_prog; ac_word=$2
4713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4714$as_echo_n "checking for $ac_word... " >&6; }
4715if test "${ac_cv_path_HEAD+set}" = set; then :
4716  $as_echo_n "(cached) " >&6
4717else
4718  case $HEAD in
4719  [\\/]* | ?:[\\/]*)
4720  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4721  ;;
4722  *)
4723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4724for as_dir in $PATH
4725do
4726  IFS=$as_save_IFS
4727  test -z "$as_dir" && as_dir=.
4728    for ac_exec_ext in '' $ac_executable_extensions; do
4729  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4730    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4732    break 2
4733  fi
4734done
4735  done
4736IFS=$as_save_IFS
4737
4738  ;;
4739esac
4740fi
4741HEAD=$ac_cv_path_HEAD
4742if test -n "$HEAD"; then
4743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4744$as_echo "$HEAD" >&6; }
4745else
4746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4747$as_echo "no" >&6; }
4748fi
4749
4750
4751  test -n "$HEAD" && break
4752done
4753
4754
4755    if test "x$HEAD" = x; then
4756        if test "xhead" = x; then
4757          PROG_NAME=head
4758        else
4759          PROG_NAME=head
4760        fi
4761        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4762$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4763        as_fn_error $? "Cannot continue" "$LINENO" 5
4764    fi
4765
4766
4767
4768    for ac_prog in ln
4769do
4770  # Extract the first word of "$ac_prog", so it can be a program name with args.
4771set dummy $ac_prog; ac_word=$2
4772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4773$as_echo_n "checking for $ac_word... " >&6; }
4774if test "${ac_cv_path_LN+set}" = set; then :
4775  $as_echo_n "(cached) " >&6
4776else
4777  case $LN in
4778  [\\/]* | ?:[\\/]*)
4779  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4780  ;;
4781  *)
4782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4783for as_dir in $PATH
4784do
4785  IFS=$as_save_IFS
4786  test -z "$as_dir" && as_dir=.
4787    for ac_exec_ext in '' $ac_executable_extensions; do
4788  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4789    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4791    break 2
4792  fi
4793done
4794  done
4795IFS=$as_save_IFS
4796
4797  ;;
4798esac
4799fi
4800LN=$ac_cv_path_LN
4801if test -n "$LN"; then
4802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4803$as_echo "$LN" >&6; }
4804else
4805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4806$as_echo "no" >&6; }
4807fi
4808
4809
4810  test -n "$LN" && break
4811done
4812
4813
4814    if test "x$LN" = x; then
4815        if test "xln" = x; then
4816          PROG_NAME=ln
4817        else
4818          PROG_NAME=ln
4819        fi
4820        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4821$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4822        as_fn_error $? "Cannot continue" "$LINENO" 5
4823    fi
4824
4825
4826
4827    for ac_prog in ls
4828do
4829  # Extract the first word of "$ac_prog", so it can be a program name with args.
4830set dummy $ac_prog; ac_word=$2
4831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4832$as_echo_n "checking for $ac_word... " >&6; }
4833if test "${ac_cv_path_LS+set}" = set; then :
4834  $as_echo_n "(cached) " >&6
4835else
4836  case $LS in
4837  [\\/]* | ?:[\\/]*)
4838  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4839  ;;
4840  *)
4841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4842for as_dir in $PATH
4843do
4844  IFS=$as_save_IFS
4845  test -z "$as_dir" && as_dir=.
4846    for ac_exec_ext in '' $ac_executable_extensions; do
4847  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4848    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4850    break 2
4851  fi
4852done
4853  done
4854IFS=$as_save_IFS
4855
4856  ;;
4857esac
4858fi
4859LS=$ac_cv_path_LS
4860if test -n "$LS"; then
4861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4862$as_echo "$LS" >&6; }
4863else
4864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4865$as_echo "no" >&6; }
4866fi
4867
4868
4869  test -n "$LS" && break
4870done
4871
4872
4873    if test "x$LS" = x; then
4874        if test "xls" = x; then
4875          PROG_NAME=ls
4876        else
4877          PROG_NAME=ls
4878        fi
4879        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4880$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4881        as_fn_error $? "Cannot continue" "$LINENO" 5
4882    fi
4883
4884
4885
4886    for ac_prog in mkdir
4887do
4888  # Extract the first word of "$ac_prog", so it can be a program name with args.
4889set dummy $ac_prog; ac_word=$2
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4891$as_echo_n "checking for $ac_word... " >&6; }
4892if test "${ac_cv_path_MKDIR+set}" = set; then :
4893  $as_echo_n "(cached) " >&6
4894else
4895  case $MKDIR in
4896  [\\/]* | ?:[\\/]*)
4897  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4898  ;;
4899  *)
4900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4901for as_dir in $PATH
4902do
4903  IFS=$as_save_IFS
4904  test -z "$as_dir" && as_dir=.
4905    for ac_exec_ext in '' $ac_executable_extensions; do
4906  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4907    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4909    break 2
4910  fi
4911done
4912  done
4913IFS=$as_save_IFS
4914
4915  ;;
4916esac
4917fi
4918MKDIR=$ac_cv_path_MKDIR
4919if test -n "$MKDIR"; then
4920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4921$as_echo "$MKDIR" >&6; }
4922else
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4924$as_echo "no" >&6; }
4925fi
4926
4927
4928  test -n "$MKDIR" && break
4929done
4930
4931
4932    if test "x$MKDIR" = x; then
4933        if test "xmkdir" = x; then
4934          PROG_NAME=mkdir
4935        else
4936          PROG_NAME=mkdir
4937        fi
4938        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4939$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4940        as_fn_error $? "Cannot continue" "$LINENO" 5
4941    fi
4942
4943
4944
4945    for ac_prog in mktemp
4946do
4947  # Extract the first word of "$ac_prog", so it can be a program name with args.
4948set dummy $ac_prog; ac_word=$2
4949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4950$as_echo_n "checking for $ac_word... " >&6; }
4951if test "${ac_cv_path_MKTEMP+set}" = set; then :
4952  $as_echo_n "(cached) " >&6
4953else
4954  case $MKTEMP in
4955  [\\/]* | ?:[\\/]*)
4956  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4957  ;;
4958  *)
4959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962  IFS=$as_save_IFS
4963  test -z "$as_dir" && as_dir=.
4964    for ac_exec_ext in '' $ac_executable_extensions; do
4965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4966    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4968    break 2
4969  fi
4970done
4971  done
4972IFS=$as_save_IFS
4973
4974  ;;
4975esac
4976fi
4977MKTEMP=$ac_cv_path_MKTEMP
4978if test -n "$MKTEMP"; then
4979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4980$as_echo "$MKTEMP" >&6; }
4981else
4982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4983$as_echo "no" >&6; }
4984fi
4985
4986
4987  test -n "$MKTEMP" && break
4988done
4989
4990
4991    if test "x$MKTEMP" = x; then
4992        if test "xmktemp" = x; then
4993          PROG_NAME=mktemp
4994        else
4995          PROG_NAME=mktemp
4996        fi
4997        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4998$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4999        as_fn_error $? "Cannot continue" "$LINENO" 5
5000    fi
5001
5002
5003
5004    for ac_prog in mv
5005do
5006  # Extract the first word of "$ac_prog", so it can be a program name with args.
5007set dummy $ac_prog; ac_word=$2
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if test "${ac_cv_path_MV+set}" = set; then :
5011  $as_echo_n "(cached) " >&6
5012else
5013  case $MV in
5014  [\\/]* | ?:[\\/]*)
5015  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5016  ;;
5017  *)
5018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019for as_dir in $PATH
5020do
5021  IFS=$as_save_IFS
5022  test -z "$as_dir" && as_dir=.
5023    for ac_exec_ext in '' $ac_executable_extensions; do
5024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5025    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027    break 2
5028  fi
5029done
5030  done
5031IFS=$as_save_IFS
5032
5033  ;;
5034esac
5035fi
5036MV=$ac_cv_path_MV
5037if test -n "$MV"; then
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5039$as_echo "$MV" >&6; }
5040else
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
5043fi
5044
5045
5046  test -n "$MV" && break
5047done
5048
5049
5050    if test "x$MV" = x; then
5051        if test "xmv" = x; then
5052          PROG_NAME=mv
5053        else
5054          PROG_NAME=mv
5055        fi
5056        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5057$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5058        as_fn_error $? "Cannot continue" "$LINENO" 5
5059    fi
5060
5061
5062
5063    for ac_prog in printf
5064do
5065  # Extract the first word of "$ac_prog", so it can be a program name with args.
5066set dummy $ac_prog; ac_word=$2
5067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5068$as_echo_n "checking for $ac_word... " >&6; }
5069if test "${ac_cv_path_PRINTF+set}" = set; then :
5070  $as_echo_n "(cached) " >&6
5071else
5072  case $PRINTF in
5073  [\\/]* | ?:[\\/]*)
5074  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5075  ;;
5076  *)
5077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080  IFS=$as_save_IFS
5081  test -z "$as_dir" && as_dir=.
5082    for ac_exec_ext in '' $ac_executable_extensions; do
5083  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5084    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086    break 2
5087  fi
5088done
5089  done
5090IFS=$as_save_IFS
5091
5092  ;;
5093esac
5094fi
5095PRINTF=$ac_cv_path_PRINTF
5096if test -n "$PRINTF"; then
5097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5098$as_echo "$PRINTF" >&6; }
5099else
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
5102fi
5103
5104
5105  test -n "$PRINTF" && break
5106done
5107
5108
5109    if test "x$PRINTF" = x; then
5110        if test "xprintf" = x; then
5111          PROG_NAME=printf
5112        else
5113          PROG_NAME=printf
5114        fi
5115        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5116$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5117        as_fn_error $? "Cannot continue" "$LINENO" 5
5118    fi
5119
5120
5121
5122    for ac_prog in pwd
5123do
5124  # Extract the first word of "$ac_prog", so it can be a program name with args.
5125set dummy $ac_prog; ac_word=$2
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
5128if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5129  $as_echo_n "(cached) " >&6
5130else
5131  case $THEPWDCMD in
5132  [\\/]* | ?:[\\/]*)
5133  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5134  ;;
5135  *)
5136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5137for as_dir in $PATH
5138do
5139  IFS=$as_save_IFS
5140  test -z "$as_dir" && as_dir=.
5141    for ac_exec_ext in '' $ac_executable_extensions; do
5142  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5143    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5145    break 2
5146  fi
5147done
5148  done
5149IFS=$as_save_IFS
5150
5151  ;;
5152esac
5153fi
5154THEPWDCMD=$ac_cv_path_THEPWDCMD
5155if test -n "$THEPWDCMD"; then
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5157$as_echo "$THEPWDCMD" >&6; }
5158else
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160$as_echo "no" >&6; }
5161fi
5162
5163
5164  test -n "$THEPWDCMD" && break
5165done
5166
5167
5168    if test "x$THEPWDCMD" = x; then
5169        if test "xpwd" = x; then
5170          PROG_NAME=thepwdcmd
5171        else
5172          PROG_NAME=pwd
5173        fi
5174        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5175$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5176        as_fn_error $? "Cannot continue" "$LINENO" 5
5177    fi
5178
5179
5180
5181    for ac_prog in rm
5182do
5183  # Extract the first word of "$ac_prog", so it can be a program name with args.
5184set dummy $ac_prog; ac_word=$2
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5186$as_echo_n "checking for $ac_word... " >&6; }
5187if test "${ac_cv_path_RM+set}" = set; then :
5188  $as_echo_n "(cached) " >&6
5189else
5190  case $RM in
5191  [\\/]* | ?:[\\/]*)
5192  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5193  ;;
5194  *)
5195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5196for as_dir in $PATH
5197do
5198  IFS=$as_save_IFS
5199  test -z "$as_dir" && as_dir=.
5200    for ac_exec_ext in '' $ac_executable_extensions; do
5201  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5202    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5204    break 2
5205  fi
5206done
5207  done
5208IFS=$as_save_IFS
5209
5210  ;;
5211esac
5212fi
5213RM=$ac_cv_path_RM
5214if test -n "$RM"; then
5215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5216$as_echo "$RM" >&6; }
5217else
5218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5219$as_echo "no" >&6; }
5220fi
5221
5222
5223  test -n "$RM" && break
5224done
5225
5226
5227    if test "x$RM" = x; then
5228        if test "xrm" = x; then
5229          PROG_NAME=rm
5230        else
5231          PROG_NAME=rm
5232        fi
5233        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5234$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5235        as_fn_error $? "Cannot continue" "$LINENO" 5
5236    fi
5237
5238
5239
5240    for ac_prog in sh
5241do
5242  # Extract the first word of "$ac_prog", so it can be a program name with args.
5243set dummy $ac_prog; ac_word=$2
5244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5245$as_echo_n "checking for $ac_word... " >&6; }
5246if test "${ac_cv_path_SH+set}" = set; then :
5247  $as_echo_n "(cached) " >&6
5248else
5249  case $SH in
5250  [\\/]* | ?:[\\/]*)
5251  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5252  ;;
5253  *)
5254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5255for as_dir in $PATH
5256do
5257  IFS=$as_save_IFS
5258  test -z "$as_dir" && as_dir=.
5259    for ac_exec_ext in '' $ac_executable_extensions; do
5260  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5261    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5263    break 2
5264  fi
5265done
5266  done
5267IFS=$as_save_IFS
5268
5269  ;;
5270esac
5271fi
5272SH=$ac_cv_path_SH
5273if test -n "$SH"; then
5274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5275$as_echo "$SH" >&6; }
5276else
5277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5278$as_echo "no" >&6; }
5279fi
5280
5281
5282  test -n "$SH" && break
5283done
5284
5285
5286    if test "x$SH" = x; then
5287        if test "xsh" = x; then
5288          PROG_NAME=sh
5289        else
5290          PROG_NAME=sh
5291        fi
5292        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5293$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5294        as_fn_error $? "Cannot continue" "$LINENO" 5
5295    fi
5296
5297
5298
5299    for ac_prog in sort
5300do
5301  # Extract the first word of "$ac_prog", so it can be a program name with args.
5302set dummy $ac_prog; ac_word=$2
5303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5304$as_echo_n "checking for $ac_word... " >&6; }
5305if test "${ac_cv_path_SORT+set}" = set; then :
5306  $as_echo_n "(cached) " >&6
5307else
5308  case $SORT in
5309  [\\/]* | ?:[\\/]*)
5310  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5311  ;;
5312  *)
5313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5314for as_dir in $PATH
5315do
5316  IFS=$as_save_IFS
5317  test -z "$as_dir" && as_dir=.
5318    for ac_exec_ext in '' $ac_executable_extensions; do
5319  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5320    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5322    break 2
5323  fi
5324done
5325  done
5326IFS=$as_save_IFS
5327
5328  ;;
5329esac
5330fi
5331SORT=$ac_cv_path_SORT
5332if test -n "$SORT"; then
5333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5334$as_echo "$SORT" >&6; }
5335else
5336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5337$as_echo "no" >&6; }
5338fi
5339
5340
5341  test -n "$SORT" && break
5342done
5343
5344
5345    if test "x$SORT" = x; then
5346        if test "xsort" = x; then
5347          PROG_NAME=sort
5348        else
5349          PROG_NAME=sort
5350        fi
5351        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5352$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5353        as_fn_error $? "Cannot continue" "$LINENO" 5
5354    fi
5355
5356
5357
5358    for ac_prog in tail
5359do
5360  # Extract the first word of "$ac_prog", so it can be a program name with args.
5361set dummy $ac_prog; ac_word=$2
5362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5363$as_echo_n "checking for $ac_word... " >&6; }
5364if test "${ac_cv_path_TAIL+set}" = set; then :
5365  $as_echo_n "(cached) " >&6
5366else
5367  case $TAIL in
5368  [\\/]* | ?:[\\/]*)
5369  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5370  ;;
5371  *)
5372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5373for as_dir in $PATH
5374do
5375  IFS=$as_save_IFS
5376  test -z "$as_dir" && as_dir=.
5377    for ac_exec_ext in '' $ac_executable_extensions; do
5378  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5379    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5381    break 2
5382  fi
5383done
5384  done
5385IFS=$as_save_IFS
5386
5387  ;;
5388esac
5389fi
5390TAIL=$ac_cv_path_TAIL
5391if test -n "$TAIL"; then
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5393$as_echo "$TAIL" >&6; }
5394else
5395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5396$as_echo "no" >&6; }
5397fi
5398
5399
5400  test -n "$TAIL" && break
5401done
5402
5403
5404    if test "x$TAIL" = x; then
5405        if test "xtail" = x; then
5406          PROG_NAME=tail
5407        else
5408          PROG_NAME=tail
5409        fi
5410        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5411$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5412        as_fn_error $? "Cannot continue" "$LINENO" 5
5413    fi
5414
5415
5416
5417    for ac_prog in tar
5418do
5419  # Extract the first word of "$ac_prog", so it can be a program name with args.
5420set dummy $ac_prog; ac_word=$2
5421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5422$as_echo_n "checking for $ac_word... " >&6; }
5423if test "${ac_cv_path_TAR+set}" = set; then :
5424  $as_echo_n "(cached) " >&6
5425else
5426  case $TAR in
5427  [\\/]* | ?:[\\/]*)
5428  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5429  ;;
5430  *)
5431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5432for as_dir in $PATH
5433do
5434  IFS=$as_save_IFS
5435  test -z "$as_dir" && as_dir=.
5436    for ac_exec_ext in '' $ac_executable_extensions; do
5437  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5438    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5440    break 2
5441  fi
5442done
5443  done
5444IFS=$as_save_IFS
5445
5446  ;;
5447esac
5448fi
5449TAR=$ac_cv_path_TAR
5450if test -n "$TAR"; then
5451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5452$as_echo "$TAR" >&6; }
5453else
5454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5455$as_echo "no" >&6; }
5456fi
5457
5458
5459  test -n "$TAR" && break
5460done
5461
5462
5463    if test "x$TAR" = x; then
5464        if test "xtar" = x; then
5465          PROG_NAME=tar
5466        else
5467          PROG_NAME=tar
5468        fi
5469        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5470$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5471        as_fn_error $? "Cannot continue" "$LINENO" 5
5472    fi
5473
5474
5475
5476    for ac_prog in tee
5477do
5478  # Extract the first word of "$ac_prog", so it can be a program name with args.
5479set dummy $ac_prog; ac_word=$2
5480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5481$as_echo_n "checking for $ac_word... " >&6; }
5482if test "${ac_cv_path_TEE+set}" = set; then :
5483  $as_echo_n "(cached) " >&6
5484else
5485  case $TEE in
5486  [\\/]* | ?:[\\/]*)
5487  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5488  ;;
5489  *)
5490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5491for as_dir in $PATH
5492do
5493  IFS=$as_save_IFS
5494  test -z "$as_dir" && as_dir=.
5495    for ac_exec_ext in '' $ac_executable_extensions; do
5496  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5497    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5499    break 2
5500  fi
5501done
5502  done
5503IFS=$as_save_IFS
5504
5505  ;;
5506esac
5507fi
5508TEE=$ac_cv_path_TEE
5509if test -n "$TEE"; then
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5511$as_echo "$TEE" >&6; }
5512else
5513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5514$as_echo "no" >&6; }
5515fi
5516
5517
5518  test -n "$TEE" && break
5519done
5520
5521
5522    if test "x$TEE" = x; then
5523        if test "xtee" = x; then
5524          PROG_NAME=tee
5525        else
5526          PROG_NAME=tee
5527        fi
5528        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5529$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5530        as_fn_error $? "Cannot continue" "$LINENO" 5
5531    fi
5532
5533
5534
5535    for ac_prog in touch
5536do
5537  # Extract the first word of "$ac_prog", so it can be a program name with args.
5538set dummy $ac_prog; ac_word=$2
5539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5540$as_echo_n "checking for $ac_word... " >&6; }
5541if test "${ac_cv_path_TOUCH+set}" = set; then :
5542  $as_echo_n "(cached) " >&6
5543else
5544  case $TOUCH in
5545  [\\/]* | ?:[\\/]*)
5546  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5547  ;;
5548  *)
5549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5550for as_dir in $PATH
5551do
5552  IFS=$as_save_IFS
5553  test -z "$as_dir" && as_dir=.
5554    for ac_exec_ext in '' $ac_executable_extensions; do
5555  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5556    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5558    break 2
5559  fi
5560done
5561  done
5562IFS=$as_save_IFS
5563
5564  ;;
5565esac
5566fi
5567TOUCH=$ac_cv_path_TOUCH
5568if test -n "$TOUCH"; then
5569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5570$as_echo "$TOUCH" >&6; }
5571else
5572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5573$as_echo "no" >&6; }
5574fi
5575
5576
5577  test -n "$TOUCH" && break
5578done
5579
5580
5581    if test "x$TOUCH" = x; then
5582        if test "xtouch" = x; then
5583          PROG_NAME=touch
5584        else
5585          PROG_NAME=touch
5586        fi
5587        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5588$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5589        as_fn_error $? "Cannot continue" "$LINENO" 5
5590    fi
5591
5592
5593
5594    for ac_prog in tr
5595do
5596  # Extract the first word of "$ac_prog", so it can be a program name with args.
5597set dummy $ac_prog; ac_word=$2
5598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5599$as_echo_n "checking for $ac_word... " >&6; }
5600if test "${ac_cv_path_TR+set}" = set; then :
5601  $as_echo_n "(cached) " >&6
5602else
5603  case $TR in
5604  [\\/]* | ?:[\\/]*)
5605  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5606  ;;
5607  *)
5608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5609for as_dir in $PATH
5610do
5611  IFS=$as_save_IFS
5612  test -z "$as_dir" && as_dir=.
5613    for ac_exec_ext in '' $ac_executable_extensions; do
5614  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5615    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5617    break 2
5618  fi
5619done
5620  done
5621IFS=$as_save_IFS
5622
5623  ;;
5624esac
5625fi
5626TR=$ac_cv_path_TR
5627if test -n "$TR"; then
5628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5629$as_echo "$TR" >&6; }
5630else
5631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632$as_echo "no" >&6; }
5633fi
5634
5635
5636  test -n "$TR" && break
5637done
5638
5639
5640    if test "x$TR" = x; then
5641        if test "xtr" = x; then
5642          PROG_NAME=tr
5643        else
5644          PROG_NAME=tr
5645        fi
5646        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5647$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5648        as_fn_error $? "Cannot continue" "$LINENO" 5
5649    fi
5650
5651
5652
5653    for ac_prog in uname
5654do
5655  # Extract the first word of "$ac_prog", so it can be a program name with args.
5656set dummy $ac_prog; ac_word=$2
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658$as_echo_n "checking for $ac_word... " >&6; }
5659if test "${ac_cv_path_UNAME+set}" = set; then :
5660  $as_echo_n "(cached) " >&6
5661else
5662  case $UNAME in
5663  [\\/]* | ?:[\\/]*)
5664  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5665  ;;
5666  *)
5667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5668for as_dir in $PATH
5669do
5670  IFS=$as_save_IFS
5671  test -z "$as_dir" && as_dir=.
5672    for ac_exec_ext in '' $ac_executable_extensions; do
5673  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5674    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5676    break 2
5677  fi
5678done
5679  done
5680IFS=$as_save_IFS
5681
5682  ;;
5683esac
5684fi
5685UNAME=$ac_cv_path_UNAME
5686if test -n "$UNAME"; then
5687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5688$as_echo "$UNAME" >&6; }
5689else
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691$as_echo "no" >&6; }
5692fi
5693
5694
5695  test -n "$UNAME" && break
5696done
5697
5698
5699    if test "x$UNAME" = x; then
5700        if test "xuname" = x; then
5701          PROG_NAME=uname
5702        else
5703          PROG_NAME=uname
5704        fi
5705        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5706$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5707        as_fn_error $? "Cannot continue" "$LINENO" 5
5708    fi
5709
5710
5711
5712    for ac_prog in uniq
5713do
5714  # Extract the first word of "$ac_prog", so it can be a program name with args.
5715set dummy $ac_prog; ac_word=$2
5716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5717$as_echo_n "checking for $ac_word... " >&6; }
5718if test "${ac_cv_path_UNIQ+set}" = set; then :
5719  $as_echo_n "(cached) " >&6
5720else
5721  case $UNIQ in
5722  [\\/]* | ?:[\\/]*)
5723  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5724  ;;
5725  *)
5726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5727for as_dir in $PATH
5728do
5729  IFS=$as_save_IFS
5730  test -z "$as_dir" && as_dir=.
5731    for ac_exec_ext in '' $ac_executable_extensions; do
5732  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5733    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5735    break 2
5736  fi
5737done
5738  done
5739IFS=$as_save_IFS
5740
5741  ;;
5742esac
5743fi
5744UNIQ=$ac_cv_path_UNIQ
5745if test -n "$UNIQ"; then
5746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5747$as_echo "$UNIQ" >&6; }
5748else
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5750$as_echo "no" >&6; }
5751fi
5752
5753
5754  test -n "$UNIQ" && break
5755done
5756
5757
5758    if test "x$UNIQ" = x; then
5759        if test "xuniq" = x; then
5760          PROG_NAME=uniq
5761        else
5762          PROG_NAME=uniq
5763        fi
5764        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5765$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5766        as_fn_error $? "Cannot continue" "$LINENO" 5
5767    fi
5768
5769
5770
5771    for ac_prog in wc
5772do
5773  # Extract the first word of "$ac_prog", so it can be a program name with args.
5774set dummy $ac_prog; ac_word=$2
5775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5776$as_echo_n "checking for $ac_word... " >&6; }
5777if test "${ac_cv_path_WC+set}" = set; then :
5778  $as_echo_n "(cached) " >&6
5779else
5780  case $WC in
5781  [\\/]* | ?:[\\/]*)
5782  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5783  ;;
5784  *)
5785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5786for as_dir in $PATH
5787do
5788  IFS=$as_save_IFS
5789  test -z "$as_dir" && as_dir=.
5790    for ac_exec_ext in '' $ac_executable_extensions; do
5791  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5792    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5794    break 2
5795  fi
5796done
5797  done
5798IFS=$as_save_IFS
5799
5800  ;;
5801esac
5802fi
5803WC=$ac_cv_path_WC
5804if test -n "$WC"; then
5805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5806$as_echo "$WC" >&6; }
5807else
5808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5809$as_echo "no" >&6; }
5810fi
5811
5812
5813  test -n "$WC" && break
5814done
5815
5816
5817    if test "x$WC" = x; then
5818        if test "xwc" = x; then
5819          PROG_NAME=wc
5820        else
5821          PROG_NAME=wc
5822        fi
5823        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5824$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5825        as_fn_error $? "Cannot continue" "$LINENO" 5
5826    fi
5827
5828
5829
5830    for ac_prog in which
5831do
5832  # Extract the first word of "$ac_prog", so it can be a program name with args.
5833set dummy $ac_prog; ac_word=$2
5834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5835$as_echo_n "checking for $ac_word... " >&6; }
5836if test "${ac_cv_path_WHICH+set}" = set; then :
5837  $as_echo_n "(cached) " >&6
5838else
5839  case $WHICH in
5840  [\\/]* | ?:[\\/]*)
5841  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5842  ;;
5843  *)
5844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847  IFS=$as_save_IFS
5848  test -z "$as_dir" && as_dir=.
5849    for ac_exec_ext in '' $ac_executable_extensions; do
5850  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5851    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5853    break 2
5854  fi
5855done
5856  done
5857IFS=$as_save_IFS
5858
5859  ;;
5860esac
5861fi
5862WHICH=$ac_cv_path_WHICH
5863if test -n "$WHICH"; then
5864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5865$as_echo "$WHICH" >&6; }
5866else
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5868$as_echo "no" >&6; }
5869fi
5870
5871
5872  test -n "$WHICH" && break
5873done
5874
5875
5876    if test "x$WHICH" = x; then
5877        if test "xwhich" = x; then
5878          PROG_NAME=which
5879        else
5880          PROG_NAME=which
5881        fi
5882        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5883$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5884        as_fn_error $? "Cannot continue" "$LINENO" 5
5885    fi
5886
5887
5888
5889    for ac_prog in xargs
5890do
5891  # Extract the first word of "$ac_prog", so it can be a program name with args.
5892set dummy $ac_prog; ac_word=$2
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5894$as_echo_n "checking for $ac_word... " >&6; }
5895if test "${ac_cv_path_XARGS+set}" = set; then :
5896  $as_echo_n "(cached) " >&6
5897else
5898  case $XARGS in
5899  [\\/]* | ?:[\\/]*)
5900  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5901  ;;
5902  *)
5903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5904for as_dir in $PATH
5905do
5906  IFS=$as_save_IFS
5907  test -z "$as_dir" && as_dir=.
5908    for ac_exec_ext in '' $ac_executable_extensions; do
5909  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5910    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5912    break 2
5913  fi
5914done
5915  done
5916IFS=$as_save_IFS
5917
5918  ;;
5919esac
5920fi
5921XARGS=$ac_cv_path_XARGS
5922if test -n "$XARGS"; then
5923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5924$as_echo "$XARGS" >&6; }
5925else
5926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5927$as_echo "no" >&6; }
5928fi
5929
5930
5931  test -n "$XARGS" && break
5932done
5933
5934
5935    if test "x$XARGS" = x; then
5936        if test "xxargs" = x; then
5937          PROG_NAME=xargs
5938        else
5939          PROG_NAME=xargs
5940        fi
5941        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5942$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5943        as_fn_error $? "Cannot continue" "$LINENO" 5
5944    fi
5945
5946
5947
5948# Then required tools that require some special treatment.
5949for ac_prog in gawk mawk nawk awk
5950do
5951  # Extract the first word of "$ac_prog", so it can be a program name with args.
5952set dummy $ac_prog; ac_word=$2
5953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5954$as_echo_n "checking for $ac_word... " >&6; }
5955if test "${ac_cv_prog_AWK+set}" = set; then :
5956  $as_echo_n "(cached) " >&6
5957else
5958  if test -n "$AWK"; then
5959  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5960else
5961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5962for as_dir in $PATH
5963do
5964  IFS=$as_save_IFS
5965  test -z "$as_dir" && as_dir=.
5966    for ac_exec_ext in '' $ac_executable_extensions; do
5967  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5968    ac_cv_prog_AWK="$ac_prog"
5969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5970    break 2
5971  fi
5972done
5973  done
5974IFS=$as_save_IFS
5975
5976fi
5977fi
5978AWK=$ac_cv_prog_AWK
5979if test -n "$AWK"; then
5980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5981$as_echo "$AWK" >&6; }
5982else
5983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5984$as_echo "no" >&6; }
5985fi
5986
5987
5988  test -n "$AWK" && break
5989done
5990
5991
5992    if test "x$AWK" = x; then
5993        if test "x" = x; then
5994          PROG_NAME=awk
5995        else
5996          PROG_NAME=
5997        fi
5998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5999$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6000        as_fn_error $? "Cannot continue" "$LINENO" 5
6001    fi
6002
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6004$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6005if test "${ac_cv_path_GREP+set}" = set; then :
6006  $as_echo_n "(cached) " >&6
6007else
6008  if test -z "$GREP"; then
6009  ac_path_GREP_found=false
6010  # Loop through the user's path and test for each of PROGNAME-LIST
6011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6012for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6013do
6014  IFS=$as_save_IFS
6015  test -z "$as_dir" && as_dir=.
6016    for ac_prog in grep ggrep; do
6017    for ac_exec_ext in '' $ac_executable_extensions; do
6018      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6019      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6020# Check for GNU ac_path_GREP and select it if it is found.
6021  # Check for GNU $ac_path_GREP
6022case `"$ac_path_GREP" --version 2>&1` in
6023*GNU*)
6024  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6025*)
6026  ac_count=0
6027  $as_echo_n 0123456789 >"conftest.in"
6028  while :
6029  do
6030    cat "conftest.in" "conftest.in" >"conftest.tmp"
6031    mv "conftest.tmp" "conftest.in"
6032    cp "conftest.in" "conftest.nl"
6033    $as_echo 'GREP' >> "conftest.nl"
6034    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6035    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6036    as_fn_arith $ac_count + 1 && ac_count=$as_val
6037    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6038      # Best one so far, save it but keep looking for a better one
6039      ac_cv_path_GREP="$ac_path_GREP"
6040      ac_path_GREP_max=$ac_count
6041    fi
6042    # 10*(2^10) chars as input seems more than enough
6043    test $ac_count -gt 10 && break
6044  done
6045  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6046esac
6047
6048      $ac_path_GREP_found && break 3
6049    done
6050  done
6051  done
6052IFS=$as_save_IFS
6053  if test -z "$ac_cv_path_GREP"; then
6054    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6055  fi
6056else
6057  ac_cv_path_GREP=$GREP
6058fi
6059
6060fi
6061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6062$as_echo "$ac_cv_path_GREP" >&6; }
6063 GREP="$ac_cv_path_GREP"
6064
6065
6066
6067    if test "x$GREP" = x; then
6068        if test "x" = x; then
6069          PROG_NAME=grep
6070        else
6071          PROG_NAME=
6072        fi
6073        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6074$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6075        as_fn_error $? "Cannot continue" "$LINENO" 5
6076    fi
6077
6078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6079$as_echo_n "checking for egrep... " >&6; }
6080if test "${ac_cv_path_EGREP+set}" = set; then :
6081  $as_echo_n "(cached) " >&6
6082else
6083  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6084   then ac_cv_path_EGREP="$GREP -E"
6085   else
6086     if test -z "$EGREP"; then
6087  ac_path_EGREP_found=false
6088  # Loop through the user's path and test for each of PROGNAME-LIST
6089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6091do
6092  IFS=$as_save_IFS
6093  test -z "$as_dir" && as_dir=.
6094    for ac_prog in egrep; do
6095    for ac_exec_ext in '' $ac_executable_extensions; do
6096      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6097      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6098# Check for GNU ac_path_EGREP and select it if it is found.
6099  # Check for GNU $ac_path_EGREP
6100case `"$ac_path_EGREP" --version 2>&1` in
6101*GNU*)
6102  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6103*)
6104  ac_count=0
6105  $as_echo_n 0123456789 >"conftest.in"
6106  while :
6107  do
6108    cat "conftest.in" "conftest.in" >"conftest.tmp"
6109    mv "conftest.tmp" "conftest.in"
6110    cp "conftest.in" "conftest.nl"
6111    $as_echo 'EGREP' >> "conftest.nl"
6112    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6113    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6114    as_fn_arith $ac_count + 1 && ac_count=$as_val
6115    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6116      # Best one so far, save it but keep looking for a better one
6117      ac_cv_path_EGREP="$ac_path_EGREP"
6118      ac_path_EGREP_max=$ac_count
6119    fi
6120    # 10*(2^10) chars as input seems more than enough
6121    test $ac_count -gt 10 && break
6122  done
6123  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6124esac
6125
6126      $ac_path_EGREP_found && break 3
6127    done
6128  done
6129  done
6130IFS=$as_save_IFS
6131  if test -z "$ac_cv_path_EGREP"; then
6132    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6133  fi
6134else
6135  ac_cv_path_EGREP=$EGREP
6136fi
6137
6138   fi
6139fi
6140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6141$as_echo "$ac_cv_path_EGREP" >&6; }
6142 EGREP="$ac_cv_path_EGREP"
6143
6144
6145
6146    if test "x$EGREP" = x; then
6147        if test "x" = x; then
6148          PROG_NAME=egrep
6149        else
6150          PROG_NAME=
6151        fi
6152        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6153$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6154        as_fn_error $? "Cannot continue" "$LINENO" 5
6155    fi
6156
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6158$as_echo_n "checking for fgrep... " >&6; }
6159if test "${ac_cv_path_FGREP+set}" = set; then :
6160  $as_echo_n "(cached) " >&6
6161else
6162  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6163   then ac_cv_path_FGREP="$GREP -F"
6164   else
6165     if test -z "$FGREP"; then
6166  ac_path_FGREP_found=false
6167  # Loop through the user's path and test for each of PROGNAME-LIST
6168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6170do
6171  IFS=$as_save_IFS
6172  test -z "$as_dir" && as_dir=.
6173    for ac_prog in fgrep; do
6174    for ac_exec_ext in '' $ac_executable_extensions; do
6175      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6176      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6177# Check for GNU ac_path_FGREP and select it if it is found.
6178  # Check for GNU $ac_path_FGREP
6179case `"$ac_path_FGREP" --version 2>&1` in
6180*GNU*)
6181  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6182*)
6183  ac_count=0
6184  $as_echo_n 0123456789 >"conftest.in"
6185  while :
6186  do
6187    cat "conftest.in" "conftest.in" >"conftest.tmp"
6188    mv "conftest.tmp" "conftest.in"
6189    cp "conftest.in" "conftest.nl"
6190    $as_echo 'FGREP' >> "conftest.nl"
6191    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6192    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6193    as_fn_arith $ac_count + 1 && ac_count=$as_val
6194    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6195      # Best one so far, save it but keep looking for a better one
6196      ac_cv_path_FGREP="$ac_path_FGREP"
6197      ac_path_FGREP_max=$ac_count
6198    fi
6199    # 10*(2^10) chars as input seems more than enough
6200    test $ac_count -gt 10 && break
6201  done
6202  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6203esac
6204
6205      $ac_path_FGREP_found && break 3
6206    done
6207  done
6208  done
6209IFS=$as_save_IFS
6210  if test -z "$ac_cv_path_FGREP"; then
6211    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6212  fi
6213else
6214  ac_cv_path_FGREP=$FGREP
6215fi
6216
6217   fi
6218fi
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6220$as_echo "$ac_cv_path_FGREP" >&6; }
6221 FGREP="$ac_cv_path_FGREP"
6222
6223
6224
6225    if test "x$FGREP" = x; then
6226        if test "x" = x; then
6227          PROG_NAME=fgrep
6228        else
6229          PROG_NAME=
6230        fi
6231        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6232$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6233        as_fn_error $? "Cannot continue" "$LINENO" 5
6234    fi
6235
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6237$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6238if test "${ac_cv_path_SED+set}" = set; then :
6239  $as_echo_n "(cached) " >&6
6240else
6241            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6242     for ac_i in 1 2 3 4 5 6 7; do
6243       ac_script="$ac_script$as_nl$ac_script"
6244     done
6245     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6246     { ac_script=; unset ac_script;}
6247     if test -z "$SED"; then
6248  ac_path_SED_found=false
6249  # Loop through the user's path and test for each of PROGNAME-LIST
6250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6251for as_dir in $PATH
6252do
6253  IFS=$as_save_IFS
6254  test -z "$as_dir" && as_dir=.
6255    for ac_prog in sed gsed; do
6256    for ac_exec_ext in '' $ac_executable_extensions; do
6257      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6258      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6259# Check for GNU ac_path_SED and select it if it is found.
6260  # Check for GNU $ac_path_SED
6261case `"$ac_path_SED" --version 2>&1` in
6262*GNU*)
6263  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6264*)
6265  ac_count=0
6266  $as_echo_n 0123456789 >"conftest.in"
6267  while :
6268  do
6269    cat "conftest.in" "conftest.in" >"conftest.tmp"
6270    mv "conftest.tmp" "conftest.in"
6271    cp "conftest.in" "conftest.nl"
6272    $as_echo '' >> "conftest.nl"
6273    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6274    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6275    as_fn_arith $ac_count + 1 && ac_count=$as_val
6276    if test $ac_count -gt ${ac_path_SED_max-0}; then
6277      # Best one so far, save it but keep looking for a better one
6278      ac_cv_path_SED="$ac_path_SED"
6279      ac_path_SED_max=$ac_count
6280    fi
6281    # 10*(2^10) chars as input seems more than enough
6282    test $ac_count -gt 10 && break
6283  done
6284  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6285esac
6286
6287      $ac_path_SED_found && break 3
6288    done
6289  done
6290  done
6291IFS=$as_save_IFS
6292  if test -z "$ac_cv_path_SED"; then
6293    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6294  fi
6295else
6296  ac_cv_path_SED=$SED
6297fi
6298
6299fi
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6301$as_echo "$ac_cv_path_SED" >&6; }
6302 SED="$ac_cv_path_SED"
6303  rm -f conftest.sed
6304
6305
6306    if test "x$SED" = x; then
6307        if test "x" = x; then
6308          PROG_NAME=sed
6309        else
6310          PROG_NAME=
6311        fi
6312        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6313$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6314        as_fn_error $? "Cannot continue" "$LINENO" 5
6315    fi
6316
6317
6318for ac_prog in nawk gawk awk
6319do
6320  # Extract the first word of "$ac_prog", so it can be a program name with args.
6321set dummy $ac_prog; ac_word=$2
6322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6323$as_echo_n "checking for $ac_word... " >&6; }
6324if test "${ac_cv_path_NAWK+set}" = set; then :
6325  $as_echo_n "(cached) " >&6
6326else
6327  case $NAWK in
6328  [\\/]* | ?:[\\/]*)
6329  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6330  ;;
6331  *)
6332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6333for as_dir in $PATH
6334do
6335  IFS=$as_save_IFS
6336  test -z "$as_dir" && as_dir=.
6337    for ac_exec_ext in '' $ac_executable_extensions; do
6338  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6339    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6341    break 2
6342  fi
6343done
6344  done
6345IFS=$as_save_IFS
6346
6347  ;;
6348esac
6349fi
6350NAWK=$ac_cv_path_NAWK
6351if test -n "$NAWK"; then
6352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6353$as_echo "$NAWK" >&6; }
6354else
6355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6356$as_echo "no" >&6; }
6357fi
6358
6359
6360  test -n "$NAWK" && break
6361done
6362
6363
6364    if test "x$NAWK" = x; then
6365        if test "x" = x; then
6366          PROG_NAME=nawk
6367        else
6368          PROG_NAME=
6369        fi
6370        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6371$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6372        as_fn_error $? "Cannot continue" "$LINENO" 5
6373    fi
6374
6375
6376# Always force rm.
6377RM="$RM -f"
6378
6379# These are not required on all platforms
6380# Extract the first word of "cygpath", so it can be a program name with args.
6381set dummy cygpath; ac_word=$2
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6383$as_echo_n "checking for $ac_word... " >&6; }
6384if test "${ac_cv_path_CYGPATH+set}" = set; then :
6385  $as_echo_n "(cached) " >&6
6386else
6387  case $CYGPATH in
6388  [\\/]* | ?:[\\/]*)
6389  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6390  ;;
6391  *)
6392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6393for as_dir in $PATH
6394do
6395  IFS=$as_save_IFS
6396  test -z "$as_dir" && as_dir=.
6397    for ac_exec_ext in '' $ac_executable_extensions; do
6398  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6399    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6401    break 2
6402  fi
6403done
6404  done
6405IFS=$as_save_IFS
6406
6407  ;;
6408esac
6409fi
6410CYGPATH=$ac_cv_path_CYGPATH
6411if test -n "$CYGPATH"; then
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6413$as_echo "$CYGPATH" >&6; }
6414else
6415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; }
6417fi
6418
6419
6420# Extract the first word of "readlink", so it can be a program name with args.
6421set dummy readlink; ac_word=$2
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6423$as_echo_n "checking for $ac_word... " >&6; }
6424if test "${ac_cv_path_READLINK+set}" = set; then :
6425  $as_echo_n "(cached) " >&6
6426else
6427  case $READLINK in
6428  [\\/]* | ?:[\\/]*)
6429  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6430  ;;
6431  *)
6432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6433for as_dir in $PATH
6434do
6435  IFS=$as_save_IFS
6436  test -z "$as_dir" && as_dir=.
6437    for ac_exec_ext in '' $ac_executable_extensions; do
6438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6439    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6441    break 2
6442  fi
6443done
6444  done
6445IFS=$as_save_IFS
6446
6447  ;;
6448esac
6449fi
6450READLINK=$ac_cv_path_READLINK
6451if test -n "$READLINK"; then
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6453$as_echo "$READLINK" >&6; }
6454else
6455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6456$as_echo "no" >&6; }
6457fi
6458
6459
6460# Extract the first word of "df", so it can be a program name with args.
6461set dummy df; ac_word=$2
6462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6463$as_echo_n "checking for $ac_word... " >&6; }
6464if test "${ac_cv_path_DF+set}" = set; then :
6465  $as_echo_n "(cached) " >&6
6466else
6467  case $DF in
6468  [\\/]* | ?:[\\/]*)
6469  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6470  ;;
6471  *)
6472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6473for as_dir in $PATH
6474do
6475  IFS=$as_save_IFS
6476  test -z "$as_dir" && as_dir=.
6477    for ac_exec_ext in '' $ac_executable_extensions; do
6478  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6479    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6481    break 2
6482  fi
6483done
6484  done
6485IFS=$as_save_IFS
6486
6487  ;;
6488esac
6489fi
6490DF=$ac_cv_path_DF
6491if test -n "$DF"; then
6492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6493$as_echo "$DF" >&6; }
6494else
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6496$as_echo "no" >&6; }
6497fi
6498
6499
6500# Extract the first word of "SetFile", so it can be a program name with args.
6501set dummy SetFile; ac_word=$2
6502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6503$as_echo_n "checking for $ac_word... " >&6; }
6504if test "${ac_cv_path_SETFILE+set}" = set; then :
6505  $as_echo_n "(cached) " >&6
6506else
6507  case $SETFILE in
6508  [\\/]* | ?:[\\/]*)
6509  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6510  ;;
6511  *)
6512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6513for as_dir in $PATH
6514do
6515  IFS=$as_save_IFS
6516  test -z "$as_dir" && as_dir=.
6517    for ac_exec_ext in '' $ac_executable_extensions; do
6518  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6519    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6521    break 2
6522  fi
6523done
6524  done
6525IFS=$as_save_IFS
6526
6527  ;;
6528esac
6529fi
6530SETFILE=$ac_cv_path_SETFILE
6531if test -n "$SETFILE"; then
6532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6533$as_echo "$SETFILE" >&6; }
6534else
6535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539
6540
6541
6542# Now we can determine OpenJDK build and target platforms. This is required to
6543# have early on.
6544# Make sure we can run config.sub.
6545$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6546  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6547
6548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6549$as_echo_n "checking build system type... " >&6; }
6550if test "${ac_cv_build+set}" = set; then :
6551  $as_echo_n "(cached) " >&6
6552else
6553  ac_build_alias=$build_alias
6554test "x$ac_build_alias" = x &&
6555  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6556test "x$ac_build_alias" = x &&
6557  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6558ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6559  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6560
6561fi
6562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6563$as_echo "$ac_cv_build" >&6; }
6564case $ac_cv_build in
6565*-*-*) ;;
6566*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6567esac
6568build=$ac_cv_build
6569ac_save_IFS=$IFS; IFS='-'
6570set x $ac_cv_build
6571shift
6572build_cpu=$1
6573build_vendor=$2
6574shift; shift
6575# Remember, the first character of IFS is used to create $*,
6576# except with old shells:
6577build_os=$*
6578IFS=$ac_save_IFS
6579case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6580
6581
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6583$as_echo_n "checking host system type... " >&6; }
6584if test "${ac_cv_host+set}" = set; then :
6585  $as_echo_n "(cached) " >&6
6586else
6587  if test "x$host_alias" = x; then
6588  ac_cv_host=$ac_cv_build
6589else
6590  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6591    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6592fi
6593
6594fi
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6596$as_echo "$ac_cv_host" >&6; }
6597case $ac_cv_host in
6598*-*-*) ;;
6599*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6600esac
6601host=$ac_cv_host
6602ac_save_IFS=$IFS; IFS='-'
6603set x $ac_cv_host
6604shift
6605host_cpu=$1
6606host_vendor=$2
6607shift; shift
6608# Remember, the first character of IFS is used to create $*,
6609# except with old shells:
6610host_os=$*
6611IFS=$ac_save_IFS
6612case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6613
6614
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6616$as_echo_n "checking target system type... " >&6; }
6617if test "${ac_cv_target+set}" = set; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  if test "x$target_alias" = x; then
6621  ac_cv_target=$ac_cv_host
6622else
6623  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6624    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6625fi
6626
6627fi
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6629$as_echo "$ac_cv_target" >&6; }
6630case $ac_cv_target in
6631*-*-*) ;;
6632*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6633esac
6634target=$ac_cv_target
6635ac_save_IFS=$IFS; IFS='-'
6636set x $ac_cv_target
6637shift
6638target_cpu=$1
6639target_vendor=$2
6640shift; shift
6641# Remember, the first character of IFS is used to create $*,
6642# except with old shells:
6643target_os=$*
6644IFS=$ac_save_IFS
6645case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6646
6647
6648# The aliases save the names the user supplied, while $host etc.
6649# will get canonicalized.
6650test -n "$target_alias" &&
6651  test "$program_prefix$program_suffix$program_transform_name" = \
6652    NONENONEs,x,x, &&
6653  program_prefix=${target_alias}-
6654
6655# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6656# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6657# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6658# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6659# to use the configure naming style.
6660
6661
6662
6663
6664
6665    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6666    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6667    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6668    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6669    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6670    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6671
6672
6673
6674    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6675
6676  case "$build_os" in
6677    *linux*)
6678      VAR_OS=linux
6679      VAR_OS_API=posix
6680      VAR_OS_ENV=linux
6681      ;;
6682    *solaris*)
6683      VAR_OS=solaris
6684      VAR_OS_API=posix
6685      VAR_OS_ENV=solaris
6686      ;;
6687    *darwin*)
6688      VAR_OS=macosx
6689      VAR_OS_API=posix
6690      VAR_OS_ENV=macosx
6691      ;;
6692    *bsd*)
6693      VAR_OS=bsd
6694      VAR_OS_API=posix
6695      VAR_OS_ENV=bsd
6696      ;;
6697    *cygwin*)
6698      VAR_OS=windows
6699      VAR_OS_API=winapi
6700      VAR_OS_ENV=windows.cygwin
6701      ;;
6702    *mingw*)
6703      VAR_OS=windows
6704      VAR_OS_API=winapi
6705      VAR_OS_ENV=windows.msys
6706      ;;
6707    *)
6708      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6709      ;;
6710  esac
6711
6712
6713  # First argument is the cpu name from the trip/quad
6714  case "$build_cpu" in
6715    x86_64)
6716      VAR_CPU=x86_64
6717      VAR_CPU_ARCH=x86
6718      VAR_CPU_BITS=64
6719      VAR_CPU_ENDIAN=little
6720      ;;
6721    i?86)
6722      VAR_CPU=x86
6723      VAR_CPU_ARCH=x86
6724      VAR_CPU_BITS=32
6725      VAR_CPU_ENDIAN=little
6726      ;;
6727    arm*)
6728      VAR_CPU=arm
6729      VAR_CPU_ARCH=arm
6730      VAR_CPU_BITS=32
6731      VAR_CPU_ENDIAN=little
6732      ;;
6733    powerpc)
6734      VAR_CPU=ppc
6735      VAR_CPU_ARCH=ppc
6736      VAR_CPU_BITS=32
6737      VAR_CPU_ENDIAN=big
6738       ;;
6739    powerpc64)
6740      VAR_CPU=ppc64
6741      VAR_CPU_ARCH=ppc
6742      VAR_CPU_BITS=64
6743      VAR_CPU_ENDIAN=big
6744       ;;
6745    sparc)
6746      VAR_CPU=sparc
6747      VAR_CPU_ARCH=sparc
6748      VAR_CPU_BITS=32
6749      VAR_CPU_ENDIAN=big
6750       ;;
6751    sparcv9)
6752      VAR_CPU=sparcv9
6753      VAR_CPU_ARCH=sparc
6754      VAR_CPU_BITS=64
6755      VAR_CPU_ENDIAN=big
6756       ;;
6757    *)
6758      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6759      ;;
6760  esac
6761
6762    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6763    OPENJDK_BUILD_OS="$VAR_OS"
6764    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6765    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6766    OPENJDK_BUILD_CPU="$VAR_CPU"
6767    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6768    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6769    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6770
6771
6772
6773
6774
6775
6776
6777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6778$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6780$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6781
6782    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6783
6784  case "$host_os" in
6785    *linux*)
6786      VAR_OS=linux
6787      VAR_OS_API=posix
6788      VAR_OS_ENV=linux
6789      ;;
6790    *solaris*)
6791      VAR_OS=solaris
6792      VAR_OS_API=posix
6793      VAR_OS_ENV=solaris
6794      ;;
6795    *darwin*)
6796      VAR_OS=macosx
6797      VAR_OS_API=posix
6798      VAR_OS_ENV=macosx
6799      ;;
6800    *bsd*)
6801      VAR_OS=bsd
6802      VAR_OS_API=posix
6803      VAR_OS_ENV=bsd
6804      ;;
6805    *cygwin*)
6806      VAR_OS=windows
6807      VAR_OS_API=winapi
6808      VAR_OS_ENV=windows.cygwin
6809      ;;
6810    *mingw*)
6811      VAR_OS=windows
6812      VAR_OS_API=winapi
6813      VAR_OS_ENV=windows.msys
6814      ;;
6815    *)
6816      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6817      ;;
6818  esac
6819
6820
6821  # First argument is the cpu name from the trip/quad
6822  case "$host_cpu" in
6823    x86_64)
6824      VAR_CPU=x86_64
6825      VAR_CPU_ARCH=x86
6826      VAR_CPU_BITS=64
6827      VAR_CPU_ENDIAN=little
6828      ;;
6829    i?86)
6830      VAR_CPU=x86
6831      VAR_CPU_ARCH=x86
6832      VAR_CPU_BITS=32
6833      VAR_CPU_ENDIAN=little
6834      ;;
6835    arm*)
6836      VAR_CPU=arm
6837      VAR_CPU_ARCH=arm
6838      VAR_CPU_BITS=32
6839      VAR_CPU_ENDIAN=little
6840      ;;
6841    powerpc)
6842      VAR_CPU=ppc
6843      VAR_CPU_ARCH=ppc
6844      VAR_CPU_BITS=32
6845      VAR_CPU_ENDIAN=big
6846       ;;
6847    powerpc64)
6848      VAR_CPU=ppc64
6849      VAR_CPU_ARCH=ppc
6850      VAR_CPU_BITS=64
6851      VAR_CPU_ENDIAN=big
6852       ;;
6853    sparc)
6854      VAR_CPU=sparc
6855      VAR_CPU_ARCH=sparc
6856      VAR_CPU_BITS=32
6857      VAR_CPU_ENDIAN=big
6858       ;;
6859    sparcv9)
6860      VAR_CPU=sparcv9
6861      VAR_CPU_ARCH=sparc
6862      VAR_CPU_BITS=64
6863      VAR_CPU_ENDIAN=big
6864       ;;
6865    *)
6866      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6867      ;;
6868  esac
6869
6870    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6871    OPENJDK_TARGET_OS="$VAR_OS"
6872    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6873    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6874    OPENJDK_TARGET_CPU="$VAR_CPU"
6875    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6876    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6877    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6878
6879
6880
6881
6882
6883
6884
6885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6886$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6888$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6889
6890
6891
6892# Check whether --with-target-bits was given.
6893if test "${with_target_bits+set}" = set; then :
6894  withval=$with_target_bits;
6895fi
6896
6897
6898  # We have three types of compiles:
6899  # native  == normal compilation, target system == build system
6900  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6901  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6902  #
6903  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6904    # We're doing a proper cross-compilation
6905    COMPILE_TYPE="cross"
6906  else
6907    COMPILE_TYPE="native"
6908  fi
6909
6910  if test "x$with_target_bits" != x; then
6911    if test "x$COMPILE_TYPE" = "xcross"; then
6912      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6913    fi
6914
6915    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6916      # A reduced build is requested
6917      COMPILE_TYPE="reduced"
6918      OPENJDK_TARGET_CPU_BITS=32
6919      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6920        OPENJDK_TARGET_CPU=x86
6921      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6922        OPENJDK_TARGET_CPU=sparc
6923      else
6924        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6925      fi
6926    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6927      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
6928    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6929      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6930$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6931    else
6932      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6933    fi
6934  fi
6935
6936
6937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6938$as_echo_n "checking compilation type... " >&6; }
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6940$as_echo "$COMPILE_TYPE" >&6; }
6941
6942
6943    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6944       REQUIRED_OS_NAME=SunOS
6945       REQUIRED_OS_VERSION=5.10
6946    fi
6947    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6948       REQUIRED_OS_NAME=Linux
6949       REQUIRED_OS_VERSION=2.6
6950    fi
6951    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6952        REQUIRED_OS_NAME=Windows
6953        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6954            REQUIRED_OS_VERSION=5.2
6955        else
6956            REQUIRED_OS_VERSION=5.1
6957        fi
6958    fi
6959    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6960        REQUIRED_OS_NAME=Darwin
6961        REQUIRED_OS_VERSION=11.2
6962    fi
6963
6964
6965
6966
6967
6968    # Also store the legacy naming of the cpu.
6969    # Ie i586 and amd64 instead of x86 and x86_64
6970    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6971    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6972      OPENJDK_TARGET_CPU_LEGACY="i586"
6973    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6974      # On all platforms except MacOSX replace x86_64 with amd64.
6975      OPENJDK_TARGET_CPU_LEGACY="amd64"
6976    fi
6977
6978
6979    # And the second legacy naming of the cpu.
6980    # Ie i386 and amd64 instead of x86 and x86_64.
6981    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6982    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6983      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6984    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6985      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6986    fi
6987
6988
6989    # This is the name of the cpu (but using i386 and amd64 instead of
6990    # x86 and x86_64, respectively), preceeded by a /, to be used when
6991    # locating libraries. On macosx, it's empty, though.
6992    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6993    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6994        OPENJDK_TARGET_CPU_LIBDIR=""
6995    fi
6996
6997
6998    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6999    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7000    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7001    OPENJDK_TARGET_CPU_ISADIR=""
7002    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7003      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7004          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7005      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7006          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7007      fi
7008    fi
7009
7010
7011    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7012    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7013    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7014      # On linux only, we replace x86 with i386.
7015      OPENJDK_TARGET_CPU_OSARCH="i386"
7016    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7017      # On all platforms except macosx, we replace x86_64 with amd64.
7018      OPENJDK_TARGET_CPU_OSARCH="amd64"
7019    fi
7020
7021
7022    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7023    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7024      OPENJDK_TARGET_CPU_JLI="i386"
7025    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7026      # On all platforms except macosx, we replace x86_64 with amd64.
7027      OPENJDK_TARGET_CPU_JLI="amd64"
7028    fi
7029    # Now setup the -D flags for building libjli.
7030    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7031    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7032      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7033        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7034      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7035        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7036      fi
7037    fi
7038
7039
7040    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7041    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7042        OPENJDK_TARGET_OS_API_DIR="solaris"
7043    fi
7044    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7045        OPENJDK_TARGET_OS_API_DIR="windows"
7046    fi
7047
7048
7049    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7050        A_LP64="LP64:="
7051        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7052        # unpack200.exe
7053        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7054            ADD_LP64="-D_LP64=1"
7055        fi
7056    fi
7057    LP64=$A_LP64
7058
7059
7060    if test "x$COMPILE_TYPE" = "xcross"; then
7061      # FIXME: ... or should this include reduced builds..?
7062      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7063    else
7064      DEFINE_CROSS_COMPILE_ARCH=""
7065    fi
7066
7067
7068
7069
7070# Continue setting up basic stuff. Most remaining code require fundamental tools.
7071
7072# Locate the directory of this script.
7073SCRIPT="$0"
7074
7075    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7076        # Follow a chain of symbolic links. Use readlink
7077        # where it exists, else fall back to horribly
7078        # complicated shell code.
7079        if test "x$READLINK_TESTED" != yes; then
7080            # On MacOSX there is a readlink tool with a different
7081            # purpose than the GNU readlink tool. Check the found readlink.
7082            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7083            if test "x$ISGNU" = x; then
7084                 # A readlink that we do not know how to use.
7085                 # Are there other non-GNU readlinks out there?
7086                 READLINK_TESTED=yes
7087                 READLINK=
7088            fi
7089        fi
7090
7091        if test "x$READLINK" != x; then
7092            SCRIPT=`$READLINK -f $SCRIPT`
7093        else
7094            # Save the current directory for restoring afterwards
7095            STARTDIR=$PWD
7096            COUNTER=0
7097            sym_link_dir=`$DIRNAME $SCRIPT`
7098            sym_link_file=`$BASENAME $SCRIPT`
7099            # Use the system pwd and not the shell builtin to resolve directory symlinks
7100            cd $sym_link_dir
7101            cd `$THEPWDCMD`
7102            sym_link_dir=`$THEPWDCMD`
7103            # Resolve file symlinks
7104            while test $COUNTER -lt 20; do
7105                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7106                if test "x$ISLINK" == x; then
7107                    # This is not a symbolic link! We are done!
7108                    break
7109                fi
7110                # Again resolve directory symlinks since the target of the just found
7111                # link could be in a different directory
7112                cd `$DIRNAME $ISLINK`
7113                sym_link_dir=`$THEPWDCMD`
7114                sym_link_file=`$BASENAME $ISLINK`
7115                let COUNTER=COUNTER+1
7116            done
7117            cd $STARTDIR
7118            SCRIPT=$sym_link_dir/$sym_link_file
7119        fi
7120    fi
7121
7122AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7123
7124# Where is the source? It is located two levels above the configure script.
7125CURDIR="$PWD"
7126cd "$AUTOCONF_DIR/../.."
7127SRC_ROOT="`$THEPWDCMD`"
7128
7129if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7130  PATH_SEP=";"
7131
7132  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7133  if test $SRC_ROOT_LENGTH -gt 100; then
7134      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7135  fi
7136
7137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7139$as_echo_n "checking cygwin release... " >&6; }
7140    CYGWIN_VERSION=`$UNAME -r`
7141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7142$as_echo "$CYGWIN_VERSION" >&6; }
7143    WINDOWS_ENV_VENDOR='cygwin'
7144    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7145
7146    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7147    if test "x$CYGWIN_VERSION_OK" = x; then
7148      { $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
7149$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;}
7150      as_fn_error $? "Cannot continue" "$LINENO" 5
7151    fi
7152    if test "x$CYGPATH" = x; then
7153        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7154    fi
7155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7156$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7157    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7158    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7159    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7160    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7162$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7163    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7164    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7165    if test "x$test_cygdrive_prefix" = x; then
7166        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7167    fi
7168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7170$as_echo_n "checking msys release... " >&6; }
7171    MSYS_VERSION=`$UNAME -r`
7172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7173$as_echo "$MSYS_VERSION" >&6; }
7174
7175    WINDOWS_ENV_VENDOR='msys'
7176    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7177
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7179$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7180    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7181    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7182
7183  windows_path="$MSYS_ROOT_PATH"
7184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7185    unix_path=`$CYGPATH -u "$windows_path"`
7186    MSYS_ROOT_PATH="$unix_path"
7187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7189    MSYS_ROOT_PATH="$unix_path"
7190  fi
7191
7192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7193$as_echo "$MSYS_ROOT_PATH" >&6; }
7194    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7195  else
7196    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7197  fi
7198
7199  # Test if windows or unix (cygwin/msys) find is first in path.
7200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7201$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7202  FIND_BINARY_OUTPUT=`find --version 2>&1`
7203  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7205$as_echo "unix style" >&6; }
7206  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7208$as_echo "Windows" >&6; }
7209    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7210$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7211    { $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
7212$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7213    as_fn_error $? "Cannot continue" "$LINENO" 5
7214  else
7215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7216$as_echo "unknown" >&6; }
7217    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7218$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7219  fi
7220
7221else
7222  PATH_SEP=":"
7223fi
7224
7225
7226
7227cd "$CURDIR"
7228
7229
7230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7231
7232  # Input might be given as Windows format, start by converting to
7233  # unix format.
7234  path="$SRC_ROOT"
7235  new_path=`$CYGPATH -u "$path"`
7236
7237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7240  # "foo.exe" is OK but "foo" is an error.
7241  #
7242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7243  # It is also a way to make sure we got the proper file name for the real test later on.
7244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7245  if test "x$test_shortpath" = x; then
7246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7247$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7248    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7249  fi
7250
7251  # Call helper function which possibly converts this using DOS-style short mode.
7252  # If so, the updated path is stored in $new_path.
7253
7254  input_path="$new_path"
7255  # Check if we need to convert this using DOS-style short mode. If the path
7256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7257  # take no chances and rewrite it.
7258  # Note: m4 eats our [], so we need to use [ and ] instead.
7259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7260  if test "x$has_forbidden_chars" != x; then
7261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7265      # Going to short mode and back again did indeed matter. Since short mode is
7266      # case insensitive, let's make it lowercase to improve readability.
7267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7268      # Now convert it back to Unix-stile (cygpath)
7269      input_path=`$CYGPATH -u "$shortmode_path"`
7270      new_path="$input_path"
7271    fi
7272  fi
7273
7274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7275  if test "x$test_cygdrive_prefix" = x; then
7276    # As a simple fix, exclude /usr/bin since it's not a real path.
7277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7279      # a path prefixed by /cygdrive for fixpath to work.
7280      new_path="$CYGWIN_ROOT_PATH$input_path"
7281    fi
7282  fi
7283
7284
7285  if test "x$path" != "x$new_path"; then
7286    SRC_ROOT="$new_path"
7287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7288$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7289  fi
7290
7291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7292
7293  path="$SRC_ROOT"
7294  has_colon=`$ECHO $path | $GREP ^.:`
7295  new_path="$path"
7296  if test "x$has_colon" = x; then
7297    # Not in mixed or Windows style, start by that.
7298    new_path=`cmd //c echo $path`
7299  fi
7300
7301
7302  input_path="$new_path"
7303  # Check if we need to convert this using DOS-style short mode. If the path
7304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7305  # take no chances and rewrite it.
7306  # Note: m4 eats our [], so we need to use [ and ] instead.
7307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7308  if test "x$has_forbidden_chars" != x; then
7309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7311  fi
7312
7313
7314  windows_path="$new_path"
7315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7316    unix_path=`$CYGPATH -u "$windows_path"`
7317    new_path="$unix_path"
7318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7320    new_path="$unix_path"
7321  fi
7322
7323  if test "x$path" != "x$new_path"; then
7324    SRC_ROOT="$new_path"
7325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7326$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7327  fi
7328
7329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7331
7332  else
7333    # We're on a posix platform. Hooray! :)
7334    path="$SRC_ROOT"
7335
7336    if test ! -f "$path" && test ! -d "$path"; then
7337      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7338    fi
7339
7340    has_space=`$ECHO "$path" | $GREP " "`
7341    if test "x$has_space" != x; then
7342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7343$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7344      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7345    fi
7346  fi
7347
7348
7349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7350
7351  # Input might be given as Windows format, start by converting to
7352  # unix format.
7353  path="$CURDIR"
7354  new_path=`$CYGPATH -u "$path"`
7355
7356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7359  # "foo.exe" is OK but "foo" is an error.
7360  #
7361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7362  # It is also a way to make sure we got the proper file name for the real test later on.
7363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7364  if test "x$test_shortpath" = x; then
7365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7366$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7367    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7368  fi
7369
7370  # Call helper function which possibly converts this using DOS-style short mode.
7371  # If so, the updated path is stored in $new_path.
7372
7373  input_path="$new_path"
7374  # Check if we need to convert this using DOS-style short mode. If the path
7375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7376  # take no chances and rewrite it.
7377  # Note: m4 eats our [], so we need to use [ and ] instead.
7378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7379  if test "x$has_forbidden_chars" != x; then
7380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7384      # Going to short mode and back again did indeed matter. Since short mode is
7385      # case insensitive, let's make it lowercase to improve readability.
7386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7387      # Now convert it back to Unix-stile (cygpath)
7388      input_path=`$CYGPATH -u "$shortmode_path"`
7389      new_path="$input_path"
7390    fi
7391  fi
7392
7393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7394  if test "x$test_cygdrive_prefix" = x; then
7395    # As a simple fix, exclude /usr/bin since it's not a real path.
7396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7398      # a path prefixed by /cygdrive for fixpath to work.
7399      new_path="$CYGWIN_ROOT_PATH$input_path"
7400    fi
7401  fi
7402
7403
7404  if test "x$path" != "x$new_path"; then
7405    CURDIR="$new_path"
7406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7407$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7408  fi
7409
7410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7411
7412  path="$CURDIR"
7413  has_colon=`$ECHO $path | $GREP ^.:`
7414  new_path="$path"
7415  if test "x$has_colon" = x; then
7416    # Not in mixed or Windows style, start by that.
7417    new_path=`cmd //c echo $path`
7418  fi
7419
7420
7421  input_path="$new_path"
7422  # Check if we need to convert this using DOS-style short mode. If the path
7423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7424  # take no chances and rewrite it.
7425  # Note: m4 eats our [], so we need to use [ and ] instead.
7426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7427  if test "x$has_forbidden_chars" != x; then
7428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7430  fi
7431
7432
7433  windows_path="$new_path"
7434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7435    unix_path=`$CYGPATH -u "$windows_path"`
7436    new_path="$unix_path"
7437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7439    new_path="$unix_path"
7440  fi
7441
7442  if test "x$path" != "x$new_path"; then
7443    CURDIR="$new_path"
7444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7445$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7446  fi
7447
7448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7450
7451  else
7452    # We're on a posix platform. Hooray! :)
7453    path="$CURDIR"
7454
7455    if test ! -f "$path" && test ! -d "$path"; then
7456      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7457    fi
7458
7459    has_space=`$ECHO "$path" | $GREP " "`
7460    if test "x$has_space" != x; then
7461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7462$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7463      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7464    fi
7465  fi
7466
7467
7468if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7469    # Add extra search paths on solaris for utilities like ar and as etc...
7470    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7471fi
7472
7473# You can force the sys-root if the sys-root encoded into the cross compiler tools
7474# is not correct.
7475
7476# Check whether --with-sys-root was given.
7477if test "${with_sys_root+set}" = set; then :
7478  withval=$with_sys_root;
7479fi
7480
7481
7482if test "x$with_sys_root" != x; then
7483  SYS_ROOT=$with_sys_root
7484else
7485  SYS_ROOT=/
7486fi
7487
7488
7489
7490# Check whether --with-tools-dir was given.
7491if test "${with_tools_dir+set}" = set; then :
7492  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7493fi
7494
7495
7496
7497# Check whether --with-devkit was given.
7498if test "${with_devkit+set}" = set; then :
7499  withval=$with_devkit;
7500    if test "x$with_sys_root" != x; then
7501      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7502    fi
7503    if test "x$with_tools_dir" != x; then
7504      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7505    fi
7506    TOOLS_DIR=$with_devkit/bin
7507    SYS_ROOT=$with_devkit/$host_alias/libc
7508
7509fi
7510
7511
7512
7513
7514# Setup default logging of stdout and stderr to build.log in the output root.
7515BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7516BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7517BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7518
7519
7520
7521
7522
7523# Check if it's a pure open build or if custom sources are to be used.
7524
7525  # Check whether --enable-openjdk-only was given.
7526if test "${enable_openjdk_only+set}" = set; then :
7527  enableval=$enable_openjdk_only;
7528else
7529  enable_openjdk_only="no"
7530fi
7531
7532
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7534$as_echo_n "checking for presence of closed sources... " >&6; }
7535  if test -d "$SRC_ROOT/jdk/src/closed"; then
7536    CLOSED_SOURCE_PRESENT=yes
7537  else
7538    CLOSED_SOURCE_PRESENT=no
7539  fi
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7541$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7542
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7544$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7545  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7547$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7548
7549  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7550    OPENJDK=true
7551    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7552      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7553$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7554    fi
7555  else
7556    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7557      OPENJDK=true
7558    else
7559      OPENJDK=false
7560    fi
7561  fi
7562
7563  if test "x$OPENJDK" = "xtrue"; then
7564    SET_OPENJDK="OPENJDK=true"
7565  fi
7566
7567
7568
7569
7570# These are needed to be able to create a configuration name (and thus the output directory)
7571
7572###############################################################################
7573#
7574# Check which variant of the JDK that we want to build.
7575# Currently we have:
7576#    normal:   standard edition
7577# but the custom make system may add other variants
7578#
7579# Effectively the JDK variant gives a name to a specific set of
7580# modules to compile into the JDK. In the future, these modules
7581# might even be Jigsaw modules.
7582#
7583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7584$as_echo_n "checking which variant of the JDK to build... " >&6; }
7585
7586# Check whether --with-jdk-variant was given.
7587if test "${with_jdk_variant+set}" = set; then :
7588  withval=$with_jdk_variant;
7589fi
7590
7591
7592if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7593    JDK_VARIANT="normal"
7594else
7595    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7596fi
7597
7598
7599
7600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7601$as_echo "$JDK_VARIANT" >&6; }
7602
7603
7604
7605###############################################################################
7606#
7607# Check which variants of the JVM that we want to build.
7608# Currently we have:
7609#    server: normal interpreter and a tiered C1/C2 compiler
7610#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7611#    minimal1: reduced form of client with optional VM services and features stripped out
7612#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7613#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7614#    zero: no machine code interpreter, no compiler
7615#    zeroshark: zero interpreter and shark/llvm compiler backend
7616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7617$as_echo_n "checking which variants of the JVM to build... " >&6; }
7618
7619# Check whether --with-jvm-variants was given.
7620if test "${with_jvm_variants+set}" = set; then :
7621  withval=$with_jvm_variants;
7622fi
7623
7624
7625if test "x$with_jvm_variants" = x; then
7626     with_jvm_variants="server"
7627fi
7628
7629JVM_VARIANTS=",$with_jvm_variants,"
7630TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7631
7632if test "x$TEST_VARIANTS" != "x,"; then
7633   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7634fi
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7636$as_echo "$with_jvm_variants" >&6; }
7637
7638JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7639JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7640JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7641JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7642JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7643JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7644
7645if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7646    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7647        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7648    fi
7649fi
7650if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7651    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7652        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7653    fi
7654fi
7655if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7656    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7657        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7658    fi
7659fi
7660
7661# Replace the commas with AND for use in the build directory name.
7662ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7663COUNT_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/'`
7664if test "x$COUNT_VARIANTS" != "x,1"; then
7665    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7666else
7667    BUILDING_MULTIPLE_JVM_VARIANTS=no
7668fi
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7679   MACOSX_UNIVERSAL="true"
7680fi
7681
7682
7683
7684
7685
7686###############################################################################
7687#
7688# Set the debug level
7689#    release: no debug information, all optimizations, no asserts.
7690#    fastdebug: debug information (-g), all optimizations, all asserts
7691#    slowdebug: debug information (-g), no optimizations, all asserts
7692#
7693DEBUG_LEVEL="release"
7694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7695$as_echo_n "checking which debug level to use... " >&6; }
7696# Check whether --enable-debug was given.
7697if test "${enable_debug+set}" = set; then :
7698  enableval=$enable_debug;
7699        ENABLE_DEBUG="${enableval}"
7700        DEBUG_LEVEL="fastdebug"
7701
7702else
7703  ENABLE_DEBUG="no"
7704fi
7705
7706
7707
7708# Check whether --with-debug-level was given.
7709if test "${with_debug_level+set}" = set; then :
7710  withval=$with_debug_level;
7711        DEBUG_LEVEL="${withval}"
7712        if test "x$ENABLE_DEBUG" = xyes; then
7713			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7714        fi
7715
7716fi
7717
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7719$as_echo "$DEBUG_LEVEL" >&6; }
7720
7721if test "x$DEBUG_LEVEL" != xrelease && \
7722   test "x$DEBUG_LEVEL" != xfastdebug && \
7723   test "x$DEBUG_LEVEL" != xslowdebug; then
7724   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7725fi
7726
7727
7728###############################################################################
7729#
7730# Setup legacy vars/targets and new vars to deal with different debug levels.
7731#
7732
7733case $DEBUG_LEVEL in
7734      release )
7735          VARIANT="OPT"
7736          FASTDEBUG="false"
7737          DEBUG_CLASSFILES="false"
7738          BUILD_VARIANT_RELEASE=""
7739          HOTSPOT_DEBUG_LEVEL="product"
7740          HOTSPOT_EXPORT="product"
7741           ;;
7742      fastdebug )
7743          VARIANT="DBG"
7744          FASTDEBUG="true"
7745          DEBUG_CLASSFILES="true"
7746          BUILD_VARIANT_RELEASE="-fastdebug"
7747          HOTSPOT_DEBUG_LEVEL="fastdebug"
7748          HOTSPOT_EXPORT="fastdebug"
7749           ;;
7750      slowdebug )
7751          VARIANT="DBG"
7752          FASTDEBUG="false"
7753          DEBUG_CLASSFILES="true"
7754          BUILD_VARIANT_RELEASE="-debug"
7755          HOTSPOT_DEBUG_LEVEL="jvmg"
7756          HOTSPOT_EXPORT="debug"
7757           ;;
7758esac
7759
7760#####
7761# Generate the legacy makefile targets for hotspot.
7762# The hotspot api for selecting the build artifacts, really, needs to be improved.
7763# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7764# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7765# But until then ...
7766HOTSPOT_TARGET=""
7767
7768if test "x$JVM_VARIANT_SERVER" = xtrue; then
7769    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7770fi
7771
7772if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7773    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7774fi
7775
7776if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7777    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7778fi
7779
7780if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7781    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7782fi
7783
7784if test "x$JVM_VARIANT_ZERO" = xtrue; then
7785    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7786fi
7787
7788if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7789    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7790fi
7791
7792HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7793
7794# On Macosx universal binaries are produced, but they only contain
7795# 64 bit intel. This invalidates control of which jvms are built
7796# from configure, but only server is valid anyway. Fix this
7797# when hotspot makefiles are rewritten.
7798if test "x$MACOSX_UNIVERSAL" = xtrue; then
7799    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7800fi
7801
7802#####
7803
7804
7805
7806
7807
7808
7809
7810
7811# With basic setup done, call the custom early hook.
7812
7813
7814# To properly create a configuration name, we need to have the OpenJDK target
7815# and options (variants and debug level) parsed.
7816
7817
7818
7819# Check whether --with-conf-name was given.
7820if test "${with_conf_name+set}" = set; then :
7821  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7822fi
7823
7824
7825# Test from where we are running configure, in or outside of src root.
7826# To enable comparison of directories, CURDIR needs to be symlink free
7827# just like SRC_ROOT already is
7828NOSYM_CURDIR="$CURDIR"
7829
7830    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7831        # Follow a chain of symbolic links. Use readlink
7832        # where it exists, else fall back to horribly
7833        # complicated shell code.
7834        if test "x$READLINK_TESTED" != yes; then
7835            # On MacOSX there is a readlink tool with a different
7836            # purpose than the GNU readlink tool. Check the found readlink.
7837            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7838            if test "x$ISGNU" = x; then
7839                 # A readlink that we do not know how to use.
7840                 # Are there other non-GNU readlinks out there?
7841                 READLINK_TESTED=yes
7842                 READLINK=
7843            fi
7844        fi
7845
7846        if test "x$READLINK" != x; then
7847            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7848        else
7849            # Save the current directory for restoring afterwards
7850            STARTDIR=$PWD
7851            COUNTER=0
7852            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7853            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7854            # Use the system pwd and not the shell builtin to resolve directory symlinks
7855            cd $sym_link_dir
7856            cd `$THEPWDCMD`
7857            sym_link_dir=`$THEPWDCMD`
7858            # Resolve file symlinks
7859            while test $COUNTER -lt 20; do
7860                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7861                if test "x$ISLINK" == x; then
7862                    # This is not a symbolic link! We are done!
7863                    break
7864                fi
7865                # Again resolve directory symlinks since the target of the just found
7866                # link could be in a different directory
7867                cd `$DIRNAME $ISLINK`
7868                sym_link_dir=`$THEPWDCMD`
7869                sym_link_file=`$BASENAME $ISLINK`
7870                let COUNTER=COUNTER+1
7871            done
7872            cd $STARTDIR
7873            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7874        fi
7875    fi
7876
7877if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7878        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7879        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7880    # We are running configure from the src root.
7881    # Create a default ./build/target-variant-debuglevel output root.
7882    if test "x${CONF_NAME}" = x; then
7883        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7884    fi
7885    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7886    $MKDIR -p "$OUTPUT_ROOT"
7887    if test ! -d "$OUTPUT_ROOT"; then
7888        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7889    fi
7890else
7891    # We are running configure from outside of the src dir.
7892    # Then use the current directory as output dir!
7893    # If configuration is situated in normal build directory, just use the build
7894    # directory name as configuration name, otherwise use the complete path.
7895    if test "x${CONF_NAME}" = x; then
7896        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7897    fi
7898    OUTPUT_ROOT="$CURDIR"
7899
7900    # WARNING: This might be a bad thing to do. You need to be sure you want to
7901    # have a configuration in this directory. Do some sanity checks!
7902
7903    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7904      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7905      # other files
7906      files_present=`$LS $OUTPUT_ROOT`
7907      # Configure has already touched config.log and confdefs.h in the current dir when this check
7908      # is performed.
7909      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7910                                             | $TR -d '\n'`
7911      if test "x$filtered_files" != x; then
7912        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7913$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7914        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7915$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7917$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7918        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7919$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7920        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7921$as_echo "$as_me: seriously mess up just about everything." >&6;}
7922        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7923$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7924        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7925$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7926        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7927      fi
7928    fi
7929fi
7930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7931$as_echo_n "checking what configuration name to use... " >&6; }
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7933$as_echo "$CONF_NAME" >&6; }
7934
7935
7936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7937
7938  # Input might be given as Windows format, start by converting to
7939  # unix format.
7940  path="$OUTPUT_ROOT"
7941  new_path=`$CYGPATH -u "$path"`
7942
7943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7946  # "foo.exe" is OK but "foo" is an error.
7947  #
7948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7949  # It is also a way to make sure we got the proper file name for the real test later on.
7950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7951  if test "x$test_shortpath" = x; then
7952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7953$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7954    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7955  fi
7956
7957  # Call helper function which possibly converts this using DOS-style short mode.
7958  # If so, the updated path is stored in $new_path.
7959
7960  input_path="$new_path"
7961  # Check if we need to convert this using DOS-style short mode. If the path
7962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7963  # take no chances and rewrite it.
7964  # Note: m4 eats our [], so we need to use [ and ] instead.
7965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7966  if test "x$has_forbidden_chars" != x; then
7967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7971      # Going to short mode and back again did indeed matter. Since short mode is
7972      # case insensitive, let's make it lowercase to improve readability.
7973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7974      # Now convert it back to Unix-stile (cygpath)
7975      input_path=`$CYGPATH -u "$shortmode_path"`
7976      new_path="$input_path"
7977    fi
7978  fi
7979
7980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7981  if test "x$test_cygdrive_prefix" = x; then
7982    # As a simple fix, exclude /usr/bin since it's not a real path.
7983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7985      # a path prefixed by /cygdrive for fixpath to work.
7986      new_path="$CYGWIN_ROOT_PATH$input_path"
7987    fi
7988  fi
7989
7990
7991  if test "x$path" != "x$new_path"; then
7992    OUTPUT_ROOT="$new_path"
7993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7994$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7995  fi
7996
7997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7998
7999  path="$OUTPUT_ROOT"
8000  has_colon=`$ECHO $path | $GREP ^.:`
8001  new_path="$path"
8002  if test "x$has_colon" = x; then
8003    # Not in mixed or Windows style, start by that.
8004    new_path=`cmd //c echo $path`
8005  fi
8006
8007
8008  input_path="$new_path"
8009  # Check if we need to convert this using DOS-style short mode. If the path
8010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8011  # take no chances and rewrite it.
8012  # Note: m4 eats our [], so we need to use [ and ] instead.
8013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8014  if test "x$has_forbidden_chars" != x; then
8015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8017  fi
8018
8019
8020  windows_path="$new_path"
8021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8022    unix_path=`$CYGPATH -u "$windows_path"`
8023    new_path="$unix_path"
8024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8026    new_path="$unix_path"
8027  fi
8028
8029  if test "x$path" != "x$new_path"; then
8030    OUTPUT_ROOT="$new_path"
8031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8032$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8033  fi
8034
8035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8037
8038  else
8039    # We're on a posix platform. Hooray! :)
8040    path="$OUTPUT_ROOT"
8041
8042    if test ! -f "$path" && test ! -d "$path"; then
8043      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8044    fi
8045
8046    has_space=`$ECHO "$path" | $GREP " "`
8047    if test "x$has_space" != x; then
8048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8049$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8050      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8051    fi
8052  fi
8053
8054
8055SPEC=$OUTPUT_ROOT/spec.gmk
8056
8057CONF_NAME=$CONF_NAME
8058
8059OUTPUT_ROOT=$OUTPUT_ROOT
8060
8061
8062# Most of the probed defines are put into config.h
8063ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8064
8065# The spec.gmk file contains all variables for the make system.
8066ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8067
8068# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8069ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8070
8071# The bootcycle-spec.gmk file contains support for boot cycle builds.
8072ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8073
8074# The compare.sh is used to compare the build output to other builds.
8075ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8076
8077# Spec.sh is currently used by compare-objects.sh
8078ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8079
8080# The generated Makefile knows where the spec.gmk is and where the source is.
8081# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8082# which will look for generated configurations
8083ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8084
8085
8086# Save the arguments given to us
8087echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8088
8089
8090# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8091
8092    for ac_prog in apt-get yum port pkgutil pkgadd
8093do
8094  # Extract the first word of "$ac_prog", so it can be a program name with args.
8095set dummy $ac_prog; ac_word=$2
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8097$as_echo_n "checking for $ac_word... " >&6; }
8098if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8099  $as_echo_n "(cached) " >&6
8100else
8101  if test -n "$PKGHANDLER"; then
8102  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8103else
8104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8105for as_dir in $PATH
8106do
8107  IFS=$as_save_IFS
8108  test -z "$as_dir" && as_dir=.
8109    for ac_exec_ext in '' $ac_executable_extensions; do
8110  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8111    ac_cv_prog_PKGHANDLER="$ac_prog"
8112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8113    break 2
8114  fi
8115done
8116  done
8117IFS=$as_save_IFS
8118
8119fi
8120fi
8121PKGHANDLER=$ac_cv_prog_PKGHANDLER
8122if test -n "$PKGHANDLER"; then
8123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8124$as_echo "$PKGHANDLER" >&6; }
8125else
8126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8127$as_echo "no" >&6; }
8128fi
8129
8130
8131  test -n "$PKGHANDLER" && break
8132done
8133
8134
8135
8136# Setup tools that requires more complex handling, or that is not needed by the configure script.
8137
8138
8139  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8140  if test "x$MAKE" != x; then
8141    # User has supplied a make, test it.
8142    if test ! -f "$MAKE"; then
8143      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8144    fi
8145
8146  MAKE_CANDIDATE=""$MAKE""
8147  DESCRIPTION="user supplied MAKE=$MAKE"
8148  if test "x$MAKE_CANDIDATE" != x; then
8149    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8150$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8151    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8152    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8153    if test "x$IS_GNU_MAKE" = x; then
8154      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8155$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8156    else
8157      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8158      if test "x$IS_MODERN_MAKE" = x; then
8159        { $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
8160$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;}
8161      else
8162        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8163          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8164            MAKE_EXPECTED_ENV='cygwin'
8165          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8166            MAKE_EXPECTED_ENV='msys'
8167          else
8168            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8169          fi
8170          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8171          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8172        else
8173          # Not relevant for non-Windows
8174          IS_MAKE_CORRECT_ENV=true
8175        fi
8176        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8177          { $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
8178$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;}
8179        else
8180          FOUND_MAKE=$MAKE_CANDIDATE
8181
8182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8183
8184  # First separate the path from the arguments. This will split at the first
8185  # space.
8186  complete="$FOUND_MAKE"
8187  path="${complete%% *}"
8188  tmp="$complete EOL"
8189  arguments="${tmp#* }"
8190
8191  # Input might be given as Windows format, start by converting to
8192  # unix format.
8193  new_path=`$CYGPATH -u "$path"`
8194
8195  # Now try to locate executable using which
8196  new_path=`$WHICH "$new_path" 2> /dev/null`
8197  # bat and cmd files are not always considered executable in cygwin causing which
8198  # to not find them
8199  if test "x$new_path" = x \
8200           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8201           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8202    new_path=`$CYGPATH -u "$path"`
8203  fi
8204  if test "x$new_path" = x; then
8205    # Oops. Which didn't find the executable.
8206    # The splitting of arguments from the executable at a space might have been incorrect,
8207    # since paths with space are more likely in Windows. Give it another try with the whole
8208    # argument.
8209    path="$complete"
8210    arguments="EOL"
8211    new_path=`$CYGPATH -u "$path"`
8212    new_path=`$WHICH "$new_path" 2> /dev/null`
8213    # bat and cmd files are not always considered executable in cygwin causing which
8214    # to not find them
8215    if test "x$new_path" = x \
8216             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8217             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8218      new_path=`$CYGPATH -u "$path"`
8219    fi
8220    if test "x$new_path" = x; then
8221      # It's still not found. Now this is an unrecoverable error.
8222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8223$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8224      has_space=`$ECHO "$complete" | $GREP " "`
8225      if test "x$has_space" != x; then
8226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8228      fi
8229      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8230    fi
8231  fi
8232
8233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8236  # "foo.exe" is OK but "foo" is an error.
8237  #
8238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8239  # It is also a way to make sure we got the proper file name for the real test later on.
8240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8241  if test "x$test_shortpath" = x; then
8242    # Short path failed, file does not exist as specified.
8243    # Try adding .exe or .cmd
8244    if test -f "${new_path}.exe"; then
8245       input_to_shortpath="${new_path}.exe"
8246    elif test -f "${new_path}.cmd"; then
8247       input_to_shortpath="${new_path}.cmd"
8248    else
8249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8250$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8253      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8254    fi
8255  else
8256    input_to_shortpath="$new_path"
8257  fi
8258
8259  # Call helper function which possibly converts this using DOS-style short mode.
8260  # If so, the updated path is stored in $new_path.
8261  new_path="$input_to_shortpath"
8262
8263  input_path="$input_to_shortpath"
8264  # Check if we need to convert this using DOS-style short mode. If the path
8265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8266  # take no chances and rewrite it.
8267  # Note: m4 eats our [], so we need to use [ and ] instead.
8268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8269  if test "x$has_forbidden_chars" != x; then
8270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8274      # Going to short mode and back again did indeed matter. Since short mode is
8275      # case insensitive, let's make it lowercase to improve readability.
8276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8277      # Now convert it back to Unix-stile (cygpath)
8278      input_path=`$CYGPATH -u "$shortmode_path"`
8279      new_path="$input_path"
8280    fi
8281  fi
8282
8283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8284  if test "x$test_cygdrive_prefix" = x; then
8285    # As a simple fix, exclude /usr/bin since it's not a real path.
8286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8288      # a path prefixed by /cygdrive for fixpath to work.
8289      new_path="$CYGWIN_ROOT_PATH$input_path"
8290    fi
8291  fi
8292
8293  # remove trailing .exe if any
8294  new_path="${new_path/%.exe/}"
8295
8296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8297
8298  # First separate the path from the arguments. This will split at the first
8299  # space.
8300  complete="$FOUND_MAKE"
8301  path="${complete%% *}"
8302  tmp="$complete EOL"
8303  arguments="${tmp#* }"
8304
8305  # Input might be given as Windows format, start by converting to
8306  # unix format.
8307  new_path="$path"
8308
8309  windows_path="$new_path"
8310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8311    unix_path=`$CYGPATH -u "$windows_path"`
8312    new_path="$unix_path"
8313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8315    new_path="$unix_path"
8316  fi
8317
8318
8319  # Now try to locate executable using which
8320  new_path=`$WHICH "$new_path" 2> /dev/null`
8321
8322  if test "x$new_path" = x; then
8323    # Oops. Which didn't find the executable.
8324    # The splitting of arguments from the executable at a space might have been incorrect,
8325    # since paths with space are more likely in Windows. Give it another try with the whole
8326    # argument.
8327    path="$complete"
8328    arguments="EOL"
8329    new_path="$path"
8330
8331  windows_path="$new_path"
8332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8333    unix_path=`$CYGPATH -u "$windows_path"`
8334    new_path="$unix_path"
8335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8337    new_path="$unix_path"
8338  fi
8339
8340
8341    new_path=`$WHICH "$new_path" 2> /dev/null`
8342
8343    if test "x$new_path" = x; then
8344      # It's still not found. Now this is an unrecoverable error.
8345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8346$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8347      has_space=`$ECHO "$complete" | $GREP " "`
8348      if test "x$has_space" != x; then
8349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8351      fi
8352      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8353    fi
8354  fi
8355
8356  # Now new_path has a complete unix path to the binary
8357  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8358    # Keep paths in /bin as-is, but remove trailing .exe if any
8359    new_path="${new_path/%.exe/}"
8360    # Do not save /bin paths to all_fixpath_prefixes!
8361  else
8362    # Not in mixed or Windows style, start by that.
8363    new_path=`cmd //c echo $new_path`
8364
8365  input_path="$new_path"
8366  # Check if we need to convert this using DOS-style short mode. If the path
8367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8368  # take no chances and rewrite it.
8369  # Note: m4 eats our [], so we need to use [ and ] instead.
8370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8371  if test "x$has_forbidden_chars" != x; then
8372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8374  fi
8375
8376    # Output is in $new_path
8377
8378  windows_path="$new_path"
8379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8380    unix_path=`$CYGPATH -u "$windows_path"`
8381    new_path="$unix_path"
8382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8384    new_path="$unix_path"
8385  fi
8386
8387    # remove trailing .exe if any
8388    new_path="${new_path/%.exe/}"
8389
8390    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8391    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8392  fi
8393
8394  else
8395    # We're on a posix platform. Hooray! :)
8396    # First separate the path from the arguments. This will split at the first
8397    # space.
8398    complete="$FOUND_MAKE"
8399    path="${complete%% *}"
8400    tmp="$complete EOL"
8401    arguments="${tmp#* }"
8402
8403    # Cannot rely on the command "which" here since it doesn't always work.
8404    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8405    if test -z "$is_absolute_path"; then
8406      # Path to executable is not absolute. Find it.
8407      IFS_save="$IFS"
8408      IFS=:
8409      for p in $PATH; do
8410        if test -f "$p/$path" && test -x "$p/$path"; then
8411          new_path="$p/$path"
8412          break
8413        fi
8414      done
8415      IFS="$IFS_save"
8416    else
8417      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8418$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8419      new_path="$path"
8420    fi
8421
8422    if test "x$new_path" = x; then
8423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8424$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8425        has_space=`$ECHO "$complete" | $GREP " "`
8426        if test "x$has_space" != x; then
8427          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8428$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8429        fi
8430        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8431      fi
8432  fi
8433
8434      # Now join together the path and the arguments once again
8435      if test "x$arguments" != xEOL; then
8436        new_complete="$new_path ${arguments% *}"
8437      else
8438        new_complete="$new_path"
8439      fi
8440
8441  if test "x$complete" != "x$new_complete"; then
8442      FOUND_MAKE="$new_complete"
8443      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8444$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8445    fi
8446
8447        fi
8448      fi
8449    fi
8450  fi
8451
8452    if test "x$FOUND_MAKE" = x; then
8453      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8454    fi
8455  else
8456    # Try our hardest to locate a correct version of GNU make
8457    for ac_prog in gmake
8458do
8459  # Extract the first word of "$ac_prog", so it can be a program name with args.
8460set dummy $ac_prog; ac_word=$2
8461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8462$as_echo_n "checking for $ac_word... " >&6; }
8463if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8464  $as_echo_n "(cached) " >&6
8465else
8466  case $CHECK_GMAKE in
8467  [\\/]* | ?:[\\/]*)
8468  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8469  ;;
8470  *)
8471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8472for as_dir in $PATH
8473do
8474  IFS=$as_save_IFS
8475  test -z "$as_dir" && as_dir=.
8476    for ac_exec_ext in '' $ac_executable_extensions; do
8477  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8478    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8480    break 2
8481  fi
8482done
8483  done
8484IFS=$as_save_IFS
8485
8486  ;;
8487esac
8488fi
8489CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8490if test -n "$CHECK_GMAKE"; then
8491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8492$as_echo "$CHECK_GMAKE" >&6; }
8493else
8494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8495$as_echo "no" >&6; }
8496fi
8497
8498
8499  test -n "$CHECK_GMAKE" && break
8500done
8501
8502
8503  MAKE_CANDIDATE=""$CHECK_GMAKE""
8504  DESCRIPTION="gmake in PATH"
8505  if test "x$MAKE_CANDIDATE" != x; then
8506    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8507$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8508    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8509    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8510    if test "x$IS_GNU_MAKE" = x; then
8511      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8512$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8513    else
8514      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8515      if test "x$IS_MODERN_MAKE" = x; then
8516        { $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
8517$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;}
8518      else
8519        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8520          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8521            MAKE_EXPECTED_ENV='cygwin'
8522          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8523            MAKE_EXPECTED_ENV='msys'
8524          else
8525            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8526          fi
8527          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8528          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8529        else
8530          # Not relevant for non-Windows
8531          IS_MAKE_CORRECT_ENV=true
8532        fi
8533        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8534          { $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
8535$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;}
8536        else
8537          FOUND_MAKE=$MAKE_CANDIDATE
8538
8539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8540
8541  # First separate the path from the arguments. This will split at the first
8542  # space.
8543  complete="$FOUND_MAKE"
8544  path="${complete%% *}"
8545  tmp="$complete EOL"
8546  arguments="${tmp#* }"
8547
8548  # Input might be given as Windows format, start by converting to
8549  # unix format.
8550  new_path=`$CYGPATH -u "$path"`
8551
8552  # Now try to locate executable using which
8553  new_path=`$WHICH "$new_path" 2> /dev/null`
8554  # bat and cmd files are not always considered executable in cygwin causing which
8555  # to not find them
8556  if test "x$new_path" = x \
8557           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8558           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8559    new_path=`$CYGPATH -u "$path"`
8560  fi
8561  if test "x$new_path" = x; then
8562    # Oops. Which didn't find the executable.
8563    # The splitting of arguments from the executable at a space might have been incorrect,
8564    # since paths with space are more likely in Windows. Give it another try with the whole
8565    # argument.
8566    path="$complete"
8567    arguments="EOL"
8568    new_path=`$CYGPATH -u "$path"`
8569    new_path=`$WHICH "$new_path" 2> /dev/null`
8570    # bat and cmd files are not always considered executable in cygwin causing which
8571    # to not find them
8572    if test "x$new_path" = x \
8573             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8574             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8575      new_path=`$CYGPATH -u "$path"`
8576    fi
8577    if test "x$new_path" = x; then
8578      # It's still not found. Now this is an unrecoverable error.
8579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8580$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8581      has_space=`$ECHO "$complete" | $GREP " "`
8582      if test "x$has_space" != x; then
8583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8585      fi
8586      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8587    fi
8588  fi
8589
8590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8593  # "foo.exe" is OK but "foo" is an error.
8594  #
8595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8596  # It is also a way to make sure we got the proper file name for the real test later on.
8597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8598  if test "x$test_shortpath" = x; then
8599    # Short path failed, file does not exist as specified.
8600    # Try adding .exe or .cmd
8601    if test -f "${new_path}.exe"; then
8602       input_to_shortpath="${new_path}.exe"
8603    elif test -f "${new_path}.cmd"; then
8604       input_to_shortpath="${new_path}.cmd"
8605    else
8606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8607$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8608      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8609$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8610      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8611    fi
8612  else
8613    input_to_shortpath="$new_path"
8614  fi
8615
8616  # Call helper function which possibly converts this using DOS-style short mode.
8617  # If so, the updated path is stored in $new_path.
8618  new_path="$input_to_shortpath"
8619
8620  input_path="$input_to_shortpath"
8621  # Check if we need to convert this using DOS-style short mode. If the path
8622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8623  # take no chances and rewrite it.
8624  # Note: m4 eats our [], so we need to use [ and ] instead.
8625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8626  if test "x$has_forbidden_chars" != x; then
8627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8631      # Going to short mode and back again did indeed matter. Since short mode is
8632      # case insensitive, let's make it lowercase to improve readability.
8633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8634      # Now convert it back to Unix-stile (cygpath)
8635      input_path=`$CYGPATH -u "$shortmode_path"`
8636      new_path="$input_path"
8637    fi
8638  fi
8639
8640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8641  if test "x$test_cygdrive_prefix" = x; then
8642    # As a simple fix, exclude /usr/bin since it's not a real path.
8643    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8645      # a path prefixed by /cygdrive for fixpath to work.
8646      new_path="$CYGWIN_ROOT_PATH$input_path"
8647    fi
8648  fi
8649
8650  # remove trailing .exe if any
8651  new_path="${new_path/%.exe/}"
8652
8653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8654
8655  # First separate the path from the arguments. This will split at the first
8656  # space.
8657  complete="$FOUND_MAKE"
8658  path="${complete%% *}"
8659  tmp="$complete EOL"
8660  arguments="${tmp#* }"
8661
8662  # Input might be given as Windows format, start by converting to
8663  # unix format.
8664  new_path="$path"
8665
8666  windows_path="$new_path"
8667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8668    unix_path=`$CYGPATH -u "$windows_path"`
8669    new_path="$unix_path"
8670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8672    new_path="$unix_path"
8673  fi
8674
8675
8676  # Now try to locate executable using which
8677  new_path=`$WHICH "$new_path" 2> /dev/null`
8678
8679  if test "x$new_path" = x; then
8680    # Oops. Which didn't find the executable.
8681    # The splitting of arguments from the executable at a space might have been incorrect,
8682    # since paths with space are more likely in Windows. Give it another try with the whole
8683    # argument.
8684    path="$complete"
8685    arguments="EOL"
8686    new_path="$path"
8687
8688  windows_path="$new_path"
8689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8690    unix_path=`$CYGPATH -u "$windows_path"`
8691    new_path="$unix_path"
8692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8694    new_path="$unix_path"
8695  fi
8696
8697
8698    new_path=`$WHICH "$new_path" 2> /dev/null`
8699
8700    if test "x$new_path" = x; then
8701      # It's still not found. Now this is an unrecoverable error.
8702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8703$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8704      has_space=`$ECHO "$complete" | $GREP " "`
8705      if test "x$has_space" != x; then
8706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8708      fi
8709      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8710    fi
8711  fi
8712
8713  # Now new_path has a complete unix path to the binary
8714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8715    # Keep paths in /bin as-is, but remove trailing .exe if any
8716    new_path="${new_path/%.exe/}"
8717    # Do not save /bin paths to all_fixpath_prefixes!
8718  else
8719    # Not in mixed or Windows style, start by that.
8720    new_path=`cmd //c echo $new_path`
8721
8722  input_path="$new_path"
8723  # Check if we need to convert this using DOS-style short mode. If the path
8724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8725  # take no chances and rewrite it.
8726  # Note: m4 eats our [], so we need to use [ and ] instead.
8727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8728  if test "x$has_forbidden_chars" != x; then
8729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8731  fi
8732
8733    # Output is in $new_path
8734
8735  windows_path="$new_path"
8736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8737    unix_path=`$CYGPATH -u "$windows_path"`
8738    new_path="$unix_path"
8739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8741    new_path="$unix_path"
8742  fi
8743
8744    # remove trailing .exe if any
8745    new_path="${new_path/%.exe/}"
8746
8747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8749  fi
8750
8751  else
8752    # We're on a posix platform. Hooray! :)
8753    # First separate the path from the arguments. This will split at the first
8754    # space.
8755    complete="$FOUND_MAKE"
8756    path="${complete%% *}"
8757    tmp="$complete EOL"
8758    arguments="${tmp#* }"
8759
8760    # Cannot rely on the command "which" here since it doesn't always work.
8761    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8762    if test -z "$is_absolute_path"; then
8763      # Path to executable is not absolute. Find it.
8764      IFS_save="$IFS"
8765      IFS=:
8766      for p in $PATH; do
8767        if test -f "$p/$path" && test -x "$p/$path"; then
8768          new_path="$p/$path"
8769          break
8770        fi
8771      done
8772      IFS="$IFS_save"
8773    else
8774      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8775$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8776      new_path="$path"
8777    fi
8778
8779    if test "x$new_path" = x; then
8780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8781$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8782        has_space=`$ECHO "$complete" | $GREP " "`
8783        if test "x$has_space" != x; then
8784          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8785$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8786        fi
8787        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8788      fi
8789  fi
8790
8791      # Now join together the path and the arguments once again
8792      if test "x$arguments" != xEOL; then
8793        new_complete="$new_path ${arguments% *}"
8794      else
8795        new_complete="$new_path"
8796      fi
8797
8798  if test "x$complete" != "x$new_complete"; then
8799      FOUND_MAKE="$new_complete"
8800      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8801$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8802    fi
8803
8804        fi
8805      fi
8806    fi
8807  fi
8808
8809
8810    if test "x$FOUND_MAKE" = x; then
8811      for ac_prog in make
8812do
8813  # Extract the first word of "$ac_prog", so it can be a program name with args.
8814set dummy $ac_prog; ac_word=$2
8815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8816$as_echo_n "checking for $ac_word... " >&6; }
8817if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8818  $as_echo_n "(cached) " >&6
8819else
8820  case $CHECK_MAKE in
8821  [\\/]* | ?:[\\/]*)
8822  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8823  ;;
8824  *)
8825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8826for as_dir in $PATH
8827do
8828  IFS=$as_save_IFS
8829  test -z "$as_dir" && as_dir=.
8830    for ac_exec_ext in '' $ac_executable_extensions; do
8831  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8832    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8834    break 2
8835  fi
8836done
8837  done
8838IFS=$as_save_IFS
8839
8840  ;;
8841esac
8842fi
8843CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8844if test -n "$CHECK_MAKE"; then
8845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8846$as_echo "$CHECK_MAKE" >&6; }
8847else
8848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8849$as_echo "no" >&6; }
8850fi
8851
8852
8853  test -n "$CHECK_MAKE" && break
8854done
8855
8856
8857  MAKE_CANDIDATE=""$CHECK_MAKE""
8858  DESCRIPTION="make in PATH"
8859  if test "x$MAKE_CANDIDATE" != x; then
8860    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8861$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8862    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8863    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8864    if test "x$IS_GNU_MAKE" = x; then
8865      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8866$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8867    else
8868      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8869      if test "x$IS_MODERN_MAKE" = x; then
8870        { $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
8871$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;}
8872      else
8873        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8874          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8875            MAKE_EXPECTED_ENV='cygwin'
8876          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8877            MAKE_EXPECTED_ENV='msys'
8878          else
8879            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8880          fi
8881          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8882          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8883        else
8884          # Not relevant for non-Windows
8885          IS_MAKE_CORRECT_ENV=true
8886        fi
8887        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8888          { $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
8889$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;}
8890        else
8891          FOUND_MAKE=$MAKE_CANDIDATE
8892
8893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8894
8895  # First separate the path from the arguments. This will split at the first
8896  # space.
8897  complete="$FOUND_MAKE"
8898  path="${complete%% *}"
8899  tmp="$complete EOL"
8900  arguments="${tmp#* }"
8901
8902  # Input might be given as Windows format, start by converting to
8903  # unix format.
8904  new_path=`$CYGPATH -u "$path"`
8905
8906  # Now try to locate executable using which
8907  new_path=`$WHICH "$new_path" 2> /dev/null`
8908  # bat and cmd files are not always considered executable in cygwin causing which
8909  # to not find them
8910  if test "x$new_path" = x \
8911           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8912           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8913    new_path=`$CYGPATH -u "$path"`
8914  fi
8915  if test "x$new_path" = x; then
8916    # Oops. Which didn't find the executable.
8917    # The splitting of arguments from the executable at a space might have been incorrect,
8918    # since paths with space are more likely in Windows. Give it another try with the whole
8919    # argument.
8920    path="$complete"
8921    arguments="EOL"
8922    new_path=`$CYGPATH -u "$path"`
8923    new_path=`$WHICH "$new_path" 2> /dev/null`
8924    # bat and cmd files are not always considered executable in cygwin causing which
8925    # to not find them
8926    if test "x$new_path" = x \
8927             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8928             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8929      new_path=`$CYGPATH -u "$path"`
8930    fi
8931    if test "x$new_path" = x; then
8932      # It's still not found. Now this is an unrecoverable error.
8933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8934$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8935      has_space=`$ECHO "$complete" | $GREP " "`
8936      if test "x$has_space" != x; then
8937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8939      fi
8940      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8941    fi
8942  fi
8943
8944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8947  # "foo.exe" is OK but "foo" is an error.
8948  #
8949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8950  # It is also a way to make sure we got the proper file name for the real test later on.
8951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8952  if test "x$test_shortpath" = x; then
8953    # Short path failed, file does not exist as specified.
8954    # Try adding .exe or .cmd
8955    if test -f "${new_path}.exe"; then
8956       input_to_shortpath="${new_path}.exe"
8957    elif test -f "${new_path}.cmd"; then
8958       input_to_shortpath="${new_path}.cmd"
8959    else
8960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8961$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8962      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8963$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8964      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8965    fi
8966  else
8967    input_to_shortpath="$new_path"
8968  fi
8969
8970  # Call helper function which possibly converts this using DOS-style short mode.
8971  # If so, the updated path is stored in $new_path.
8972  new_path="$input_to_shortpath"
8973
8974  input_path="$input_to_shortpath"
8975  # Check if we need to convert this using DOS-style short mode. If the path
8976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8977  # take no chances and rewrite it.
8978  # Note: m4 eats our [], so we need to use [ and ] instead.
8979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8980  if test "x$has_forbidden_chars" != x; then
8981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8985      # Going to short mode and back again did indeed matter. Since short mode is
8986      # case insensitive, let's make it lowercase to improve readability.
8987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8988      # Now convert it back to Unix-stile (cygpath)
8989      input_path=`$CYGPATH -u "$shortmode_path"`
8990      new_path="$input_path"
8991    fi
8992  fi
8993
8994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8995  if test "x$test_cygdrive_prefix" = x; then
8996    # As a simple fix, exclude /usr/bin since it's not a real path.
8997    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8999      # a path prefixed by /cygdrive for fixpath to work.
9000      new_path="$CYGWIN_ROOT_PATH$input_path"
9001    fi
9002  fi
9003
9004  # remove trailing .exe if any
9005  new_path="${new_path/%.exe/}"
9006
9007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9008
9009  # First separate the path from the arguments. This will split at the first
9010  # space.
9011  complete="$FOUND_MAKE"
9012  path="${complete%% *}"
9013  tmp="$complete EOL"
9014  arguments="${tmp#* }"
9015
9016  # Input might be given as Windows format, start by converting to
9017  # unix format.
9018  new_path="$path"
9019
9020  windows_path="$new_path"
9021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9022    unix_path=`$CYGPATH -u "$windows_path"`
9023    new_path="$unix_path"
9024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9026    new_path="$unix_path"
9027  fi
9028
9029
9030  # Now try to locate executable using which
9031  new_path=`$WHICH "$new_path" 2> /dev/null`
9032
9033  if test "x$new_path" = x; then
9034    # Oops. Which didn't find the executable.
9035    # The splitting of arguments from the executable at a space might have been incorrect,
9036    # since paths with space are more likely in Windows. Give it another try with the whole
9037    # argument.
9038    path="$complete"
9039    arguments="EOL"
9040    new_path="$path"
9041
9042  windows_path="$new_path"
9043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9044    unix_path=`$CYGPATH -u "$windows_path"`
9045    new_path="$unix_path"
9046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9048    new_path="$unix_path"
9049  fi
9050
9051
9052    new_path=`$WHICH "$new_path" 2> /dev/null`
9053
9054    if test "x$new_path" = x; then
9055      # It's still not found. Now this is an unrecoverable error.
9056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9057$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9058      has_space=`$ECHO "$complete" | $GREP " "`
9059      if test "x$has_space" != x; then
9060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9062      fi
9063      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9064    fi
9065  fi
9066
9067  # Now new_path has a complete unix path to the binary
9068  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9069    # Keep paths in /bin as-is, but remove trailing .exe if any
9070    new_path="${new_path/%.exe/}"
9071    # Do not save /bin paths to all_fixpath_prefixes!
9072  else
9073    # Not in mixed or Windows style, start by that.
9074    new_path=`cmd //c echo $new_path`
9075
9076  input_path="$new_path"
9077  # Check if we need to convert this using DOS-style short mode. If the path
9078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9079  # take no chances and rewrite it.
9080  # Note: m4 eats our [], so we need to use [ and ] instead.
9081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9082  if test "x$has_forbidden_chars" != x; then
9083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9085  fi
9086
9087    # Output is in $new_path
9088
9089  windows_path="$new_path"
9090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9091    unix_path=`$CYGPATH -u "$windows_path"`
9092    new_path="$unix_path"
9093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9095    new_path="$unix_path"
9096  fi
9097
9098    # remove trailing .exe if any
9099    new_path="${new_path/%.exe/}"
9100
9101    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9102    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9103  fi
9104
9105  else
9106    # We're on a posix platform. Hooray! :)
9107    # First separate the path from the arguments. This will split at the first
9108    # space.
9109    complete="$FOUND_MAKE"
9110    path="${complete%% *}"
9111    tmp="$complete EOL"
9112    arguments="${tmp#* }"
9113
9114    # Cannot rely on the command "which" here since it doesn't always work.
9115    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9116    if test -z "$is_absolute_path"; then
9117      # Path to executable is not absolute. Find it.
9118      IFS_save="$IFS"
9119      IFS=:
9120      for p in $PATH; do
9121        if test -f "$p/$path" && test -x "$p/$path"; then
9122          new_path="$p/$path"
9123          break
9124        fi
9125      done
9126      IFS="$IFS_save"
9127    else
9128      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9129$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9130      new_path="$path"
9131    fi
9132
9133    if test "x$new_path" = x; then
9134        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9135$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9136        has_space=`$ECHO "$complete" | $GREP " "`
9137        if test "x$has_space" != x; then
9138          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9139$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9140        fi
9141        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9142      fi
9143  fi
9144
9145      # Now join together the path and the arguments once again
9146      if test "x$arguments" != xEOL; then
9147        new_complete="$new_path ${arguments% *}"
9148      else
9149        new_complete="$new_path"
9150      fi
9151
9152  if test "x$complete" != "x$new_complete"; then
9153      FOUND_MAKE="$new_complete"
9154      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9155$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9156    fi
9157
9158        fi
9159      fi
9160    fi
9161  fi
9162
9163    fi
9164
9165    if test "x$FOUND_MAKE" = x; then
9166      if test "x$TOOLS_DIR" != x; then
9167        # We have a tools-dir, check that as well before giving up.
9168        OLD_PATH=$PATH
9169        PATH=$TOOLS_DIR:$PATH
9170        for ac_prog in gmake
9171do
9172  # Extract the first word of "$ac_prog", so it can be a program name with args.
9173set dummy $ac_prog; ac_word=$2
9174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9175$as_echo_n "checking for $ac_word... " >&6; }
9176if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9177  $as_echo_n "(cached) " >&6
9178else
9179  case $CHECK_TOOLSDIR_GMAKE in
9180  [\\/]* | ?:[\\/]*)
9181  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9182  ;;
9183  *)
9184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9185for as_dir in $PATH
9186do
9187  IFS=$as_save_IFS
9188  test -z "$as_dir" && as_dir=.
9189    for ac_exec_ext in '' $ac_executable_extensions; do
9190  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9191    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9193    break 2
9194  fi
9195done
9196  done
9197IFS=$as_save_IFS
9198
9199  ;;
9200esac
9201fi
9202CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9203if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9205$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9206else
9207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9208$as_echo "no" >&6; }
9209fi
9210
9211
9212  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9213done
9214
9215
9216  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9217  DESCRIPTION="gmake in tools-dir"
9218  if test "x$MAKE_CANDIDATE" != x; then
9219    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9220$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9221    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9222    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9223    if test "x$IS_GNU_MAKE" = x; then
9224      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9225$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9226    else
9227      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9228      if test "x$IS_MODERN_MAKE" = x; then
9229        { $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
9230$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;}
9231      else
9232        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9233          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9234            MAKE_EXPECTED_ENV='cygwin'
9235          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9236            MAKE_EXPECTED_ENV='msys'
9237          else
9238            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9239          fi
9240          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9241          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9242        else
9243          # Not relevant for non-Windows
9244          IS_MAKE_CORRECT_ENV=true
9245        fi
9246        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9247          { $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
9248$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;}
9249        else
9250          FOUND_MAKE=$MAKE_CANDIDATE
9251
9252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9253
9254  # First separate the path from the arguments. This will split at the first
9255  # space.
9256  complete="$FOUND_MAKE"
9257  path="${complete%% *}"
9258  tmp="$complete EOL"
9259  arguments="${tmp#* }"
9260
9261  # Input might be given as Windows format, start by converting to
9262  # unix format.
9263  new_path=`$CYGPATH -u "$path"`
9264
9265  # Now try to locate executable using which
9266  new_path=`$WHICH "$new_path" 2> /dev/null`
9267  # bat and cmd files are not always considered executable in cygwin causing which
9268  # to not find them
9269  if test "x$new_path" = x \
9270           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9271           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9272    new_path=`$CYGPATH -u "$path"`
9273  fi
9274  if test "x$new_path" = x; then
9275    # Oops. Which didn't find the executable.
9276    # The splitting of arguments from the executable at a space might have been incorrect,
9277    # since paths with space are more likely in Windows. Give it another try with the whole
9278    # argument.
9279    path="$complete"
9280    arguments="EOL"
9281    new_path=`$CYGPATH -u "$path"`
9282    new_path=`$WHICH "$new_path" 2> /dev/null`
9283    # bat and cmd files are not always considered executable in cygwin causing which
9284    # to not find them
9285    if test "x$new_path" = x \
9286             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9287             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9288      new_path=`$CYGPATH -u "$path"`
9289    fi
9290    if test "x$new_path" = x; then
9291      # It's still not found. Now this is an unrecoverable error.
9292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9293$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9294      has_space=`$ECHO "$complete" | $GREP " "`
9295      if test "x$has_space" != x; then
9296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9298      fi
9299      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9300    fi
9301  fi
9302
9303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9306  # "foo.exe" is OK but "foo" is an error.
9307  #
9308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9309  # It is also a way to make sure we got the proper file name for the real test later on.
9310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9311  if test "x$test_shortpath" = x; then
9312    # Short path failed, file does not exist as specified.
9313    # Try adding .exe or .cmd
9314    if test -f "${new_path}.exe"; then
9315       input_to_shortpath="${new_path}.exe"
9316    elif test -f "${new_path}.cmd"; then
9317       input_to_shortpath="${new_path}.cmd"
9318    else
9319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9320$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9323      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9324    fi
9325  else
9326    input_to_shortpath="$new_path"
9327  fi
9328
9329  # Call helper function which possibly converts this using DOS-style short mode.
9330  # If so, the updated path is stored in $new_path.
9331  new_path="$input_to_shortpath"
9332
9333  input_path="$input_to_shortpath"
9334  # Check if we need to convert this using DOS-style short mode. If the path
9335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9336  # take no chances and rewrite it.
9337  # Note: m4 eats our [], so we need to use [ and ] instead.
9338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9339  if test "x$has_forbidden_chars" != x; then
9340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9344      # Going to short mode and back again did indeed matter. Since short mode is
9345      # case insensitive, let's make it lowercase to improve readability.
9346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9347      # Now convert it back to Unix-stile (cygpath)
9348      input_path=`$CYGPATH -u "$shortmode_path"`
9349      new_path="$input_path"
9350    fi
9351  fi
9352
9353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9354  if test "x$test_cygdrive_prefix" = x; then
9355    # As a simple fix, exclude /usr/bin since it's not a real path.
9356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9358      # a path prefixed by /cygdrive for fixpath to work.
9359      new_path="$CYGWIN_ROOT_PATH$input_path"
9360    fi
9361  fi
9362
9363  # remove trailing .exe if any
9364  new_path="${new_path/%.exe/}"
9365
9366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9367
9368  # First separate the path from the arguments. This will split at the first
9369  # space.
9370  complete="$FOUND_MAKE"
9371  path="${complete%% *}"
9372  tmp="$complete EOL"
9373  arguments="${tmp#* }"
9374
9375  # Input might be given as Windows format, start by converting to
9376  # unix format.
9377  new_path="$path"
9378
9379  windows_path="$new_path"
9380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9381    unix_path=`$CYGPATH -u "$windows_path"`
9382    new_path="$unix_path"
9383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9385    new_path="$unix_path"
9386  fi
9387
9388
9389  # Now try to locate executable using which
9390  new_path=`$WHICH "$new_path" 2> /dev/null`
9391
9392  if test "x$new_path" = x; then
9393    # Oops. Which didn't find the executable.
9394    # The splitting of arguments from the executable at a space might have been incorrect,
9395    # since paths with space are more likely in Windows. Give it another try with the whole
9396    # argument.
9397    path="$complete"
9398    arguments="EOL"
9399    new_path="$path"
9400
9401  windows_path="$new_path"
9402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9403    unix_path=`$CYGPATH -u "$windows_path"`
9404    new_path="$unix_path"
9405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9407    new_path="$unix_path"
9408  fi
9409
9410
9411    new_path=`$WHICH "$new_path" 2> /dev/null`
9412
9413    if test "x$new_path" = x; then
9414      # It's still not found. Now this is an unrecoverable error.
9415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9416$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9417      has_space=`$ECHO "$complete" | $GREP " "`
9418      if test "x$has_space" != x; then
9419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9421      fi
9422      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9423    fi
9424  fi
9425
9426  # Now new_path has a complete unix path to the binary
9427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9428    # Keep paths in /bin as-is, but remove trailing .exe if any
9429    new_path="${new_path/%.exe/}"
9430    # Do not save /bin paths to all_fixpath_prefixes!
9431  else
9432    # Not in mixed or Windows style, start by that.
9433    new_path=`cmd //c echo $new_path`
9434
9435  input_path="$new_path"
9436  # Check if we need to convert this using DOS-style short mode. If the path
9437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9438  # take no chances and rewrite it.
9439  # Note: m4 eats our [], so we need to use [ and ] instead.
9440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9441  if test "x$has_forbidden_chars" != x; then
9442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9444  fi
9445
9446    # Output is in $new_path
9447
9448  windows_path="$new_path"
9449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9450    unix_path=`$CYGPATH -u "$windows_path"`
9451    new_path="$unix_path"
9452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9454    new_path="$unix_path"
9455  fi
9456
9457    # remove trailing .exe if any
9458    new_path="${new_path/%.exe/}"
9459
9460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9462  fi
9463
9464  else
9465    # We're on a posix platform. Hooray! :)
9466    # First separate the path from the arguments. This will split at the first
9467    # space.
9468    complete="$FOUND_MAKE"
9469    path="${complete%% *}"
9470    tmp="$complete EOL"
9471    arguments="${tmp#* }"
9472
9473    # Cannot rely on the command "which" here since it doesn't always work.
9474    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9475    if test -z "$is_absolute_path"; then
9476      # Path to executable is not absolute. Find it.
9477      IFS_save="$IFS"
9478      IFS=:
9479      for p in $PATH; do
9480        if test -f "$p/$path" && test -x "$p/$path"; then
9481          new_path="$p/$path"
9482          break
9483        fi
9484      done
9485      IFS="$IFS_save"
9486    else
9487      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9488$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9489      new_path="$path"
9490    fi
9491
9492    if test "x$new_path" = x; then
9493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9494$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9495        has_space=`$ECHO "$complete" | $GREP " "`
9496        if test "x$has_space" != x; then
9497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9499        fi
9500        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9501      fi
9502  fi
9503
9504      # Now join together the path and the arguments once again
9505      if test "x$arguments" != xEOL; then
9506        new_complete="$new_path ${arguments% *}"
9507      else
9508        new_complete="$new_path"
9509      fi
9510
9511  if test "x$complete" != "x$new_complete"; then
9512      FOUND_MAKE="$new_complete"
9513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9514$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9515    fi
9516
9517        fi
9518      fi
9519    fi
9520  fi
9521
9522        if test "x$FOUND_MAKE" = x; then
9523          for ac_prog in make
9524do
9525  # Extract the first word of "$ac_prog", so it can be a program name with args.
9526set dummy $ac_prog; ac_word=$2
9527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9528$as_echo_n "checking for $ac_word... " >&6; }
9529if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9530  $as_echo_n "(cached) " >&6
9531else
9532  case $CHECK_TOOLSDIR_MAKE in
9533  [\\/]* | ?:[\\/]*)
9534  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9535  ;;
9536  *)
9537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9538for as_dir in $PATH
9539do
9540  IFS=$as_save_IFS
9541  test -z "$as_dir" && as_dir=.
9542    for ac_exec_ext in '' $ac_executable_extensions; do
9543  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9544    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9546    break 2
9547  fi
9548done
9549  done
9550IFS=$as_save_IFS
9551
9552  ;;
9553esac
9554fi
9555CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9556if test -n "$CHECK_TOOLSDIR_MAKE"; then
9557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9558$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9559else
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
9562fi
9563
9564
9565  test -n "$CHECK_TOOLSDIR_MAKE" && break
9566done
9567
9568
9569  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9570  DESCRIPTION="make in tools-dir"
9571  if test "x$MAKE_CANDIDATE" != x; then
9572    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9573$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9574    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9575    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9576    if test "x$IS_GNU_MAKE" = x; then
9577      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9578$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9579    else
9580      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9581      if test "x$IS_MODERN_MAKE" = x; then
9582        { $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
9583$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;}
9584      else
9585        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9586          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9587            MAKE_EXPECTED_ENV='cygwin'
9588          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9589            MAKE_EXPECTED_ENV='msys'
9590          else
9591            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9592          fi
9593          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9594          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9595        else
9596          # Not relevant for non-Windows
9597          IS_MAKE_CORRECT_ENV=true
9598        fi
9599        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9600          { $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
9601$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;}
9602        else
9603          FOUND_MAKE=$MAKE_CANDIDATE
9604
9605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9606
9607  # First separate the path from the arguments. This will split at the first
9608  # space.
9609  complete="$FOUND_MAKE"
9610  path="${complete%% *}"
9611  tmp="$complete EOL"
9612  arguments="${tmp#* }"
9613
9614  # Input might be given as Windows format, start by converting to
9615  # unix format.
9616  new_path=`$CYGPATH -u "$path"`
9617
9618  # Now try to locate executable using which
9619  new_path=`$WHICH "$new_path" 2> /dev/null`
9620  # bat and cmd files are not always considered executable in cygwin causing which
9621  # to not find them
9622  if test "x$new_path" = x \
9623           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9624           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9625    new_path=`$CYGPATH -u "$path"`
9626  fi
9627  if test "x$new_path" = x; then
9628    # Oops. Which didn't find the executable.
9629    # The splitting of arguments from the executable at a space might have been incorrect,
9630    # since paths with space are more likely in Windows. Give it another try with the whole
9631    # argument.
9632    path="$complete"
9633    arguments="EOL"
9634    new_path=`$CYGPATH -u "$path"`
9635    new_path=`$WHICH "$new_path" 2> /dev/null`
9636    # bat and cmd files are not always considered executable in cygwin causing which
9637    # to not find them
9638    if test "x$new_path" = x \
9639             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9640             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9641      new_path=`$CYGPATH -u "$path"`
9642    fi
9643    if test "x$new_path" = x; then
9644      # It's still not found. Now this is an unrecoverable error.
9645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9646$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9647      has_space=`$ECHO "$complete" | $GREP " "`
9648      if test "x$has_space" != x; then
9649        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9650$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9651      fi
9652      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9653    fi
9654  fi
9655
9656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9659  # "foo.exe" is OK but "foo" is an error.
9660  #
9661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9662  # It is also a way to make sure we got the proper file name for the real test later on.
9663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9664  if test "x$test_shortpath" = x; then
9665    # Short path failed, file does not exist as specified.
9666    # Try adding .exe or .cmd
9667    if test -f "${new_path}.exe"; then
9668       input_to_shortpath="${new_path}.exe"
9669    elif test -f "${new_path}.cmd"; then
9670       input_to_shortpath="${new_path}.cmd"
9671    else
9672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9673$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9674      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9675$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9676      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9677    fi
9678  else
9679    input_to_shortpath="$new_path"
9680  fi
9681
9682  # Call helper function which possibly converts this using DOS-style short mode.
9683  # If so, the updated path is stored in $new_path.
9684  new_path="$input_to_shortpath"
9685
9686  input_path="$input_to_shortpath"
9687  # Check if we need to convert this using DOS-style short mode. If the path
9688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9689  # take no chances and rewrite it.
9690  # Note: m4 eats our [], so we need to use [ and ] instead.
9691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9692  if test "x$has_forbidden_chars" != x; then
9693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9697      # Going to short mode and back again did indeed matter. Since short mode is
9698      # case insensitive, let's make it lowercase to improve readability.
9699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9700      # Now convert it back to Unix-stile (cygpath)
9701      input_path=`$CYGPATH -u "$shortmode_path"`
9702      new_path="$input_path"
9703    fi
9704  fi
9705
9706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9707  if test "x$test_cygdrive_prefix" = x; then
9708    # As a simple fix, exclude /usr/bin since it's not a real path.
9709    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9711      # a path prefixed by /cygdrive for fixpath to work.
9712      new_path="$CYGWIN_ROOT_PATH$input_path"
9713    fi
9714  fi
9715
9716  # remove trailing .exe if any
9717  new_path="${new_path/%.exe/}"
9718
9719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9720
9721  # First separate the path from the arguments. This will split at the first
9722  # space.
9723  complete="$FOUND_MAKE"
9724  path="${complete%% *}"
9725  tmp="$complete EOL"
9726  arguments="${tmp#* }"
9727
9728  # Input might be given as Windows format, start by converting to
9729  # unix format.
9730  new_path="$path"
9731
9732  windows_path="$new_path"
9733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9734    unix_path=`$CYGPATH -u "$windows_path"`
9735    new_path="$unix_path"
9736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9738    new_path="$unix_path"
9739  fi
9740
9741
9742  # Now try to locate executable using which
9743  new_path=`$WHICH "$new_path" 2> /dev/null`
9744
9745  if test "x$new_path" = x; then
9746    # Oops. Which didn't find the executable.
9747    # The splitting of arguments from the executable at a space might have been incorrect,
9748    # since paths with space are more likely in Windows. Give it another try with the whole
9749    # argument.
9750    path="$complete"
9751    arguments="EOL"
9752    new_path="$path"
9753
9754  windows_path="$new_path"
9755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9756    unix_path=`$CYGPATH -u "$windows_path"`
9757    new_path="$unix_path"
9758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9760    new_path="$unix_path"
9761  fi
9762
9763
9764    new_path=`$WHICH "$new_path" 2> /dev/null`
9765
9766    if test "x$new_path" = x; then
9767      # It's still not found. Now this is an unrecoverable error.
9768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9769$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9770      has_space=`$ECHO "$complete" | $GREP " "`
9771      if test "x$has_space" != x; then
9772        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9773$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9774      fi
9775      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9776    fi
9777  fi
9778
9779  # Now new_path has a complete unix path to the binary
9780  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9781    # Keep paths in /bin as-is, but remove trailing .exe if any
9782    new_path="${new_path/%.exe/}"
9783    # Do not save /bin paths to all_fixpath_prefixes!
9784  else
9785    # Not in mixed or Windows style, start by that.
9786    new_path=`cmd //c echo $new_path`
9787
9788  input_path="$new_path"
9789  # Check if we need to convert this using DOS-style short mode. If the path
9790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9791  # take no chances and rewrite it.
9792  # Note: m4 eats our [], so we need to use [ and ] instead.
9793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9794  if test "x$has_forbidden_chars" != x; then
9795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9797  fi
9798
9799    # Output is in $new_path
9800
9801  windows_path="$new_path"
9802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9803    unix_path=`$CYGPATH -u "$windows_path"`
9804    new_path="$unix_path"
9805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9807    new_path="$unix_path"
9808  fi
9809
9810    # remove trailing .exe if any
9811    new_path="${new_path/%.exe/}"
9812
9813    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9814    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9815  fi
9816
9817  else
9818    # We're on a posix platform. Hooray! :)
9819    # First separate the path from the arguments. This will split at the first
9820    # space.
9821    complete="$FOUND_MAKE"
9822    path="${complete%% *}"
9823    tmp="$complete EOL"
9824    arguments="${tmp#* }"
9825
9826    # Cannot rely on the command "which" here since it doesn't always work.
9827    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9828    if test -z "$is_absolute_path"; then
9829      # Path to executable is not absolute. Find it.
9830      IFS_save="$IFS"
9831      IFS=:
9832      for p in $PATH; do
9833        if test -f "$p/$path" && test -x "$p/$path"; then
9834          new_path="$p/$path"
9835          break
9836        fi
9837      done
9838      IFS="$IFS_save"
9839    else
9840      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9841$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9842      new_path="$path"
9843    fi
9844
9845    if test "x$new_path" = x; then
9846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9847$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9848        has_space=`$ECHO "$complete" | $GREP " "`
9849        if test "x$has_space" != x; then
9850          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9851$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9852        fi
9853        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9854      fi
9855  fi
9856
9857      # Now join together the path and the arguments once again
9858      if test "x$arguments" != xEOL; then
9859        new_complete="$new_path ${arguments% *}"
9860      else
9861        new_complete="$new_path"
9862      fi
9863
9864  if test "x$complete" != "x$new_complete"; then
9865      FOUND_MAKE="$new_complete"
9866      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9867$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9868    fi
9869
9870        fi
9871      fi
9872    fi
9873  fi
9874
9875        fi
9876        PATH=$OLD_PATH
9877      fi
9878    fi
9879
9880    if test "x$FOUND_MAKE" = x; then
9881      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
9882    fi
9883  fi
9884
9885  MAKE=$FOUND_MAKE
9886
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9888$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9889
9890
9891
9892    # Test if find supports -delete
9893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9894$as_echo_n "checking if find supports -delete... " >&6; }
9895    FIND_DELETE="-delete"
9896
9897    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9898
9899    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9900
9901    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9902    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9903        # No, it does not.
9904        rm $DELETEDIR/TestIfFindSupportsDelete
9905        FIND_DELETE="-exec rm \{\} \+"
9906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9907$as_echo "no" >&6; }
9908    else
9909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9910$as_echo "yes" >&6; }
9911    fi
9912    rmdir $DELETEDIR
9913
9914
9915
9916# These tools might not be installed by default,
9917# need hint on how to install them.
9918
9919    for ac_prog in unzip
9920do
9921  # Extract the first word of "$ac_prog", so it can be a program name with args.
9922set dummy $ac_prog; ac_word=$2
9923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9924$as_echo_n "checking for $ac_word... " >&6; }
9925if test "${ac_cv_path_UNZIP+set}" = set; then :
9926  $as_echo_n "(cached) " >&6
9927else
9928  case $UNZIP in
9929  [\\/]* | ?:[\\/]*)
9930  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9931  ;;
9932  *)
9933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9934for as_dir in $PATH
9935do
9936  IFS=$as_save_IFS
9937  test -z "$as_dir" && as_dir=.
9938    for ac_exec_ext in '' $ac_executable_extensions; do
9939  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9940    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9942    break 2
9943  fi
9944done
9945  done
9946IFS=$as_save_IFS
9947
9948  ;;
9949esac
9950fi
9951UNZIP=$ac_cv_path_UNZIP
9952if test -n "$UNZIP"; then
9953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9954$as_echo "$UNZIP" >&6; }
9955else
9956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9957$as_echo "no" >&6; }
9958fi
9959
9960
9961  test -n "$UNZIP" && break
9962done
9963
9964
9965    if test "x$UNZIP" = x; then
9966        if test "xunzip" = x; then
9967          PROG_NAME=unzip
9968        else
9969          PROG_NAME=unzip
9970        fi
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9972$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9973        as_fn_error $? "Cannot continue" "$LINENO" 5
9974    fi
9975
9976
9977
9978    for ac_prog in zip
9979do
9980  # Extract the first word of "$ac_prog", so it can be a program name with args.
9981set dummy $ac_prog; ac_word=$2
9982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9983$as_echo_n "checking for $ac_word... " >&6; }
9984if test "${ac_cv_path_ZIP+set}" = set; then :
9985  $as_echo_n "(cached) " >&6
9986else
9987  case $ZIP in
9988  [\\/]* | ?:[\\/]*)
9989  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9990  ;;
9991  *)
9992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9993for as_dir in $PATH
9994do
9995  IFS=$as_save_IFS
9996  test -z "$as_dir" && as_dir=.
9997    for ac_exec_ext in '' $ac_executable_extensions; do
9998  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9999    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10001    break 2
10002  fi
10003done
10004  done
10005IFS=$as_save_IFS
10006
10007  ;;
10008esac
10009fi
10010ZIP=$ac_cv_path_ZIP
10011if test -n "$ZIP"; then
10012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10013$as_echo "$ZIP" >&6; }
10014else
10015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10016$as_echo "no" >&6; }
10017fi
10018
10019
10020  test -n "$ZIP" && break
10021done
10022
10023
10024    if test "x$ZIP" = x; then
10025        if test "xzip" = x; then
10026          PROG_NAME=zip
10027        else
10028          PROG_NAME=zip
10029        fi
10030        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10031$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10032        as_fn_error $? "Cannot continue" "$LINENO" 5
10033    fi
10034
10035
10036
10037# Non-required basic tools
10038
10039# Extract the first word of "ldd", so it can be a program name with args.
10040set dummy ldd; ac_word=$2
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10042$as_echo_n "checking for $ac_word... " >&6; }
10043if test "${ac_cv_path_LDD+set}" = set; then :
10044  $as_echo_n "(cached) " >&6
10045else
10046  case $LDD in
10047  [\\/]* | ?:[\\/]*)
10048  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10049  ;;
10050  *)
10051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10052for as_dir in $PATH
10053do
10054  IFS=$as_save_IFS
10055  test -z "$as_dir" && as_dir=.
10056    for ac_exec_ext in '' $ac_executable_extensions; do
10057  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10058    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10060    break 2
10061  fi
10062done
10063  done
10064IFS=$as_save_IFS
10065
10066  ;;
10067esac
10068fi
10069LDD=$ac_cv_path_LDD
10070if test -n "$LDD"; then
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10072$as_echo "$LDD" >&6; }
10073else
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
10076fi
10077
10078
10079if test "x$LDD" = "x"; then
10080    # List shared lib dependencies is used for
10081    # debug output and checking for forbidden dependencies.
10082    # We can build without it.
10083    LDD="true"
10084fi
10085# Extract the first word of "otool", so it can be a program name with args.
10086set dummy otool; ac_word=$2
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10088$as_echo_n "checking for $ac_word... " >&6; }
10089if test "${ac_cv_path_OTOOL+set}" = set; then :
10090  $as_echo_n "(cached) " >&6
10091else
10092  case $OTOOL in
10093  [\\/]* | ?:[\\/]*)
10094  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10095  ;;
10096  *)
10097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10098for as_dir in $PATH
10099do
10100  IFS=$as_save_IFS
10101  test -z "$as_dir" && as_dir=.
10102    for ac_exec_ext in '' $ac_executable_extensions; do
10103  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10104    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10106    break 2
10107  fi
10108done
10109  done
10110IFS=$as_save_IFS
10111
10112  ;;
10113esac
10114fi
10115OTOOL=$ac_cv_path_OTOOL
10116if test -n "$OTOOL"; then
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10118$as_echo "$OTOOL" >&6; }
10119else
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
10122fi
10123
10124
10125if test "x$OTOOL" = "x"; then
10126   OTOOL="true"
10127fi
10128for ac_prog in readelf greadelf
10129do
10130  # Extract the first word of "$ac_prog", so it can be a program name with args.
10131set dummy $ac_prog; ac_word=$2
10132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10133$as_echo_n "checking for $ac_word... " >&6; }
10134if test "${ac_cv_path_READELF+set}" = set; then :
10135  $as_echo_n "(cached) " >&6
10136else
10137  case $READELF in
10138  [\\/]* | ?:[\\/]*)
10139  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10140  ;;
10141  *)
10142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10143for as_dir in $PATH
10144do
10145  IFS=$as_save_IFS
10146  test -z "$as_dir" && as_dir=.
10147    for ac_exec_ext in '' $ac_executable_extensions; do
10148  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10149    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10151    break 2
10152  fi
10153done
10154  done
10155IFS=$as_save_IFS
10156
10157  ;;
10158esac
10159fi
10160READELF=$ac_cv_path_READELF
10161if test -n "$READELF"; then
10162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10163$as_echo "$READELF" >&6; }
10164else
10165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10166$as_echo "no" >&6; }
10167fi
10168
10169
10170  test -n "$READELF" && break
10171done
10172
10173# Extract the first word of "hg", so it can be a program name with args.
10174set dummy hg; ac_word=$2
10175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10176$as_echo_n "checking for $ac_word... " >&6; }
10177if test "${ac_cv_path_HG+set}" = set; then :
10178  $as_echo_n "(cached) " >&6
10179else
10180  case $HG in
10181  [\\/]* | ?:[\\/]*)
10182  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10183  ;;
10184  *)
10185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10186for as_dir in $PATH
10187do
10188  IFS=$as_save_IFS
10189  test -z "$as_dir" && as_dir=.
10190    for ac_exec_ext in '' $ac_executable_extensions; do
10191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10192    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10194    break 2
10195  fi
10196done
10197  done
10198IFS=$as_save_IFS
10199
10200  ;;
10201esac
10202fi
10203HG=$ac_cv_path_HG
10204if test -n "$HG"; then
10205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10206$as_echo "$HG" >&6; }
10207else
10208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10209$as_echo "no" >&6; }
10210fi
10211
10212
10213# Extract the first word of "stat", so it can be a program name with args.
10214set dummy stat; ac_word=$2
10215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10216$as_echo_n "checking for $ac_word... " >&6; }
10217if test "${ac_cv_path_STAT+set}" = set; then :
10218  $as_echo_n "(cached) " >&6
10219else
10220  case $STAT in
10221  [\\/]* | ?:[\\/]*)
10222  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10223  ;;
10224  *)
10225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10226for as_dir in $PATH
10227do
10228  IFS=$as_save_IFS
10229  test -z "$as_dir" && as_dir=.
10230    for ac_exec_ext in '' $ac_executable_extensions; do
10231  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10232    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10234    break 2
10235  fi
10236done
10237  done
10238IFS=$as_save_IFS
10239
10240  ;;
10241esac
10242fi
10243STAT=$ac_cv_path_STAT
10244if test -n "$STAT"; then
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10246$as_echo "$STAT" >&6; }
10247else
10248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10249$as_echo "no" >&6; }
10250fi
10251
10252
10253# Extract the first word of "time", so it can be a program name with args.
10254set dummy time; ac_word=$2
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10256$as_echo_n "checking for $ac_word... " >&6; }
10257if test "${ac_cv_path_TIME+set}" = set; then :
10258  $as_echo_n "(cached) " >&6
10259else
10260  case $TIME in
10261  [\\/]* | ?:[\\/]*)
10262  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10263  ;;
10264  *)
10265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10266for as_dir in $PATH
10267do
10268  IFS=$as_save_IFS
10269  test -z "$as_dir" && as_dir=.
10270    for ac_exec_ext in '' $ac_executable_extensions; do
10271  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10272    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10274    break 2
10275  fi
10276done
10277  done
10278IFS=$as_save_IFS
10279
10280  ;;
10281esac
10282fi
10283TIME=$ac_cv_path_TIME
10284if test -n "$TIME"; then
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10286$as_echo "$TIME" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
10290fi
10291
10292
10293
10294if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10295
10296    for ac_prog in comm
10297do
10298  # Extract the first word of "$ac_prog", so it can be a program name with args.
10299set dummy $ac_prog; ac_word=$2
10300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10301$as_echo_n "checking for $ac_word... " >&6; }
10302if test "${ac_cv_path_COMM+set}" = set; then :
10303  $as_echo_n "(cached) " >&6
10304else
10305  case $COMM in
10306  [\\/]* | ?:[\\/]*)
10307  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10308  ;;
10309  *)
10310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10311for as_dir in $PATH
10312do
10313  IFS=$as_save_IFS
10314  test -z "$as_dir" && as_dir=.
10315    for ac_exec_ext in '' $ac_executable_extensions; do
10316  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10317    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10319    break 2
10320  fi
10321done
10322  done
10323IFS=$as_save_IFS
10324
10325  ;;
10326esac
10327fi
10328COMM=$ac_cv_path_COMM
10329if test -n "$COMM"; then
10330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10331$as_echo "$COMM" >&6; }
10332else
10333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10334$as_echo "no" >&6; }
10335fi
10336
10337
10338  test -n "$COMM" && break
10339done
10340
10341
10342    if test "x$COMM" = x; then
10343        if test "xcomm" = x; then
10344          PROG_NAME=comm
10345        else
10346          PROG_NAME=comm
10347        fi
10348        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10349$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10350        as_fn_error $? "Cannot continue" "$LINENO" 5
10351    fi
10352
10353
10354fi
10355
10356
10357# Check if pkg-config is available.
10358
10359
10360if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10361	if test -n "$ac_tool_prefix"; then
10362  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10363set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365$as_echo_n "checking for $ac_word... " >&6; }
10366if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10367  $as_echo_n "(cached) " >&6
10368else
10369  case $PKG_CONFIG in
10370  [\\/]* | ?:[\\/]*)
10371  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10372  ;;
10373  *)
10374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375for as_dir in $PATH
10376do
10377  IFS=$as_save_IFS
10378  test -z "$as_dir" && as_dir=.
10379    for ac_exec_ext in '' $ac_executable_extensions; do
10380  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10381    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383    break 2
10384  fi
10385done
10386  done
10387IFS=$as_save_IFS
10388
10389  ;;
10390esac
10391fi
10392PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10393if test -n "$PKG_CONFIG"; then
10394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10395$as_echo "$PKG_CONFIG" >&6; }
10396else
10397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
10399fi
10400
10401
10402fi
10403if test -z "$ac_cv_path_PKG_CONFIG"; then
10404  ac_pt_PKG_CONFIG=$PKG_CONFIG
10405  # Extract the first word of "pkg-config", so it can be a program name with args.
10406set dummy pkg-config; ac_word=$2
10407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10408$as_echo_n "checking for $ac_word... " >&6; }
10409if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10410  $as_echo_n "(cached) " >&6
10411else
10412  case $ac_pt_PKG_CONFIG in
10413  [\\/]* | ?:[\\/]*)
10414  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10415  ;;
10416  *)
10417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10418for as_dir in $PATH
10419do
10420  IFS=$as_save_IFS
10421  test -z "$as_dir" && as_dir=.
10422    for ac_exec_ext in '' $ac_executable_extensions; do
10423  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10424    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10426    break 2
10427  fi
10428done
10429  done
10430IFS=$as_save_IFS
10431
10432  ;;
10433esac
10434fi
10435ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10436if test -n "$ac_pt_PKG_CONFIG"; then
10437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10438$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10439else
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441$as_echo "no" >&6; }
10442fi
10443
10444  if test "x$ac_pt_PKG_CONFIG" = x; then
10445    PKG_CONFIG=""
10446  else
10447    case $cross_compiling:$ac_tool_warned in
10448yes:)
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10450$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10451ac_tool_warned=yes ;;
10452esac
10453    PKG_CONFIG=$ac_pt_PKG_CONFIG
10454  fi
10455else
10456  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10457fi
10458
10459fi
10460if test -n "$PKG_CONFIG"; then
10461	_pkg_min_version=0.9.0
10462	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10463$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10464	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10465		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10466$as_echo "yes" >&6; }
10467	else
10468		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10469$as_echo "no" >&6; }
10470		PKG_CONFIG=""
10471	fi
10472
10473fi
10474
10475# After basic tools have been setup, we can check build os specific details.
10476
10477###############################################################################
10478
10479# Note that this is the build platform OS version!
10480
10481OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10482OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10483OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10484OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10485
10486
10487
10488
10489
10490# Setup builddeps, for automatic downloading of tools we need.
10491# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10492# boot-jdk setup, but we need to have basic tools setup first.
10493
10494
10495# Check whether --with-builddeps-conf was given.
10496if test "${with_builddeps_conf+set}" = set; then :
10497  withval=$with_builddeps_conf;
10498fi
10499
10500
10501
10502# Check whether --with-builddeps-server was given.
10503if test "${with_builddeps_server+set}" = set; then :
10504  withval=$with_builddeps_server;
10505fi
10506
10507
10508
10509# Check whether --with-builddeps-dir was given.
10510if test "${with_builddeps_dir+set}" = set; then :
10511  withval=$with_builddeps_dir;
10512else
10513  with_builddeps_dir=/localhome/builddeps
10514fi
10515
10516
10517
10518# Check whether --with-builddeps-group was given.
10519if test "${with_builddeps_group+set}" = set; then :
10520  withval=$with_builddeps_group;
10521fi
10522
10523
10524
10525
10526    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10527        if test "x$with_builddeps_conf" != x; then
10528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10529$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10530            builddepsfile=$with_builddeps_conf
10531            if test -s $builddepsfile; then
10532                . $builddepsfile
10533                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10534$as_echo "loaded!" >&6; }
10535            else
10536               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10537           fi
10538        else
10539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10540$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10541            builddepsfile=`mktemp`
10542            touch $builddepsfile
10543            # Put all found confs into a single file.
10544            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10545            # Source the file to acquire the variables
10546            if test -s $builddepsfile; then
10547                . $builddepsfile
10548                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10549$as_echo "found at least one!" >&6; }
10550            else
10551               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10552           fi
10553        fi
10554        # Create build and target names that use _ instead of "-" and ".".
10555        # This is necessary to use them in variable names.
10556        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10557        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10558        # Extract rewrite information for build and target
10559        eval rewritten_build=\${REWRITE_${build_var}}
10560        if test "x$rewritten_build" = x; then
10561            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10562            echo Build stays the same $rewritten_build
10563        else
10564            echo Rewriting build for builddeps into $rewritten_build
10565        fi
10566        eval rewritten_target=\${REWRITE_${target_var}}
10567        if test "x$rewritten_target" = x; then
10568            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10569            echo Target stays the same $rewritten_target
10570        else
10571            echo Rewriting target for builddeps into $rewritten_target
10572        fi
10573        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10574        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10575    fi
10576    for ac_prog in 7z unzip
10577do
10578  # Extract the first word of "$ac_prog", so it can be a program name with args.
10579set dummy $ac_prog; ac_word=$2
10580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10581$as_echo_n "checking for $ac_word... " >&6; }
10582if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10583  $as_echo_n "(cached) " >&6
10584else
10585  if test -n "$BDEPS_UNZIP"; then
10586  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10587else
10588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10589for as_dir in $PATH
10590do
10591  IFS=$as_save_IFS
10592  test -z "$as_dir" && as_dir=.
10593    for ac_exec_ext in '' $ac_executable_extensions; do
10594  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10595    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10597    break 2
10598  fi
10599done
10600  done
10601IFS=$as_save_IFS
10602
10603fi
10604fi
10605BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10606if test -n "$BDEPS_UNZIP"; then
10607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10608$as_echo "$BDEPS_UNZIP" >&6; }
10609else
10610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10611$as_echo "no" >&6; }
10612fi
10613
10614
10615  test -n "$BDEPS_UNZIP" && break
10616done
10617
10618    if test "x$BDEPS_UNZIP" = x7z; then
10619        BDEPS_UNZIP="7z x"
10620    fi
10621
10622    for ac_prog in wget lftp ftp
10623do
10624  # Extract the first word of "$ac_prog", so it can be a program name with args.
10625set dummy $ac_prog; ac_word=$2
10626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627$as_echo_n "checking for $ac_word... " >&6; }
10628if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10629  $as_echo_n "(cached) " >&6
10630else
10631  if test -n "$BDEPS_FTP"; then
10632  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10633else
10634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10635for as_dir in $PATH
10636do
10637  IFS=$as_save_IFS
10638  test -z "$as_dir" && as_dir=.
10639    for ac_exec_ext in '' $ac_executable_extensions; do
10640  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10641    ac_cv_prog_BDEPS_FTP="$ac_prog"
10642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10643    break 2
10644  fi
10645done
10646  done
10647IFS=$as_save_IFS
10648
10649fi
10650fi
10651BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10652if test -n "$BDEPS_FTP"; then
10653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10654$as_echo "$BDEPS_FTP" >&6; }
10655else
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
10658fi
10659
10660
10661  test -n "$BDEPS_FTP" && break
10662done
10663
10664
10665
10666###############################################################################
10667#
10668# Determine OpenJDK variants, options and version numbers.
10669#
10670###############################################################################
10671
10672# We need build & target for this.
10673
10674
10675###############################################################################
10676#
10677# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10678# We always build headless support.
10679#
10680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10681$as_echo_n "checking headful support... " >&6; }
10682# Check whether --enable-headful was given.
10683if test "${enable_headful+set}" = set; then :
10684  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10685else
10686  SUPPORT_HEADFUL=yes
10687fi
10688
10689
10690SUPPORT_HEADLESS=yes
10691BUILD_HEADLESS="BUILD_HEADLESS:=true"
10692
10693if test "x$SUPPORT_HEADFUL" = xyes; then
10694    # We are building both headful and headless.
10695    headful_msg="inlude support for both headful and headless"
10696fi
10697
10698if test "x$SUPPORT_HEADFUL" = xno; then
10699    # Thus we are building headless only.
10700    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10701    headful_msg="headless only"
10702fi
10703
10704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10705$as_echo "$headful_msg" >&6; }
10706
10707
10708
10709
10710
10711# Control wether Hotspot runs Queens test after build.
10712# Check whether --enable-hotspot-test-in-build was given.
10713if test "${enable_hotspot_test_in_build+set}" = set; then :
10714  enableval=$enable_hotspot_test_in_build;
10715else
10716  enable_hotspot_test_in_build=no
10717fi
10718
10719if test "x$enable_hotspot_test_in_build" = "xyes"; then
10720    TEST_IN_BUILD=true
10721else
10722    TEST_IN_BUILD=false
10723fi
10724
10725
10726###############################################################################
10727#
10728# Choose cacerts source file
10729#
10730
10731# Check whether --with-cacerts-file was given.
10732if test "${with_cacerts_file+set}" = set; then :
10733  withval=$with_cacerts_file;
10734fi
10735
10736if test "x$with_cacerts_file" != x; then
10737    CACERTS_FILE=$with_cacerts_file
10738else
10739    if test "x$OPENJDK" = "xtrue"; then
10740        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10741    else
10742        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10743    fi
10744fi
10745
10746
10747###############################################################################
10748#
10749# Enable or disable unlimited crypto
10750#
10751# Check whether --enable-unlimited-crypto was given.
10752if test "${enable_unlimited_crypto+set}" = set; then :
10753  enableval=$enable_unlimited_crypto;
10754else
10755  enable_unlimited_crypto=no
10756fi
10757
10758if test "x$enable_unlimited_crypto" = "xyes"; then
10759    UNLIMITED_CRYPTO=true
10760else
10761    UNLIMITED_CRYPTO=false
10762fi
10763
10764
10765###############################################################################
10766#
10767# Compress jars
10768#
10769COMPRESS_JARS=false
10770
10771
10772
10773
10774# Source the version numbers
10775. $AUTOCONF_DIR/version-numbers
10776
10777# Get the settings from parameters
10778
10779# Check whether --with-milestone was given.
10780if test "${with_milestone+set}" = set; then :
10781  withval=$with_milestone;
10782fi
10783
10784if test "x$with_milestone" = xyes; then
10785  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10786elif test "x$with_milestone" != x; then
10787    MILESTONE="$with_milestone"
10788fi
10789if test "x$MILESTONE" = x; then
10790  MILESTONE=internal
10791fi
10792
10793
10794# Check whether --with-build-number was given.
10795if test "${with_build_number+set}" = set; then :
10796  withval=$with_build_number;
10797fi
10798
10799if test "x$with_build_number" = xyes; then
10800  as_fn_error $? "Build number must have a value" "$LINENO" 5
10801elif test "x$with_build_number" != x; then
10802  JDK_BUILD_NUMBER="$with_build_number"
10803fi
10804if test "x$JDK_BUILD_NUMBER" = x; then
10805  JDK_BUILD_NUMBER=b00
10806fi
10807
10808
10809# Check whether --with-user-release-suffix was given.
10810if test "${with_user_release_suffix+set}" = set; then :
10811  withval=$with_user_release_suffix;
10812fi
10813
10814if test "x$with_user_release_suffix" = xyes; then
10815  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10816elif test "x$with_user_release_suffix" != x; then
10817  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10818else
10819  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10820  # Avoid [:alnum:] since it depends on the locale.
10821  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10822  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10823fi
10824
10825
10826# Now set the JDK version, milestone, build number etc.
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841COPYRIGHT_YEAR=`date +'%Y'`
10842
10843
10844if test "x$JDK_UPDATE_VERSION" != x; then
10845  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10846else
10847  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10848fi
10849
10850
10851COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10852
10853
10854
10855###############################################################################
10856#
10857# Setup BootJDK, used to bootstrap the build.
10858#
10859###############################################################################
10860
10861
10862BOOT_JDK_FOUND=no
10863
10864# Check whether --with-boot-jdk was given.
10865if test "${with_boot_jdk+set}" = set; then :
10866  withval=$with_boot_jdk;
10867fi
10868
10869
10870# We look for the Boot JDK through various means, going from more certain to
10871# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10872# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10873# must check if this is indeed valid; otherwise we'll continue looking.
10874
10875# Test: Is bootjdk explicitely set by command line arguments?
10876
10877  if test "x$BOOT_JDK_FOUND" = xno; then
10878    # Now execute the test
10879
10880if test "x$with_boot_jdk" != x; then
10881    BOOT_JDK=$with_boot_jdk
10882    BOOT_JDK_FOUND=maybe
10883    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10884$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10885fi
10886
10887
10888    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10889    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10890      # Do we have a bin/java?
10891      if test ! -x "$BOOT_JDK/bin/java"; then
10892        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10894        BOOT_JDK_FOUND=no
10895      else
10896        # Do we have a bin/javac?
10897        if test ! -x "$BOOT_JDK/bin/javac"; then
10898          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10900          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10901$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10902          BOOT_JDK_FOUND=no
10903        else
10904          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10905          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10906            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10908            BOOT_JDK_FOUND=no
10909          else
10910            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10911            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10912
10913            # Extra M4 quote needed to protect [] in grep expression.
10914            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10915            if test "x$FOUND_VERSION_78" = x; then
10916              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10918              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10919$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10920              BOOT_JDK_FOUND=no
10921            else
10922              # We're done! :-)
10923              BOOT_JDK_FOUND=yes
10924
10925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10926
10927  # Input might be given as Windows format, start by converting to
10928  # unix format.
10929  path="$BOOT_JDK"
10930  new_path=`$CYGPATH -u "$path"`
10931
10932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10935  # "foo.exe" is OK but "foo" is an error.
10936  #
10937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10938  # It is also a way to make sure we got the proper file name for the real test later on.
10939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10940  if test "x$test_shortpath" = x; then
10941    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10943    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10944  fi
10945
10946  # Call helper function which possibly converts this using DOS-style short mode.
10947  # If so, the updated path is stored in $new_path.
10948
10949  input_path="$new_path"
10950  # Check if we need to convert this using DOS-style short mode. If the path
10951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10952  # take no chances and rewrite it.
10953  # Note: m4 eats our [], so we need to use [ and ] instead.
10954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10955  if test "x$has_forbidden_chars" != x; then
10956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10960      # Going to short mode and back again did indeed matter. Since short mode is
10961      # case insensitive, let's make it lowercase to improve readability.
10962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10963      # Now convert it back to Unix-stile (cygpath)
10964      input_path=`$CYGPATH -u "$shortmode_path"`
10965      new_path="$input_path"
10966    fi
10967  fi
10968
10969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10970  if test "x$test_cygdrive_prefix" = x; then
10971    # As a simple fix, exclude /usr/bin since it's not a real path.
10972    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10974      # a path prefixed by /cygdrive for fixpath to work.
10975      new_path="$CYGWIN_ROOT_PATH$input_path"
10976    fi
10977  fi
10978
10979
10980  if test "x$path" != "x$new_path"; then
10981    BOOT_JDK="$new_path"
10982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10983$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10984  fi
10985
10986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10987
10988  path="$BOOT_JDK"
10989  has_colon=`$ECHO $path | $GREP ^.:`
10990  new_path="$path"
10991  if test "x$has_colon" = x; then
10992    # Not in mixed or Windows style, start by that.
10993    new_path=`cmd //c echo $path`
10994  fi
10995
10996
10997  input_path="$new_path"
10998  # Check if we need to convert this using DOS-style short mode. If the path
10999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11000  # take no chances and rewrite it.
11001  # Note: m4 eats our [], so we need to use [ and ] instead.
11002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11003  if test "x$has_forbidden_chars" != x; then
11004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11006  fi
11007
11008
11009  windows_path="$new_path"
11010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11011    unix_path=`$CYGPATH -u "$windows_path"`
11012    new_path="$unix_path"
11013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11015    new_path="$unix_path"
11016  fi
11017
11018  if test "x$path" != "x$new_path"; then
11019    BOOT_JDK="$new_path"
11020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11021$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11022  fi
11023
11024  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11025  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11026
11027  else
11028    # We're on a posix platform. Hooray! :)
11029    path="$BOOT_JDK"
11030
11031    if test ! -f "$path" && test ! -d "$path"; then
11032      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11033    fi
11034
11035    has_space=`$ECHO "$path" | $GREP " "`
11036    if test "x$has_space" != x; then
11037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11039      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11040    fi
11041  fi
11042
11043              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11044$as_echo_n "checking for Boot JDK... " >&6; }
11045              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11046$as_echo "$BOOT_JDK" >&6; }
11047              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11048$as_echo_n "checking Boot JDK version... " >&6; }
11049              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11050              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11051$as_echo "$BOOT_JDK_VERSION" >&6; }
11052            fi # end check jdk version
11053          fi # end check rt.jar
11054        fi # end check javac
11055      fi # end check java
11056    fi # end check boot jdk found
11057  fi
11058
11059if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11060  # Having specified an argument which is incorrect will produce an instant failure;
11061  # we should not go on looking
11062  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11063fi
11064
11065# Test: Is bootjdk available from builddeps?
11066
11067  if test "x$BOOT_JDK_FOUND" = xno; then
11068    # Now execute the test
11069
11070
11071
11072    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11073        # Source the builddeps file again, to make sure it uses the latest variables!
11074        . $builddepsfile
11075        # Look for a target and build machine specific resource!
11076        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11077        if test "x$resource" = x; then
11078            # Ok, lets instead look for a target specific resource
11079            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11080        fi
11081        if test "x$resource" = x; then
11082            # Ok, lets instead look for a build specific resource
11083            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11084        fi
11085        if test "x$resource" = x; then
11086            # Ok, lets instead look for a generic resource
11087            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11088            resource=${builddep_bootjdk}
11089        fi
11090        if test "x$resource" != x; then
11091            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11092$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11093	    # If the resource in the builddeps.conf file is an existing directory,
11094	    # for example /java/linux/cups
11095	    if test -d ${resource}; then
11096	       depdir=${resource}
11097	    else
11098
11099# bootjdk is for example mymodule
11100# $resource is for example libs/general/libmymod_1_2_3.zip
11101# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11102# $with_builddeps_dir is for example /localhome/builddeps
11103# depdir is the name of the variable into which we store the depdir, eg MYMOD
11104# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11105# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11106    filename=`basename $resource`
11107    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11108    filebase=${filename%%.*}
11109    extension=${filename#*.}
11110    installdir=$with_builddeps_dir/$filebase
11111    if test ! -f $installdir/$filename.unpacked; then
11112        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11113$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11114        if test ! -d $installdir; then
11115            mkdir -p $installdir
11116        fi
11117        if test ! -d $installdir; then
11118            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11119        fi
11120        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11121        touch $tmpfile
11122        if test ! -f $tmpfile; then
11123            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11124        fi
11125
11126    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11127    # $tmpfile is the local file name for the downloaded file.
11128    VALID_TOOL=no
11129    if test "x$BDEPS_FTP" = xwget; then
11130       VALID_TOOL=yes
11131       wget -O $tmpfile $with_builddeps_server/$resource
11132    fi
11133    if test "x$BDEPS_FTP" = xlftp; then
11134       VALID_TOOL=yes
11135       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11136    fi
11137    if test "x$BDEPS_FTP" = xftp; then
11138        VALID_TOOL=yes
11139        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11140        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11141        FTPUSERPWD=${FTPSERVER%%@*}
11142        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11143            FTPUSER=${userpwd%%:*}
11144            FTPPWD=${userpwd#*@}
11145            FTPSERVER=${FTPSERVER#*@}
11146        else
11147            FTPUSER=ftp
11148            FTPPWD=ftp
11149        fi
11150        # the "pass" command does not work on some
11151        # ftp clients (read ftp.exe) but if it works,
11152        # passive mode is better!
11153        (\
11154            echo "user $FTPUSER $FTPPWD"        ;\
11155            echo "pass"                         ;\
11156            echo "bin"                          ;\
11157            echo "get $FTPPATH $tmpfile"              ;\
11158        ) | ftp -in $FTPSERVER
11159    fi
11160    if test "x$VALID_TOOL" != xyes; then
11161       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11162    fi
11163
11164        mv $tmpfile $installdir/$filename
11165        if test ! -s $installdir/$filename; then
11166            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11167        fi
11168        case "$extension" in
11169            zip)  echo "Unzipping $installdir/$filename..."
11170               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11171            ;;
11172            tar.gz) echo "Untaring $installdir/$filename..."
11173               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11174            ;;
11175            tgz) echo "Untaring $installdir/$filename..."
11176               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11177            ;;
11178            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11179            ;;
11180        esac
11181    fi
11182    if test -f $installdir/$filename.unpacked; then
11183        depdir=$installdir
11184    fi
11185
11186	    fi
11187            # Source the builddeps file again, because in the previous command, the depdir
11188            # was updated to point at the current build dependency install directory.
11189            . $builddepsfile
11190            # Now extract variables from the builddeps.conf files.
11191            theroot=${builddep_bootjdk_ROOT}
11192            thecflags=${builddep_bootjdk_CFLAGS}
11193            thelibs=${builddep_bootjdk_LIBS}
11194            if test "x$depdir" = x; then
11195                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11196            fi
11197            BOOT_JDK=$depdir
11198            if test "x$theroot" != x; then
11199               BOOT_JDK="$theroot"
11200            fi
11201            if test "x$thecflags" != x; then
11202               BOOT_JDK_CFLAGS="$thecflags"
11203            fi
11204            if test "x$thelibs" != x; then
11205               BOOT_JDK_LIBS="$thelibs"
11206            fi
11207            BOOT_JDK_FOUND=maybe
11208            else BOOT_JDK_FOUND=no
11209
11210        fi
11211        else BOOT_JDK_FOUND=no
11212
11213    fi
11214
11215
11216
11217    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11218    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11219      # Do we have a bin/java?
11220      if test ! -x "$BOOT_JDK/bin/java"; then
11221        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11223        BOOT_JDK_FOUND=no
11224      else
11225        # Do we have a bin/javac?
11226        if test ! -x "$BOOT_JDK/bin/javac"; then
11227          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11229          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11230$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11231          BOOT_JDK_FOUND=no
11232        else
11233          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11234          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11235            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11237            BOOT_JDK_FOUND=no
11238          else
11239            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11240            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11241
11242            # Extra M4 quote needed to protect [] in grep expression.
11243            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11244            if test "x$FOUND_VERSION_78" = x; then
11245              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11247              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11248$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11249              BOOT_JDK_FOUND=no
11250            else
11251              # We're done! :-)
11252              BOOT_JDK_FOUND=yes
11253
11254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11255
11256  # Input might be given as Windows format, start by converting to
11257  # unix format.
11258  path="$BOOT_JDK"
11259  new_path=`$CYGPATH -u "$path"`
11260
11261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11264  # "foo.exe" is OK but "foo" is an error.
11265  #
11266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11267  # It is also a way to make sure we got the proper file name for the real test later on.
11268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11269  if test "x$test_shortpath" = x; then
11270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11271$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11272    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11273  fi
11274
11275  # Call helper function which possibly converts this using DOS-style short mode.
11276  # If so, the updated path is stored in $new_path.
11277
11278  input_path="$new_path"
11279  # Check if we need to convert this using DOS-style short mode. If the path
11280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11281  # take no chances and rewrite it.
11282  # Note: m4 eats our [], so we need to use [ and ] instead.
11283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11284  if test "x$has_forbidden_chars" != x; then
11285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11289      # Going to short mode and back again did indeed matter. Since short mode is
11290      # case insensitive, let's make it lowercase to improve readability.
11291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11292      # Now convert it back to Unix-stile (cygpath)
11293      input_path=`$CYGPATH -u "$shortmode_path"`
11294      new_path="$input_path"
11295    fi
11296  fi
11297
11298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11299  if test "x$test_cygdrive_prefix" = x; then
11300    # As a simple fix, exclude /usr/bin since it's not a real path.
11301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11303      # a path prefixed by /cygdrive for fixpath to work.
11304      new_path="$CYGWIN_ROOT_PATH$input_path"
11305    fi
11306  fi
11307
11308
11309  if test "x$path" != "x$new_path"; then
11310    BOOT_JDK="$new_path"
11311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11312$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11313  fi
11314
11315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11316
11317  path="$BOOT_JDK"
11318  has_colon=`$ECHO $path | $GREP ^.:`
11319  new_path="$path"
11320  if test "x$has_colon" = x; then
11321    # Not in mixed or Windows style, start by that.
11322    new_path=`cmd //c echo $path`
11323  fi
11324
11325
11326  input_path="$new_path"
11327  # Check if we need to convert this using DOS-style short mode. If the path
11328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11329  # take no chances and rewrite it.
11330  # Note: m4 eats our [], so we need to use [ and ] instead.
11331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11332  if test "x$has_forbidden_chars" != x; then
11333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11335  fi
11336
11337
11338  windows_path="$new_path"
11339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11340    unix_path=`$CYGPATH -u "$windows_path"`
11341    new_path="$unix_path"
11342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11344    new_path="$unix_path"
11345  fi
11346
11347  if test "x$path" != "x$new_path"; then
11348    BOOT_JDK="$new_path"
11349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11350$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11351  fi
11352
11353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11355
11356  else
11357    # We're on a posix platform. Hooray! :)
11358    path="$BOOT_JDK"
11359
11360    if test ! -f "$path" && test ! -d "$path"; then
11361      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11362    fi
11363
11364    has_space=`$ECHO "$path" | $GREP " "`
11365    if test "x$has_space" != x; then
11366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11368      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11369    fi
11370  fi
11371
11372              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11373$as_echo_n "checking for Boot JDK... " >&6; }
11374              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11375$as_echo "$BOOT_JDK" >&6; }
11376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11377$as_echo_n "checking Boot JDK version... " >&6; }
11378              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11379              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11380$as_echo "$BOOT_JDK_VERSION" >&6; }
11381            fi # end check jdk version
11382          fi # end check rt.jar
11383        fi # end check javac
11384      fi # end check java
11385    fi # end check boot jdk found
11386  fi
11387
11388
11389# Test: Is $JAVA_HOME set?
11390
11391  if test "x$BOOT_JDK_FOUND" = xno; then
11392    # Now execute the test
11393
11394    if test "x$JAVA_HOME" != x; then
11395        JAVA_HOME_PROCESSED="$JAVA_HOME"
11396
11397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11398
11399  # Input might be given as Windows format, start by converting to
11400  # unix format.
11401  path="$JAVA_HOME_PROCESSED"
11402  new_path=`$CYGPATH -u "$path"`
11403
11404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11407  # "foo.exe" is OK but "foo" is an error.
11408  #
11409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11410  # It is also a way to make sure we got the proper file name for the real test later on.
11411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11412  if test "x$test_shortpath" = x; then
11413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11414$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11415    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11416  fi
11417
11418  # Call helper function which possibly converts this using DOS-style short mode.
11419  # If so, the updated path is stored in $new_path.
11420
11421  input_path="$new_path"
11422  # Check if we need to convert this using DOS-style short mode. If the path
11423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11424  # take no chances and rewrite it.
11425  # Note: m4 eats our [], so we need to use [ and ] instead.
11426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11427  if test "x$has_forbidden_chars" != x; then
11428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11432      # Going to short mode and back again did indeed matter. Since short mode is
11433      # case insensitive, let's make it lowercase to improve readability.
11434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11435      # Now convert it back to Unix-stile (cygpath)
11436      input_path=`$CYGPATH -u "$shortmode_path"`
11437      new_path="$input_path"
11438    fi
11439  fi
11440
11441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11442  if test "x$test_cygdrive_prefix" = x; then
11443    # As a simple fix, exclude /usr/bin since it's not a real path.
11444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11446      # a path prefixed by /cygdrive for fixpath to work.
11447      new_path="$CYGWIN_ROOT_PATH$input_path"
11448    fi
11449  fi
11450
11451
11452  if test "x$path" != "x$new_path"; then
11453    JAVA_HOME_PROCESSED="$new_path"
11454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11455$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11456  fi
11457
11458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11459
11460  path="$JAVA_HOME_PROCESSED"
11461  has_colon=`$ECHO $path | $GREP ^.:`
11462  new_path="$path"
11463  if test "x$has_colon" = x; then
11464    # Not in mixed or Windows style, start by that.
11465    new_path=`cmd //c echo $path`
11466  fi
11467
11468
11469  input_path="$new_path"
11470  # Check if we need to convert this using DOS-style short mode. If the path
11471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11472  # take no chances and rewrite it.
11473  # Note: m4 eats our [], so we need to use [ and ] instead.
11474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11475  if test "x$has_forbidden_chars" != x; then
11476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11478  fi
11479
11480
11481  windows_path="$new_path"
11482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11483    unix_path=`$CYGPATH -u "$windows_path"`
11484    new_path="$unix_path"
11485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11487    new_path="$unix_path"
11488  fi
11489
11490  if test "x$path" != "x$new_path"; then
11491    JAVA_HOME_PROCESSED="$new_path"
11492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11493$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11494  fi
11495
11496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11498
11499  else
11500    # We're on a posix platform. Hooray! :)
11501    path="$JAVA_HOME_PROCESSED"
11502
11503    if test ! -f "$path" && test ! -d "$path"; then
11504      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11505    fi
11506
11507    has_space=`$ECHO "$path" | $GREP " "`
11508    if test "x$has_space" != x; then
11509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11510$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11511      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11512    fi
11513  fi
11514
11515        if test ! -d "$JAVA_HOME_PROCESSED"; then
11516            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11517$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11518        else
11519          # Aha, the user has set a JAVA_HOME
11520          # let us use that as the Boot JDK.
11521          BOOT_JDK="$JAVA_HOME_PROCESSED"
11522          BOOT_JDK_FOUND=maybe
11523          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11524$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11525        fi
11526    fi
11527
11528
11529    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11530    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11531      # Do we have a bin/java?
11532      if test ! -x "$BOOT_JDK/bin/java"; then
11533        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11535        BOOT_JDK_FOUND=no
11536      else
11537        # Do we have a bin/javac?
11538        if test ! -x "$BOOT_JDK/bin/javac"; then
11539          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11541          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11542$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11543          BOOT_JDK_FOUND=no
11544        else
11545          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11546          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11547            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11549            BOOT_JDK_FOUND=no
11550          else
11551            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11552            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11553
11554            # Extra M4 quote needed to protect [] in grep expression.
11555            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11556            if test "x$FOUND_VERSION_78" = x; then
11557              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11559              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11560$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11561              BOOT_JDK_FOUND=no
11562            else
11563              # We're done! :-)
11564              BOOT_JDK_FOUND=yes
11565
11566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11567
11568  # Input might be given as Windows format, start by converting to
11569  # unix format.
11570  path="$BOOT_JDK"
11571  new_path=`$CYGPATH -u "$path"`
11572
11573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11576  # "foo.exe" is OK but "foo" is an error.
11577  #
11578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11579  # It is also a way to make sure we got the proper file name for the real test later on.
11580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11581  if test "x$test_shortpath" = x; then
11582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11583$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11584    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11585  fi
11586
11587  # Call helper function which possibly converts this using DOS-style short mode.
11588  # If so, the updated path is stored in $new_path.
11589
11590  input_path="$new_path"
11591  # Check if we need to convert this using DOS-style short mode. If the path
11592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11593  # take no chances and rewrite it.
11594  # Note: m4 eats our [], so we need to use [ and ] instead.
11595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11596  if test "x$has_forbidden_chars" != x; then
11597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11601      # Going to short mode and back again did indeed matter. Since short mode is
11602      # case insensitive, let's make it lowercase to improve readability.
11603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11604      # Now convert it back to Unix-stile (cygpath)
11605      input_path=`$CYGPATH -u "$shortmode_path"`
11606      new_path="$input_path"
11607    fi
11608  fi
11609
11610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11611  if test "x$test_cygdrive_prefix" = x; then
11612    # As a simple fix, exclude /usr/bin since it's not a real path.
11613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11615      # a path prefixed by /cygdrive for fixpath to work.
11616      new_path="$CYGWIN_ROOT_PATH$input_path"
11617    fi
11618  fi
11619
11620
11621  if test "x$path" != "x$new_path"; then
11622    BOOT_JDK="$new_path"
11623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11624$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11625  fi
11626
11627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11628
11629  path="$BOOT_JDK"
11630  has_colon=`$ECHO $path | $GREP ^.:`
11631  new_path="$path"
11632  if test "x$has_colon" = x; then
11633    # Not in mixed or Windows style, start by that.
11634    new_path=`cmd //c echo $path`
11635  fi
11636
11637
11638  input_path="$new_path"
11639  # Check if we need to convert this using DOS-style short mode. If the path
11640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11641  # take no chances and rewrite it.
11642  # Note: m4 eats our [], so we need to use [ and ] instead.
11643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11644  if test "x$has_forbidden_chars" != x; then
11645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11647  fi
11648
11649
11650  windows_path="$new_path"
11651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11652    unix_path=`$CYGPATH -u "$windows_path"`
11653    new_path="$unix_path"
11654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11656    new_path="$unix_path"
11657  fi
11658
11659  if test "x$path" != "x$new_path"; then
11660    BOOT_JDK="$new_path"
11661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11662$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11663  fi
11664
11665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11667
11668  else
11669    # We're on a posix platform. Hooray! :)
11670    path="$BOOT_JDK"
11671
11672    if test ! -f "$path" && test ! -d "$path"; then
11673      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11674    fi
11675
11676    has_space=`$ECHO "$path" | $GREP " "`
11677    if test "x$has_space" != x; then
11678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11680      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11681    fi
11682  fi
11683
11684              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11685$as_echo_n "checking for Boot JDK... " >&6; }
11686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11687$as_echo "$BOOT_JDK" >&6; }
11688              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11689$as_echo_n "checking Boot JDK version... " >&6; }
11690              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11691              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11692$as_echo "$BOOT_JDK_VERSION" >&6; }
11693            fi # end check jdk version
11694          fi # end check rt.jar
11695        fi # end check javac
11696      fi # end check java
11697    fi # end check boot jdk found
11698  fi
11699
11700
11701# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11702
11703  if test "x$BOOT_JDK_FOUND" = xno; then
11704    # Now execute the test
11705
11706    if test -x /usr/libexec/java_home; then
11707        BOOT_JDK=`/usr/libexec/java_home`
11708        BOOT_JDK_FOUND=maybe
11709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11710$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11711    fi
11712
11713
11714    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11715    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11716      # Do we have a bin/java?
11717      if test ! -x "$BOOT_JDK/bin/java"; then
11718        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11720        BOOT_JDK_FOUND=no
11721      else
11722        # Do we have a bin/javac?
11723        if test ! -x "$BOOT_JDK/bin/javac"; then
11724          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11726          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11727$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11728          BOOT_JDK_FOUND=no
11729        else
11730          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11731          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11732            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11734            BOOT_JDK_FOUND=no
11735          else
11736            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11737            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11738
11739            # Extra M4 quote needed to protect [] in grep expression.
11740            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11741            if test "x$FOUND_VERSION_78" = x; then
11742              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11744              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11745$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11746              BOOT_JDK_FOUND=no
11747            else
11748              # We're done! :-)
11749              BOOT_JDK_FOUND=yes
11750
11751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11752
11753  # Input might be given as Windows format, start by converting to
11754  # unix format.
11755  path="$BOOT_JDK"
11756  new_path=`$CYGPATH -u "$path"`
11757
11758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11761  # "foo.exe" is OK but "foo" is an error.
11762  #
11763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11764  # It is also a way to make sure we got the proper file name for the real test later on.
11765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11766  if test "x$test_shortpath" = x; then
11767    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11769    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11770  fi
11771
11772  # Call helper function which possibly converts this using DOS-style short mode.
11773  # If so, the updated path is stored in $new_path.
11774
11775  input_path="$new_path"
11776  # Check if we need to convert this using DOS-style short mode. If the path
11777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11778  # take no chances and rewrite it.
11779  # Note: m4 eats our [], so we need to use [ and ] instead.
11780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11781  if test "x$has_forbidden_chars" != x; then
11782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11786      # Going to short mode and back again did indeed matter. Since short mode is
11787      # case insensitive, let's make it lowercase to improve readability.
11788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11789      # Now convert it back to Unix-stile (cygpath)
11790      input_path=`$CYGPATH -u "$shortmode_path"`
11791      new_path="$input_path"
11792    fi
11793  fi
11794
11795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11796  if test "x$test_cygdrive_prefix" = x; then
11797    # As a simple fix, exclude /usr/bin since it's not a real path.
11798    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11800      # a path prefixed by /cygdrive for fixpath to work.
11801      new_path="$CYGWIN_ROOT_PATH$input_path"
11802    fi
11803  fi
11804
11805
11806  if test "x$path" != "x$new_path"; then
11807    BOOT_JDK="$new_path"
11808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11810  fi
11811
11812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11813
11814  path="$BOOT_JDK"
11815  has_colon=`$ECHO $path | $GREP ^.:`
11816  new_path="$path"
11817  if test "x$has_colon" = x; then
11818    # Not in mixed or Windows style, start by that.
11819    new_path=`cmd //c echo $path`
11820  fi
11821
11822
11823  input_path="$new_path"
11824  # Check if we need to convert this using DOS-style short mode. If the path
11825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11826  # take no chances and rewrite it.
11827  # Note: m4 eats our [], so we need to use [ and ] instead.
11828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11829  if test "x$has_forbidden_chars" != x; then
11830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11832  fi
11833
11834
11835  windows_path="$new_path"
11836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11837    unix_path=`$CYGPATH -u "$windows_path"`
11838    new_path="$unix_path"
11839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11841    new_path="$unix_path"
11842  fi
11843
11844  if test "x$path" != "x$new_path"; then
11845    BOOT_JDK="$new_path"
11846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11848  fi
11849
11850  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11851  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11852
11853  else
11854    # We're on a posix platform. Hooray! :)
11855    path="$BOOT_JDK"
11856
11857    if test ! -f "$path" && test ! -d "$path"; then
11858      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11859    fi
11860
11861    has_space=`$ECHO "$path" | $GREP " "`
11862    if test "x$has_space" != x; then
11863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11865      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11866    fi
11867  fi
11868
11869              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11870$as_echo_n "checking for Boot JDK... " >&6; }
11871              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11872$as_echo "$BOOT_JDK" >&6; }
11873              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11874$as_echo_n "checking Boot JDK version... " >&6; }
11875              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11876              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11877$as_echo "$BOOT_JDK_VERSION" >&6; }
11878            fi # end check jdk version
11879          fi # end check rt.jar
11880        fi # end check javac
11881      fi # end check java
11882    fi # end check boot jdk found
11883  fi
11884
11885
11886# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11887
11888  if test "x$BOOT_JDK_FOUND" = xno; then
11889    # Now execute the test
11890
11891    # Extract the first word of "javac", so it can be a program name with args.
11892set dummy javac; ac_word=$2
11893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11894$as_echo_n "checking for $ac_word... " >&6; }
11895if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11896  $as_echo_n "(cached) " >&6
11897else
11898  case $JAVAC_CHECK in
11899  [\\/]* | ?:[\\/]*)
11900  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11901  ;;
11902  *)
11903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11904for as_dir in $PATH
11905do
11906  IFS=$as_save_IFS
11907  test -z "$as_dir" && as_dir=.
11908    for ac_exec_ext in '' $ac_executable_extensions; do
11909  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11910    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11912    break 2
11913  fi
11914done
11915  done
11916IFS=$as_save_IFS
11917
11918  ;;
11919esac
11920fi
11921JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11922if test -n "$JAVAC_CHECK"; then
11923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11924$as_echo "$JAVAC_CHECK" >&6; }
11925else
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11927$as_echo "no" >&6; }
11928fi
11929
11930
11931    # Extract the first word of "java", so it can be a program name with args.
11932set dummy java; ac_word=$2
11933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11934$as_echo_n "checking for $ac_word... " >&6; }
11935if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11936  $as_echo_n "(cached) " >&6
11937else
11938  case $JAVA_CHECK in
11939  [\\/]* | ?:[\\/]*)
11940  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11941  ;;
11942  *)
11943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11944for as_dir in $PATH
11945do
11946  IFS=$as_save_IFS
11947  test -z "$as_dir" && as_dir=.
11948    for ac_exec_ext in '' $ac_executable_extensions; do
11949  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11950    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11952    break 2
11953  fi
11954done
11955  done
11956IFS=$as_save_IFS
11957
11958  ;;
11959esac
11960fi
11961JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11962if test -n "$JAVA_CHECK"; then
11963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11964$as_echo "$JAVA_CHECK" >&6; }
11965else
11966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11967$as_echo "no" >&6; }
11968fi
11969
11970
11971    BINARY="$JAVAC_CHECK"
11972    if test "x$JAVAC_CHECK" = x; then
11973        BINARY="$JAVA_CHECK"
11974    fi
11975    if test "x$BINARY" != x; then
11976        # So there is a java(c) binary, it might be part of a JDK.
11977        # Lets find the JDK/JRE directory by following symbolic links.
11978        # Linux/GNU systems often have links from /usr/bin/java to
11979        # /etc/alternatives/java to the real JDK binary.
11980
11981    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11982        # Follow a chain of symbolic links. Use readlink
11983        # where it exists, else fall back to horribly
11984        # complicated shell code.
11985        if test "x$READLINK_TESTED" != yes; then
11986            # On MacOSX there is a readlink tool with a different
11987            # purpose than the GNU readlink tool. Check the found readlink.
11988            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11989            if test "x$ISGNU" = x; then
11990                 # A readlink that we do not know how to use.
11991                 # Are there other non-GNU readlinks out there?
11992                 READLINK_TESTED=yes
11993                 READLINK=
11994            fi
11995        fi
11996
11997        if test "x$READLINK" != x; then
11998            BINARY=`$READLINK -f $BINARY`
11999        else
12000            # Save the current directory for restoring afterwards
12001            STARTDIR=$PWD
12002            COUNTER=0
12003            sym_link_dir=`$DIRNAME $BINARY`
12004            sym_link_file=`$BASENAME $BINARY`
12005            # Use the system pwd and not the shell builtin to resolve directory symlinks
12006            cd $sym_link_dir
12007            cd `$THEPWDCMD`
12008            sym_link_dir=`$THEPWDCMD`
12009            # Resolve file symlinks
12010            while test $COUNTER -lt 20; do
12011                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12012                if test "x$ISLINK" == x; then
12013                    # This is not a symbolic link! We are done!
12014                    break
12015                fi
12016                # Again resolve directory symlinks since the target of the just found
12017                # link could be in a different directory
12018                cd `$DIRNAME $ISLINK`
12019                sym_link_dir=`$THEPWDCMD`
12020                sym_link_file=`$BASENAME $ISLINK`
12021                let COUNTER=COUNTER+1
12022            done
12023            cd $STARTDIR
12024            BINARY=$sym_link_dir/$sym_link_file
12025        fi
12026    fi
12027
12028        BOOT_JDK=`dirname "$BINARY"`
12029        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12030        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12031            # Looks like we found ourselves an JDK
12032            BOOT_JDK_FOUND=maybe
12033            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12034$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12035        fi
12036    fi
12037
12038
12039    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12040    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12041      # Do we have a bin/java?
12042      if test ! -x "$BOOT_JDK/bin/java"; then
12043        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12045        BOOT_JDK_FOUND=no
12046      else
12047        # Do we have a bin/javac?
12048        if test ! -x "$BOOT_JDK/bin/javac"; then
12049          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12051          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12052$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12053          BOOT_JDK_FOUND=no
12054        else
12055          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12056          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12059            BOOT_JDK_FOUND=no
12060          else
12061            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12063
12064            # Extra M4 quote needed to protect [] in grep expression.
12065            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12066            if test "x$FOUND_VERSION_78" = x; then
12067              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12069              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12070$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12071              BOOT_JDK_FOUND=no
12072            else
12073              # We're done! :-)
12074              BOOT_JDK_FOUND=yes
12075
12076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12077
12078  # Input might be given as Windows format, start by converting to
12079  # unix format.
12080  path="$BOOT_JDK"
12081  new_path=`$CYGPATH -u "$path"`
12082
12083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12086  # "foo.exe" is OK but "foo" is an error.
12087  #
12088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12089  # It is also a way to make sure we got the proper file name for the real test later on.
12090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12091  if test "x$test_shortpath" = x; then
12092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12094    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12095  fi
12096
12097  # Call helper function which possibly converts this using DOS-style short mode.
12098  # If so, the updated path is stored in $new_path.
12099
12100  input_path="$new_path"
12101  # Check if we need to convert this using DOS-style short mode. If the path
12102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12103  # take no chances and rewrite it.
12104  # Note: m4 eats our [], so we need to use [ and ] instead.
12105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12106  if test "x$has_forbidden_chars" != x; then
12107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12111      # Going to short mode and back again did indeed matter. Since short mode is
12112      # case insensitive, let's make it lowercase to improve readability.
12113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12114      # Now convert it back to Unix-stile (cygpath)
12115      input_path=`$CYGPATH -u "$shortmode_path"`
12116      new_path="$input_path"
12117    fi
12118  fi
12119
12120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12121  if test "x$test_cygdrive_prefix" = x; then
12122    # As a simple fix, exclude /usr/bin since it's not a real path.
12123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12125      # a path prefixed by /cygdrive for fixpath to work.
12126      new_path="$CYGWIN_ROOT_PATH$input_path"
12127    fi
12128  fi
12129
12130
12131  if test "x$path" != "x$new_path"; then
12132    BOOT_JDK="$new_path"
12133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12135  fi
12136
12137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12138
12139  path="$BOOT_JDK"
12140  has_colon=`$ECHO $path | $GREP ^.:`
12141  new_path="$path"
12142  if test "x$has_colon" = x; then
12143    # Not in mixed or Windows style, start by that.
12144    new_path=`cmd //c echo $path`
12145  fi
12146
12147
12148  input_path="$new_path"
12149  # Check if we need to convert this using DOS-style short mode. If the path
12150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12151  # take no chances and rewrite it.
12152  # Note: m4 eats our [], so we need to use [ and ] instead.
12153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12154  if test "x$has_forbidden_chars" != x; then
12155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12157  fi
12158
12159
12160  windows_path="$new_path"
12161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12162    unix_path=`$CYGPATH -u "$windows_path"`
12163    new_path="$unix_path"
12164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12166    new_path="$unix_path"
12167  fi
12168
12169  if test "x$path" != "x$new_path"; then
12170    BOOT_JDK="$new_path"
12171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12173  fi
12174
12175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12177
12178  else
12179    # We're on a posix platform. Hooray! :)
12180    path="$BOOT_JDK"
12181
12182    if test ! -f "$path" && test ! -d "$path"; then
12183      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12184    fi
12185
12186    has_space=`$ECHO "$path" | $GREP " "`
12187    if test "x$has_space" != x; then
12188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12191    fi
12192  fi
12193
12194              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12195$as_echo_n "checking for Boot JDK... " >&6; }
12196              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12197$as_echo "$BOOT_JDK" >&6; }
12198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12199$as_echo_n "checking Boot JDK version... " >&6; }
12200              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12202$as_echo "$BOOT_JDK_VERSION" >&6; }
12203            fi # end check jdk version
12204          fi # end check rt.jar
12205        fi # end check javac
12206      fi # end check java
12207    fi # end check boot jdk found
12208  fi
12209
12210
12211# Test: Is there a JDK installed in default, well-known locations?
12212
12213  if test "x$BOOT_JDK_FOUND" = xno; then
12214    # Now execute the test
12215
12216  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12217
12218  if test "x$BOOT_JDK_FOUND" = xno; then
12219    # Now execute the test
12220
12221  if test "x$ProgramW6432" != x; then
12222    VIRTUAL_DIR="$ProgramW6432/Java"
12223
12224  windows_path="$VIRTUAL_DIR"
12225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12226    unix_path=`$CYGPATH -u "$windows_path"`
12227    VIRTUAL_DIR="$unix_path"
12228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12230    VIRTUAL_DIR="$unix_path"
12231  fi
12232
12233
12234  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12235  BOOT_JDK_SUFFIX=""
12236  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12237  if test "x$ALL_JDKS_FOUND" != x; then
12238    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12239
12240  if test "x$BOOT_JDK_FOUND" = xno; then
12241    # Now execute the test
12242
12243        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12244        if test -d "$BOOT_JDK"; then
12245          BOOT_JDK_FOUND=maybe
12246          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12247$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12248        fi
12249
12250
12251    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12252    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12253      # Do we have a bin/java?
12254      if test ! -x "$BOOT_JDK/bin/java"; then
12255        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12257        BOOT_JDK_FOUND=no
12258      else
12259        # Do we have a bin/javac?
12260        if test ! -x "$BOOT_JDK/bin/javac"; then
12261          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12263          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12264$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12265          BOOT_JDK_FOUND=no
12266        else
12267          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12268          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12269            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12271            BOOT_JDK_FOUND=no
12272          else
12273            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12274            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12275
12276            # Extra M4 quote needed to protect [] in grep expression.
12277            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12278            if test "x$FOUND_VERSION_78" = x; then
12279              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12281              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12282$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12283              BOOT_JDK_FOUND=no
12284            else
12285              # We're done! :-)
12286              BOOT_JDK_FOUND=yes
12287
12288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12289
12290  # Input might be given as Windows format, start by converting to
12291  # unix format.
12292  path="$BOOT_JDK"
12293  new_path=`$CYGPATH -u "$path"`
12294
12295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12298  # "foo.exe" is OK but "foo" is an error.
12299  #
12300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12301  # It is also a way to make sure we got the proper file name for the real test later on.
12302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12303  if test "x$test_shortpath" = x; then
12304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12306    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12307  fi
12308
12309  # Call helper function which possibly converts this using DOS-style short mode.
12310  # If so, the updated path is stored in $new_path.
12311
12312  input_path="$new_path"
12313  # Check if we need to convert this using DOS-style short mode. If the path
12314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12315  # take no chances and rewrite it.
12316  # Note: m4 eats our [], so we need to use [ and ] instead.
12317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12318  if test "x$has_forbidden_chars" != x; then
12319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12323      # Going to short mode and back again did indeed matter. Since short mode is
12324      # case insensitive, let's make it lowercase to improve readability.
12325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12326      # Now convert it back to Unix-stile (cygpath)
12327      input_path=`$CYGPATH -u "$shortmode_path"`
12328      new_path="$input_path"
12329    fi
12330  fi
12331
12332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12333  if test "x$test_cygdrive_prefix" = x; then
12334    # As a simple fix, exclude /usr/bin since it's not a real path.
12335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12337      # a path prefixed by /cygdrive for fixpath to work.
12338      new_path="$CYGWIN_ROOT_PATH$input_path"
12339    fi
12340  fi
12341
12342
12343  if test "x$path" != "x$new_path"; then
12344    BOOT_JDK="$new_path"
12345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12346$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12347  fi
12348
12349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12350
12351  path="$BOOT_JDK"
12352  has_colon=`$ECHO $path | $GREP ^.:`
12353  new_path="$path"
12354  if test "x$has_colon" = x; then
12355    # Not in mixed or Windows style, start by that.
12356    new_path=`cmd //c echo $path`
12357  fi
12358
12359
12360  input_path="$new_path"
12361  # Check if we need to convert this using DOS-style short mode. If the path
12362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12363  # take no chances and rewrite it.
12364  # Note: m4 eats our [], so we need to use [ and ] instead.
12365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12366  if test "x$has_forbidden_chars" != x; then
12367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12369  fi
12370
12371
12372  windows_path="$new_path"
12373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12374    unix_path=`$CYGPATH -u "$windows_path"`
12375    new_path="$unix_path"
12376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12378    new_path="$unix_path"
12379  fi
12380
12381  if test "x$path" != "x$new_path"; then
12382    BOOT_JDK="$new_path"
12383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12385  fi
12386
12387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12389
12390  else
12391    # We're on a posix platform. Hooray! :)
12392    path="$BOOT_JDK"
12393
12394    if test ! -f "$path" && test ! -d "$path"; then
12395      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12396    fi
12397
12398    has_space=`$ECHO "$path" | $GREP " "`
12399    if test "x$has_space" != x; then
12400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12402      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12403    fi
12404  fi
12405
12406              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12407$as_echo_n "checking for Boot JDK... " >&6; }
12408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12409$as_echo "$BOOT_JDK" >&6; }
12410              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12411$as_echo_n "checking Boot JDK version... " >&6; }
12412              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12413              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12414$as_echo "$BOOT_JDK_VERSION" >&6; }
12415            fi # end check jdk version
12416          fi # end check rt.jar
12417        fi # end check javac
12418      fi # end check java
12419    fi # end check boot jdk found
12420  fi
12421
12422    done
12423  fi
12424
12425  fi
12426
12427
12428    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12429    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12430      # Do we have a bin/java?
12431      if test ! -x "$BOOT_JDK/bin/java"; then
12432        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12434        BOOT_JDK_FOUND=no
12435      else
12436        # Do we have a bin/javac?
12437        if test ! -x "$BOOT_JDK/bin/javac"; then
12438          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12440          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12441$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12442          BOOT_JDK_FOUND=no
12443        else
12444          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12445          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12446            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12448            BOOT_JDK_FOUND=no
12449          else
12450            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12451            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12452
12453            # Extra M4 quote needed to protect [] in grep expression.
12454            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12455            if test "x$FOUND_VERSION_78" = x; then
12456              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12458              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12459$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12460              BOOT_JDK_FOUND=no
12461            else
12462              # We're done! :-)
12463              BOOT_JDK_FOUND=yes
12464
12465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12466
12467  # Input might be given as Windows format, start by converting to
12468  # unix format.
12469  path="$BOOT_JDK"
12470  new_path=`$CYGPATH -u "$path"`
12471
12472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12475  # "foo.exe" is OK but "foo" is an error.
12476  #
12477  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12478  # It is also a way to make sure we got the proper file name for the real test later on.
12479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12480  if test "x$test_shortpath" = x; then
12481    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12482$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12483    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12484  fi
12485
12486  # Call helper function which possibly converts this using DOS-style short mode.
12487  # If so, the updated path is stored in $new_path.
12488
12489  input_path="$new_path"
12490  # Check if we need to convert this using DOS-style short mode. If the path
12491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12492  # take no chances and rewrite it.
12493  # Note: m4 eats our [], so we need to use [ and ] instead.
12494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12495  if test "x$has_forbidden_chars" != x; then
12496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12500      # Going to short mode and back again did indeed matter. Since short mode is
12501      # case insensitive, let's make it lowercase to improve readability.
12502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12503      # Now convert it back to Unix-stile (cygpath)
12504      input_path=`$CYGPATH -u "$shortmode_path"`
12505      new_path="$input_path"
12506    fi
12507  fi
12508
12509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12510  if test "x$test_cygdrive_prefix" = x; then
12511    # As a simple fix, exclude /usr/bin since it's not a real path.
12512    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12514      # a path prefixed by /cygdrive for fixpath to work.
12515      new_path="$CYGWIN_ROOT_PATH$input_path"
12516    fi
12517  fi
12518
12519
12520  if test "x$path" != "x$new_path"; then
12521    BOOT_JDK="$new_path"
12522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12523$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12524  fi
12525
12526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12527
12528  path="$BOOT_JDK"
12529  has_colon=`$ECHO $path | $GREP ^.:`
12530  new_path="$path"
12531  if test "x$has_colon" = x; then
12532    # Not in mixed or Windows style, start by that.
12533    new_path=`cmd //c echo $path`
12534  fi
12535
12536
12537  input_path="$new_path"
12538  # Check if we need to convert this using DOS-style short mode. If the path
12539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12540  # take no chances and rewrite it.
12541  # Note: m4 eats our [], so we need to use [ and ] instead.
12542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12543  if test "x$has_forbidden_chars" != x; then
12544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12546  fi
12547
12548
12549  windows_path="$new_path"
12550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12551    unix_path=`$CYGPATH -u "$windows_path"`
12552    new_path="$unix_path"
12553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12555    new_path="$unix_path"
12556  fi
12557
12558  if test "x$path" != "x$new_path"; then
12559    BOOT_JDK="$new_path"
12560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12561$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12562  fi
12563
12564  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12565  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12566
12567  else
12568    # We're on a posix platform. Hooray! :)
12569    path="$BOOT_JDK"
12570
12571    if test ! -f "$path" && test ! -d "$path"; then
12572      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12573    fi
12574
12575    has_space=`$ECHO "$path" | $GREP " "`
12576    if test "x$has_space" != x; then
12577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12579      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12580    fi
12581  fi
12582
12583              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12584$as_echo_n "checking for Boot JDK... " >&6; }
12585              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12586$as_echo "$BOOT_JDK" >&6; }
12587              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12588$as_echo_n "checking Boot JDK version... " >&6; }
12589              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12590              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12591$as_echo "$BOOT_JDK_VERSION" >&6; }
12592            fi # end check jdk version
12593          fi # end check rt.jar
12594        fi # end check javac
12595      fi # end check java
12596    fi # end check boot jdk found
12597  fi
12598
12599
12600  if test "x$BOOT_JDK_FOUND" = xno; then
12601    # Now execute the test
12602
12603  if test "x$PROGRAMW6432" != x; then
12604    VIRTUAL_DIR="$PROGRAMW6432/Java"
12605
12606  windows_path="$VIRTUAL_DIR"
12607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12608    unix_path=`$CYGPATH -u "$windows_path"`
12609    VIRTUAL_DIR="$unix_path"
12610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12612    VIRTUAL_DIR="$unix_path"
12613  fi
12614
12615
12616  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12617  BOOT_JDK_SUFFIX=""
12618  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12619  if test "x$ALL_JDKS_FOUND" != x; then
12620    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12621
12622  if test "x$BOOT_JDK_FOUND" = xno; then
12623    # Now execute the test
12624
12625        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12626        if test -d "$BOOT_JDK"; then
12627          BOOT_JDK_FOUND=maybe
12628          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12629$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12630        fi
12631
12632
12633    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12634    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12635      # Do we have a bin/java?
12636      if test ! -x "$BOOT_JDK/bin/java"; then
12637        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12639        BOOT_JDK_FOUND=no
12640      else
12641        # Do we have a bin/javac?
12642        if test ! -x "$BOOT_JDK/bin/javac"; then
12643          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12645          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12646$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12647          BOOT_JDK_FOUND=no
12648        else
12649          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12650          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12651            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12653            BOOT_JDK_FOUND=no
12654          else
12655            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12656            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12657
12658            # Extra M4 quote needed to protect [] in grep expression.
12659            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12660            if test "x$FOUND_VERSION_78" = x; then
12661              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12663              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12664$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12665              BOOT_JDK_FOUND=no
12666            else
12667              # We're done! :-)
12668              BOOT_JDK_FOUND=yes
12669
12670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12671
12672  # Input might be given as Windows format, start by converting to
12673  # unix format.
12674  path="$BOOT_JDK"
12675  new_path=`$CYGPATH -u "$path"`
12676
12677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12680  # "foo.exe" is OK but "foo" is an error.
12681  #
12682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12683  # It is also a way to make sure we got the proper file name for the real test later on.
12684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12685  if test "x$test_shortpath" = x; then
12686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12687$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12688    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12689  fi
12690
12691  # Call helper function which possibly converts this using DOS-style short mode.
12692  # If so, the updated path is stored in $new_path.
12693
12694  input_path="$new_path"
12695  # Check if we need to convert this using DOS-style short mode. If the path
12696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12697  # take no chances and rewrite it.
12698  # Note: m4 eats our [], so we need to use [ and ] instead.
12699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12700  if test "x$has_forbidden_chars" != x; then
12701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12705      # Going to short mode and back again did indeed matter. Since short mode is
12706      # case insensitive, let's make it lowercase to improve readability.
12707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12708      # Now convert it back to Unix-stile (cygpath)
12709      input_path=`$CYGPATH -u "$shortmode_path"`
12710      new_path="$input_path"
12711    fi
12712  fi
12713
12714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12715  if test "x$test_cygdrive_prefix" = x; then
12716    # As a simple fix, exclude /usr/bin since it's not a real path.
12717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12719      # a path prefixed by /cygdrive for fixpath to work.
12720      new_path="$CYGWIN_ROOT_PATH$input_path"
12721    fi
12722  fi
12723
12724
12725  if test "x$path" != "x$new_path"; then
12726    BOOT_JDK="$new_path"
12727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12728$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12729  fi
12730
12731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12732
12733  path="$BOOT_JDK"
12734  has_colon=`$ECHO $path | $GREP ^.:`
12735  new_path="$path"
12736  if test "x$has_colon" = x; then
12737    # Not in mixed or Windows style, start by that.
12738    new_path=`cmd //c echo $path`
12739  fi
12740
12741
12742  input_path="$new_path"
12743  # Check if we need to convert this using DOS-style short mode. If the path
12744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12745  # take no chances and rewrite it.
12746  # Note: m4 eats our [], so we need to use [ and ] instead.
12747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12748  if test "x$has_forbidden_chars" != x; then
12749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12751  fi
12752
12753
12754  windows_path="$new_path"
12755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12756    unix_path=`$CYGPATH -u "$windows_path"`
12757    new_path="$unix_path"
12758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12760    new_path="$unix_path"
12761  fi
12762
12763  if test "x$path" != "x$new_path"; then
12764    BOOT_JDK="$new_path"
12765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12767  fi
12768
12769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12771
12772  else
12773    # We're on a posix platform. Hooray! :)
12774    path="$BOOT_JDK"
12775
12776    if test ! -f "$path" && test ! -d "$path"; then
12777      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12778    fi
12779
12780    has_space=`$ECHO "$path" | $GREP " "`
12781    if test "x$has_space" != x; then
12782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12783$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12784      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12785    fi
12786  fi
12787
12788              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12789$as_echo_n "checking for Boot JDK... " >&6; }
12790              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12791$as_echo "$BOOT_JDK" >&6; }
12792              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12793$as_echo_n "checking Boot JDK version... " >&6; }
12794              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12795              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12796$as_echo "$BOOT_JDK_VERSION" >&6; }
12797            fi # end check jdk version
12798          fi # end check rt.jar
12799        fi # end check javac
12800      fi # end check java
12801    fi # end check boot jdk found
12802  fi
12803
12804    done
12805  fi
12806
12807  fi
12808
12809
12810    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12811    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12812      # Do we have a bin/java?
12813      if test ! -x "$BOOT_JDK/bin/java"; then
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12816        BOOT_JDK_FOUND=no
12817      else
12818        # Do we have a bin/javac?
12819        if test ! -x "$BOOT_JDK/bin/javac"; then
12820          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12822          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12823$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12824          BOOT_JDK_FOUND=no
12825        else
12826          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12827          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12828            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12830            BOOT_JDK_FOUND=no
12831          else
12832            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12833            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12834
12835            # Extra M4 quote needed to protect [] in grep expression.
12836            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12837            if test "x$FOUND_VERSION_78" = x; then
12838              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12840              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12841$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12842              BOOT_JDK_FOUND=no
12843            else
12844              # We're done! :-)
12845              BOOT_JDK_FOUND=yes
12846
12847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12848
12849  # Input might be given as Windows format, start by converting to
12850  # unix format.
12851  path="$BOOT_JDK"
12852  new_path=`$CYGPATH -u "$path"`
12853
12854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12857  # "foo.exe" is OK but "foo" is an error.
12858  #
12859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12860  # It is also a way to make sure we got the proper file name for the real test later on.
12861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12862  if test "x$test_shortpath" = x; then
12863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12865    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12866  fi
12867
12868  # Call helper function which possibly converts this using DOS-style short mode.
12869  # If so, the updated path is stored in $new_path.
12870
12871  input_path="$new_path"
12872  # Check if we need to convert this using DOS-style short mode. If the path
12873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12874  # take no chances and rewrite it.
12875  # Note: m4 eats our [], so we need to use [ and ] instead.
12876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12877  if test "x$has_forbidden_chars" != x; then
12878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12882      # Going to short mode and back again did indeed matter. Since short mode is
12883      # case insensitive, let's make it lowercase to improve readability.
12884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12885      # Now convert it back to Unix-stile (cygpath)
12886      input_path=`$CYGPATH -u "$shortmode_path"`
12887      new_path="$input_path"
12888    fi
12889  fi
12890
12891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12892  if test "x$test_cygdrive_prefix" = x; then
12893    # As a simple fix, exclude /usr/bin since it's not a real path.
12894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12896      # a path prefixed by /cygdrive for fixpath to work.
12897      new_path="$CYGWIN_ROOT_PATH$input_path"
12898    fi
12899  fi
12900
12901
12902  if test "x$path" != "x$new_path"; then
12903    BOOT_JDK="$new_path"
12904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12906  fi
12907
12908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12909
12910  path="$BOOT_JDK"
12911  has_colon=`$ECHO $path | $GREP ^.:`
12912  new_path="$path"
12913  if test "x$has_colon" = x; then
12914    # Not in mixed or Windows style, start by that.
12915    new_path=`cmd //c echo $path`
12916  fi
12917
12918
12919  input_path="$new_path"
12920  # Check if we need to convert this using DOS-style short mode. If the path
12921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12922  # take no chances and rewrite it.
12923  # Note: m4 eats our [], so we need to use [ and ] instead.
12924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12925  if test "x$has_forbidden_chars" != x; then
12926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12928  fi
12929
12930
12931  windows_path="$new_path"
12932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12933    unix_path=`$CYGPATH -u "$windows_path"`
12934    new_path="$unix_path"
12935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12937    new_path="$unix_path"
12938  fi
12939
12940  if test "x$path" != "x$new_path"; then
12941    BOOT_JDK="$new_path"
12942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12943$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12944  fi
12945
12946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12948
12949  else
12950    # We're on a posix platform. Hooray! :)
12951    path="$BOOT_JDK"
12952
12953    if test ! -f "$path" && test ! -d "$path"; then
12954      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12955    fi
12956
12957    has_space=`$ECHO "$path" | $GREP " "`
12958    if test "x$has_space" != x; then
12959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12960$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12961      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12962    fi
12963  fi
12964
12965              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12966$as_echo_n "checking for Boot JDK... " >&6; }
12967              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12968$as_echo "$BOOT_JDK" >&6; }
12969              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12970$as_echo_n "checking Boot JDK version... " >&6; }
12971              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12972              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12973$as_echo "$BOOT_JDK_VERSION" >&6; }
12974            fi # end check jdk version
12975          fi # end check rt.jar
12976        fi # end check javac
12977      fi # end check java
12978    fi # end check boot jdk found
12979  fi
12980
12981
12982  if test "x$BOOT_JDK_FOUND" = xno; then
12983    # Now execute the test
12984
12985  if test "x$PROGRAMFILES" != x; then
12986    VIRTUAL_DIR="$PROGRAMFILES/Java"
12987
12988  windows_path="$VIRTUAL_DIR"
12989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12990    unix_path=`$CYGPATH -u "$windows_path"`
12991    VIRTUAL_DIR="$unix_path"
12992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12994    VIRTUAL_DIR="$unix_path"
12995  fi
12996
12997
12998  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12999  BOOT_JDK_SUFFIX=""
13000  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13001  if test "x$ALL_JDKS_FOUND" != x; then
13002    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13003
13004  if test "x$BOOT_JDK_FOUND" = xno; then
13005    # Now execute the test
13006
13007        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13008        if test -d "$BOOT_JDK"; then
13009          BOOT_JDK_FOUND=maybe
13010          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13011$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13012        fi
13013
13014
13015    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13016    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13017      # Do we have a bin/java?
13018      if test ! -x "$BOOT_JDK/bin/java"; then
13019        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13021        BOOT_JDK_FOUND=no
13022      else
13023        # Do we have a bin/javac?
13024        if test ! -x "$BOOT_JDK/bin/javac"; then
13025          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13027          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13028$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13029          BOOT_JDK_FOUND=no
13030        else
13031          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13032          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13033            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13035            BOOT_JDK_FOUND=no
13036          else
13037            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13038            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13039
13040            # Extra M4 quote needed to protect [] in grep expression.
13041            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13042            if test "x$FOUND_VERSION_78" = x; then
13043              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13045              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13046$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13047              BOOT_JDK_FOUND=no
13048            else
13049              # We're done! :-)
13050              BOOT_JDK_FOUND=yes
13051
13052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13053
13054  # Input might be given as Windows format, start by converting to
13055  # unix format.
13056  path="$BOOT_JDK"
13057  new_path=`$CYGPATH -u "$path"`
13058
13059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13062  # "foo.exe" is OK but "foo" is an error.
13063  #
13064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13065  # It is also a way to make sure we got the proper file name for the real test later on.
13066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13067  if test "x$test_shortpath" = x; then
13068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13069$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13070    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13071  fi
13072
13073  # Call helper function which possibly converts this using DOS-style short mode.
13074  # If so, the updated path is stored in $new_path.
13075
13076  input_path="$new_path"
13077  # Check if we need to convert this using DOS-style short mode. If the path
13078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13079  # take no chances and rewrite it.
13080  # Note: m4 eats our [], so we need to use [ and ] instead.
13081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13082  if test "x$has_forbidden_chars" != x; then
13083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13087      # Going to short mode and back again did indeed matter. Since short mode is
13088      # case insensitive, let's make it lowercase to improve readability.
13089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13090      # Now convert it back to Unix-stile (cygpath)
13091      input_path=`$CYGPATH -u "$shortmode_path"`
13092      new_path="$input_path"
13093    fi
13094  fi
13095
13096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13097  if test "x$test_cygdrive_prefix" = x; then
13098    # As a simple fix, exclude /usr/bin since it's not a real path.
13099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13101      # a path prefixed by /cygdrive for fixpath to work.
13102      new_path="$CYGWIN_ROOT_PATH$input_path"
13103    fi
13104  fi
13105
13106
13107  if test "x$path" != "x$new_path"; then
13108    BOOT_JDK="$new_path"
13109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13111  fi
13112
13113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13114
13115  path="$BOOT_JDK"
13116  has_colon=`$ECHO $path | $GREP ^.:`
13117  new_path="$path"
13118  if test "x$has_colon" = x; then
13119    # Not in mixed or Windows style, start by that.
13120    new_path=`cmd //c echo $path`
13121  fi
13122
13123
13124  input_path="$new_path"
13125  # Check if we need to convert this using DOS-style short mode. If the path
13126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13127  # take no chances and rewrite it.
13128  # Note: m4 eats our [], so we need to use [ and ] instead.
13129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13130  if test "x$has_forbidden_chars" != x; then
13131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13133  fi
13134
13135
13136  windows_path="$new_path"
13137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13138    unix_path=`$CYGPATH -u "$windows_path"`
13139    new_path="$unix_path"
13140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13142    new_path="$unix_path"
13143  fi
13144
13145  if test "x$path" != "x$new_path"; then
13146    BOOT_JDK="$new_path"
13147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13148$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13149  fi
13150
13151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13153
13154  else
13155    # We're on a posix platform. Hooray! :)
13156    path="$BOOT_JDK"
13157
13158    if test ! -f "$path" && test ! -d "$path"; then
13159      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13160    fi
13161
13162    has_space=`$ECHO "$path" | $GREP " "`
13163    if test "x$has_space" != x; then
13164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13165$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13166      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13167    fi
13168  fi
13169
13170              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13171$as_echo_n "checking for Boot JDK... " >&6; }
13172              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13173$as_echo "$BOOT_JDK" >&6; }
13174              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13175$as_echo_n "checking Boot JDK version... " >&6; }
13176              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13177              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13178$as_echo "$BOOT_JDK_VERSION" >&6; }
13179            fi # end check jdk version
13180          fi # end check rt.jar
13181        fi # end check javac
13182      fi # end check java
13183    fi # end check boot jdk found
13184  fi
13185
13186    done
13187  fi
13188
13189  fi
13190
13191
13192    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13193    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13194      # Do we have a bin/java?
13195      if test ! -x "$BOOT_JDK/bin/java"; then
13196        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13198        BOOT_JDK_FOUND=no
13199      else
13200        # Do we have a bin/javac?
13201        if test ! -x "$BOOT_JDK/bin/javac"; then
13202          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13204          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13205$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13206          BOOT_JDK_FOUND=no
13207        else
13208          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13209          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13210            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13212            BOOT_JDK_FOUND=no
13213          else
13214            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13215            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13216
13217            # Extra M4 quote needed to protect [] in grep expression.
13218            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13219            if test "x$FOUND_VERSION_78" = x; then
13220              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13222              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13223$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13224              BOOT_JDK_FOUND=no
13225            else
13226              # We're done! :-)
13227              BOOT_JDK_FOUND=yes
13228
13229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13230
13231  # Input might be given as Windows format, start by converting to
13232  # unix format.
13233  path="$BOOT_JDK"
13234  new_path=`$CYGPATH -u "$path"`
13235
13236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13239  # "foo.exe" is OK but "foo" is an error.
13240  #
13241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13242  # It is also a way to make sure we got the proper file name for the real test later on.
13243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13244  if test "x$test_shortpath" = x; then
13245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13247    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13248  fi
13249
13250  # Call helper function which possibly converts this using DOS-style short mode.
13251  # If so, the updated path is stored in $new_path.
13252
13253  input_path="$new_path"
13254  # Check if we need to convert this using DOS-style short mode. If the path
13255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13256  # take no chances and rewrite it.
13257  # Note: m4 eats our [], so we need to use [ and ] instead.
13258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13259  if test "x$has_forbidden_chars" != x; then
13260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13264      # Going to short mode and back again did indeed matter. Since short mode is
13265      # case insensitive, let's make it lowercase to improve readability.
13266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13267      # Now convert it back to Unix-stile (cygpath)
13268      input_path=`$CYGPATH -u "$shortmode_path"`
13269      new_path="$input_path"
13270    fi
13271  fi
13272
13273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13274  if test "x$test_cygdrive_prefix" = x; then
13275    # As a simple fix, exclude /usr/bin since it's not a real path.
13276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13278      # a path prefixed by /cygdrive for fixpath to work.
13279      new_path="$CYGWIN_ROOT_PATH$input_path"
13280    fi
13281  fi
13282
13283
13284  if test "x$path" != "x$new_path"; then
13285    BOOT_JDK="$new_path"
13286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13288  fi
13289
13290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13291
13292  path="$BOOT_JDK"
13293  has_colon=`$ECHO $path | $GREP ^.:`
13294  new_path="$path"
13295  if test "x$has_colon" = x; then
13296    # Not in mixed or Windows style, start by that.
13297    new_path=`cmd //c echo $path`
13298  fi
13299
13300
13301  input_path="$new_path"
13302  # Check if we need to convert this using DOS-style short mode. If the path
13303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13304  # take no chances and rewrite it.
13305  # Note: m4 eats our [], so we need to use [ and ] instead.
13306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13307  if test "x$has_forbidden_chars" != x; then
13308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13310  fi
13311
13312
13313  windows_path="$new_path"
13314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13315    unix_path=`$CYGPATH -u "$windows_path"`
13316    new_path="$unix_path"
13317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13319    new_path="$unix_path"
13320  fi
13321
13322  if test "x$path" != "x$new_path"; then
13323    BOOT_JDK="$new_path"
13324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13326  fi
13327
13328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13330
13331  else
13332    # We're on a posix platform. Hooray! :)
13333    path="$BOOT_JDK"
13334
13335    if test ! -f "$path" && test ! -d "$path"; then
13336      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13337    fi
13338
13339    has_space=`$ECHO "$path" | $GREP " "`
13340    if test "x$has_space" != x; then
13341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13342$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13343      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13344    fi
13345  fi
13346
13347              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13348$as_echo_n "checking for Boot JDK... " >&6; }
13349              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13350$as_echo "$BOOT_JDK" >&6; }
13351              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13352$as_echo_n "checking Boot JDK version... " >&6; }
13353              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13354              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13355$as_echo "$BOOT_JDK_VERSION" >&6; }
13356            fi # end check jdk version
13357          fi # end check rt.jar
13358        fi # end check javac
13359      fi # end check java
13360    fi # end check boot jdk found
13361  fi
13362
13363
13364  if test "x$BOOT_JDK_FOUND" = xno; then
13365    # Now execute the test
13366
13367  if test "x$ProgramFiles" != x; then
13368    VIRTUAL_DIR="$ProgramFiles/Java"
13369
13370  windows_path="$VIRTUAL_DIR"
13371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13372    unix_path=`$CYGPATH -u "$windows_path"`
13373    VIRTUAL_DIR="$unix_path"
13374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13376    VIRTUAL_DIR="$unix_path"
13377  fi
13378
13379
13380  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13381  BOOT_JDK_SUFFIX=""
13382  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13383  if test "x$ALL_JDKS_FOUND" != x; then
13384    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13385
13386  if test "x$BOOT_JDK_FOUND" = xno; then
13387    # Now execute the test
13388
13389        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13390        if test -d "$BOOT_JDK"; then
13391          BOOT_JDK_FOUND=maybe
13392          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13393$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13394        fi
13395
13396
13397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13399      # Do we have a bin/java?
13400      if test ! -x "$BOOT_JDK/bin/java"; then
13401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13403        BOOT_JDK_FOUND=no
13404      else
13405        # Do we have a bin/javac?
13406        if test ! -x "$BOOT_JDK/bin/javac"; then
13407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13411          BOOT_JDK_FOUND=no
13412        else
13413          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13414          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13415            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13417            BOOT_JDK_FOUND=no
13418          else
13419            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13420            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13421
13422            # Extra M4 quote needed to protect [] in grep expression.
13423            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13424            if test "x$FOUND_VERSION_78" = x; then
13425              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13427              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13428$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13429              BOOT_JDK_FOUND=no
13430            else
13431              # We're done! :-)
13432              BOOT_JDK_FOUND=yes
13433
13434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13435
13436  # Input might be given as Windows format, start by converting to
13437  # unix format.
13438  path="$BOOT_JDK"
13439  new_path=`$CYGPATH -u "$path"`
13440
13441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13444  # "foo.exe" is OK but "foo" is an error.
13445  #
13446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13447  # It is also a way to make sure we got the proper file name for the real test later on.
13448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13449  if test "x$test_shortpath" = x; then
13450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13453  fi
13454
13455  # Call helper function which possibly converts this using DOS-style short mode.
13456  # If so, the updated path is stored in $new_path.
13457
13458  input_path="$new_path"
13459  # Check if we need to convert this using DOS-style short mode. If the path
13460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13461  # take no chances and rewrite it.
13462  # Note: m4 eats our [], so we need to use [ and ] instead.
13463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13464  if test "x$has_forbidden_chars" != x; then
13465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13469      # Going to short mode and back again did indeed matter. Since short mode is
13470      # case insensitive, let's make it lowercase to improve readability.
13471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13472      # Now convert it back to Unix-stile (cygpath)
13473      input_path=`$CYGPATH -u "$shortmode_path"`
13474      new_path="$input_path"
13475    fi
13476  fi
13477
13478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13479  if test "x$test_cygdrive_prefix" = x; then
13480    # As a simple fix, exclude /usr/bin since it's not a real path.
13481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13483      # a path prefixed by /cygdrive for fixpath to work.
13484      new_path="$CYGWIN_ROOT_PATH$input_path"
13485    fi
13486  fi
13487
13488
13489  if test "x$path" != "x$new_path"; then
13490    BOOT_JDK="$new_path"
13491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13493  fi
13494
13495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13496
13497  path="$BOOT_JDK"
13498  has_colon=`$ECHO $path | $GREP ^.:`
13499  new_path="$path"
13500  if test "x$has_colon" = x; then
13501    # Not in mixed or Windows style, start by that.
13502    new_path=`cmd //c echo $path`
13503  fi
13504
13505
13506  input_path="$new_path"
13507  # Check if we need to convert this using DOS-style short mode. If the path
13508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13509  # take no chances and rewrite it.
13510  # Note: m4 eats our [], so we need to use [ and ] instead.
13511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13512  if test "x$has_forbidden_chars" != x; then
13513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13515  fi
13516
13517
13518  windows_path="$new_path"
13519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13520    unix_path=`$CYGPATH -u "$windows_path"`
13521    new_path="$unix_path"
13522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13524    new_path="$unix_path"
13525  fi
13526
13527  if test "x$path" != "x$new_path"; then
13528    BOOT_JDK="$new_path"
13529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13531  fi
13532
13533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13535
13536  else
13537    # We're on a posix platform. Hooray! :)
13538    path="$BOOT_JDK"
13539
13540    if test ! -f "$path" && test ! -d "$path"; then
13541      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13542    fi
13543
13544    has_space=`$ECHO "$path" | $GREP " "`
13545    if test "x$has_space" != x; then
13546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13548      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13549    fi
13550  fi
13551
13552              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13553$as_echo_n "checking for Boot JDK... " >&6; }
13554              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13555$as_echo "$BOOT_JDK" >&6; }
13556              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13557$as_echo_n "checking Boot JDK version... " >&6; }
13558              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13559              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13560$as_echo "$BOOT_JDK_VERSION" >&6; }
13561            fi # end check jdk version
13562          fi # end check rt.jar
13563        fi # end check javac
13564      fi # end check java
13565    fi # end check boot jdk found
13566  fi
13567
13568    done
13569  fi
13570
13571  fi
13572
13573
13574    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13575    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13576      # Do we have a bin/java?
13577      if test ! -x "$BOOT_JDK/bin/java"; then
13578        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13580        BOOT_JDK_FOUND=no
13581      else
13582        # Do we have a bin/javac?
13583        if test ! -x "$BOOT_JDK/bin/javac"; then
13584          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13586          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13587$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13588          BOOT_JDK_FOUND=no
13589        else
13590          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13591          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13592            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13594            BOOT_JDK_FOUND=no
13595          else
13596            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13598
13599            # Extra M4 quote needed to protect [] in grep expression.
13600            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13601            if test "x$FOUND_VERSION_78" = x; then
13602              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13604              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13605$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13606              BOOT_JDK_FOUND=no
13607            else
13608              # We're done! :-)
13609              BOOT_JDK_FOUND=yes
13610
13611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13612
13613  # Input might be given as Windows format, start by converting to
13614  # unix format.
13615  path="$BOOT_JDK"
13616  new_path=`$CYGPATH -u "$path"`
13617
13618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13621  # "foo.exe" is OK but "foo" is an error.
13622  #
13623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13624  # It is also a way to make sure we got the proper file name for the real test later on.
13625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13626  if test "x$test_shortpath" = x; then
13627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13629    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13630  fi
13631
13632  # Call helper function which possibly converts this using DOS-style short mode.
13633  # If so, the updated path is stored in $new_path.
13634
13635  input_path="$new_path"
13636  # Check if we need to convert this using DOS-style short mode. If the path
13637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13638  # take no chances and rewrite it.
13639  # Note: m4 eats our [], so we need to use [ and ] instead.
13640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13641  if test "x$has_forbidden_chars" != x; then
13642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13646      # Going to short mode and back again did indeed matter. Since short mode is
13647      # case insensitive, let's make it lowercase to improve readability.
13648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13649      # Now convert it back to Unix-stile (cygpath)
13650      input_path=`$CYGPATH -u "$shortmode_path"`
13651      new_path="$input_path"
13652    fi
13653  fi
13654
13655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13656  if test "x$test_cygdrive_prefix" = x; then
13657    # As a simple fix, exclude /usr/bin since it's not a real path.
13658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13660      # a path prefixed by /cygdrive for fixpath to work.
13661      new_path="$CYGWIN_ROOT_PATH$input_path"
13662    fi
13663  fi
13664
13665
13666  if test "x$path" != "x$new_path"; then
13667    BOOT_JDK="$new_path"
13668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13669$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13670  fi
13671
13672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13673
13674  path="$BOOT_JDK"
13675  has_colon=`$ECHO $path | $GREP ^.:`
13676  new_path="$path"
13677  if test "x$has_colon" = x; then
13678    # Not in mixed or Windows style, start by that.
13679    new_path=`cmd //c echo $path`
13680  fi
13681
13682
13683  input_path="$new_path"
13684  # Check if we need to convert this using DOS-style short mode. If the path
13685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13686  # take no chances and rewrite it.
13687  # Note: m4 eats our [], so we need to use [ and ] instead.
13688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13689  if test "x$has_forbidden_chars" != x; then
13690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13692  fi
13693
13694
13695  windows_path="$new_path"
13696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13697    unix_path=`$CYGPATH -u "$windows_path"`
13698    new_path="$unix_path"
13699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13701    new_path="$unix_path"
13702  fi
13703
13704  if test "x$path" != "x$new_path"; then
13705    BOOT_JDK="$new_path"
13706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13708  fi
13709
13710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13712
13713  else
13714    # We're on a posix platform. Hooray! :)
13715    path="$BOOT_JDK"
13716
13717    if test ! -f "$path" && test ! -d "$path"; then
13718      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13719    fi
13720
13721    has_space=`$ECHO "$path" | $GREP " "`
13722    if test "x$has_space" != x; then
13723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13724$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13725      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13726    fi
13727  fi
13728
13729              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13730$as_echo_n "checking for Boot JDK... " >&6; }
13731              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13732$as_echo "$BOOT_JDK" >&6; }
13733              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13734$as_echo_n "checking Boot JDK version... " >&6; }
13735              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13736              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13737$as_echo "$BOOT_JDK_VERSION" >&6; }
13738            fi # end check jdk version
13739          fi # end check rt.jar
13740        fi # end check javac
13741      fi # end check java
13742    fi # end check boot jdk found
13743  fi
13744
13745
13746  if test "x$BOOT_JDK_FOUND" = xno; then
13747    # Now execute the test
13748
13749  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13750  BOOT_JDK_SUFFIX=""
13751  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13752  if test "x$ALL_JDKS_FOUND" != x; then
13753    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13754
13755  if test "x$BOOT_JDK_FOUND" = xno; then
13756    # Now execute the test
13757
13758        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13759        if test -d "$BOOT_JDK"; then
13760          BOOT_JDK_FOUND=maybe
13761          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13762$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13763        fi
13764
13765
13766    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13767    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13768      # Do we have a bin/java?
13769      if test ! -x "$BOOT_JDK/bin/java"; then
13770        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13772        BOOT_JDK_FOUND=no
13773      else
13774        # Do we have a bin/javac?
13775        if test ! -x "$BOOT_JDK/bin/javac"; then
13776          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13778          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13779$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13780          BOOT_JDK_FOUND=no
13781        else
13782          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13783          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13784            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13786            BOOT_JDK_FOUND=no
13787          else
13788            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13789            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13790
13791            # Extra M4 quote needed to protect [] in grep expression.
13792            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13793            if test "x$FOUND_VERSION_78" = x; then
13794              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13796              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13797$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13798              BOOT_JDK_FOUND=no
13799            else
13800              # We're done! :-)
13801              BOOT_JDK_FOUND=yes
13802
13803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13804
13805  # Input might be given as Windows format, start by converting to
13806  # unix format.
13807  path="$BOOT_JDK"
13808  new_path=`$CYGPATH -u "$path"`
13809
13810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13813  # "foo.exe" is OK but "foo" is an error.
13814  #
13815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13816  # It is also a way to make sure we got the proper file name for the real test later on.
13817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13818  if test "x$test_shortpath" = x; then
13819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13821    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13822  fi
13823
13824  # Call helper function which possibly converts this using DOS-style short mode.
13825  # If so, the updated path is stored in $new_path.
13826
13827  input_path="$new_path"
13828  # Check if we need to convert this using DOS-style short mode. If the path
13829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13830  # take no chances and rewrite it.
13831  # Note: m4 eats our [], so we need to use [ and ] instead.
13832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13833  if test "x$has_forbidden_chars" != x; then
13834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13838      # Going to short mode and back again did indeed matter. Since short mode is
13839      # case insensitive, let's make it lowercase to improve readability.
13840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13841      # Now convert it back to Unix-stile (cygpath)
13842      input_path=`$CYGPATH -u "$shortmode_path"`
13843      new_path="$input_path"
13844    fi
13845  fi
13846
13847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13848  if test "x$test_cygdrive_prefix" = x; then
13849    # As a simple fix, exclude /usr/bin since it's not a real path.
13850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13852      # a path prefixed by /cygdrive for fixpath to work.
13853      new_path="$CYGWIN_ROOT_PATH$input_path"
13854    fi
13855  fi
13856
13857
13858  if test "x$path" != "x$new_path"; then
13859    BOOT_JDK="$new_path"
13860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13861$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13862  fi
13863
13864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13865
13866  path="$BOOT_JDK"
13867  has_colon=`$ECHO $path | $GREP ^.:`
13868  new_path="$path"
13869  if test "x$has_colon" = x; then
13870    # Not in mixed or Windows style, start by that.
13871    new_path=`cmd //c echo $path`
13872  fi
13873
13874
13875  input_path="$new_path"
13876  # Check if we need to convert this using DOS-style short mode. If the path
13877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13878  # take no chances and rewrite it.
13879  # Note: m4 eats our [], so we need to use [ and ] instead.
13880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13881  if test "x$has_forbidden_chars" != x; then
13882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13884  fi
13885
13886
13887  windows_path="$new_path"
13888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13889    unix_path=`$CYGPATH -u "$windows_path"`
13890    new_path="$unix_path"
13891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13893    new_path="$unix_path"
13894  fi
13895
13896  if test "x$path" != "x$new_path"; then
13897    BOOT_JDK="$new_path"
13898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13899$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13900  fi
13901
13902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13904
13905  else
13906    # We're on a posix platform. Hooray! :)
13907    path="$BOOT_JDK"
13908
13909    if test ! -f "$path" && test ! -d "$path"; then
13910      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13911    fi
13912
13913    has_space=`$ECHO "$path" | $GREP " "`
13914    if test "x$has_space" != x; then
13915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13917      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13918    fi
13919  fi
13920
13921              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13922$as_echo_n "checking for Boot JDK... " >&6; }
13923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13924$as_echo "$BOOT_JDK" >&6; }
13925              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13926$as_echo_n "checking Boot JDK version... " >&6; }
13927              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13928              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13929$as_echo "$BOOT_JDK_VERSION" >&6; }
13930            fi # end check jdk version
13931          fi # end check rt.jar
13932        fi # end check javac
13933      fi # end check java
13934    fi # end check boot jdk found
13935  fi
13936
13937    done
13938  fi
13939
13940
13941    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13942    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13943      # Do we have a bin/java?
13944      if test ! -x "$BOOT_JDK/bin/java"; then
13945        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13947        BOOT_JDK_FOUND=no
13948      else
13949        # Do we have a bin/javac?
13950        if test ! -x "$BOOT_JDK/bin/javac"; then
13951          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13953          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13954$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13955          BOOT_JDK_FOUND=no
13956        else
13957          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13958          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13959            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13961            BOOT_JDK_FOUND=no
13962          else
13963            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13964            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13965
13966            # Extra M4 quote needed to protect [] in grep expression.
13967            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13968            if test "x$FOUND_VERSION_78" = x; then
13969              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13971              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13972$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13973              BOOT_JDK_FOUND=no
13974            else
13975              # We're done! :-)
13976              BOOT_JDK_FOUND=yes
13977
13978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13979
13980  # Input might be given as Windows format, start by converting to
13981  # unix format.
13982  path="$BOOT_JDK"
13983  new_path=`$CYGPATH -u "$path"`
13984
13985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13988  # "foo.exe" is OK but "foo" is an error.
13989  #
13990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13991  # It is also a way to make sure we got the proper file name for the real test later on.
13992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13993  if test "x$test_shortpath" = x; then
13994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13995$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13996    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13997  fi
13998
13999  # Call helper function which possibly converts this using DOS-style short mode.
14000  # If so, the updated path is stored in $new_path.
14001
14002  input_path="$new_path"
14003  # Check if we need to convert this using DOS-style short mode. If the path
14004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14005  # take no chances and rewrite it.
14006  # Note: m4 eats our [], so we need to use [ and ] instead.
14007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14008  if test "x$has_forbidden_chars" != x; then
14009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14013      # Going to short mode and back again did indeed matter. Since short mode is
14014      # case insensitive, let's make it lowercase to improve readability.
14015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14016      # Now convert it back to Unix-stile (cygpath)
14017      input_path=`$CYGPATH -u "$shortmode_path"`
14018      new_path="$input_path"
14019    fi
14020  fi
14021
14022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14023  if test "x$test_cygdrive_prefix" = x; then
14024    # As a simple fix, exclude /usr/bin since it's not a real path.
14025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14027      # a path prefixed by /cygdrive for fixpath to work.
14028      new_path="$CYGWIN_ROOT_PATH$input_path"
14029    fi
14030  fi
14031
14032
14033  if test "x$path" != "x$new_path"; then
14034    BOOT_JDK="$new_path"
14035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14037  fi
14038
14039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14040
14041  path="$BOOT_JDK"
14042  has_colon=`$ECHO $path | $GREP ^.:`
14043  new_path="$path"
14044  if test "x$has_colon" = x; then
14045    # Not in mixed or Windows style, start by that.
14046    new_path=`cmd //c echo $path`
14047  fi
14048
14049
14050  input_path="$new_path"
14051  # Check if we need to convert this using DOS-style short mode. If the path
14052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14053  # take no chances and rewrite it.
14054  # Note: m4 eats our [], so we need to use [ and ] instead.
14055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14056  if test "x$has_forbidden_chars" != x; then
14057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14059  fi
14060
14061
14062  windows_path="$new_path"
14063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14064    unix_path=`$CYGPATH -u "$windows_path"`
14065    new_path="$unix_path"
14066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14068    new_path="$unix_path"
14069  fi
14070
14071  if test "x$path" != "x$new_path"; then
14072    BOOT_JDK="$new_path"
14073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14075  fi
14076
14077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14079
14080  else
14081    # We're on a posix platform. Hooray! :)
14082    path="$BOOT_JDK"
14083
14084    if test ! -f "$path" && test ! -d "$path"; then
14085      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14086    fi
14087
14088    has_space=`$ECHO "$path" | $GREP " "`
14089    if test "x$has_space" != x; then
14090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14092      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14093    fi
14094  fi
14095
14096              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14097$as_echo_n "checking for Boot JDK... " >&6; }
14098              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14099$as_echo "$BOOT_JDK" >&6; }
14100              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14101$as_echo_n "checking Boot JDK version... " >&6; }
14102              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14103              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14104$as_echo "$BOOT_JDK_VERSION" >&6; }
14105            fi # end check jdk version
14106          fi # end check rt.jar
14107        fi # end check javac
14108      fi # end check java
14109    fi # end check boot jdk found
14110  fi
14111
14112  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14113
14114  if test "x$BOOT_JDK_FOUND" = xno; then
14115    # Now execute the test
14116
14117  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14118  BOOT_JDK_SUFFIX="/Contents/Home"
14119  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14120  if test "x$ALL_JDKS_FOUND" != x; then
14121    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14122
14123  if test "x$BOOT_JDK_FOUND" = xno; then
14124    # Now execute the test
14125
14126        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14127        if test -d "$BOOT_JDK"; then
14128          BOOT_JDK_FOUND=maybe
14129          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14130$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14131        fi
14132
14133
14134    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14135    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14136      # Do we have a bin/java?
14137      if test ! -x "$BOOT_JDK/bin/java"; then
14138        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14140        BOOT_JDK_FOUND=no
14141      else
14142        # Do we have a bin/javac?
14143        if test ! -x "$BOOT_JDK/bin/javac"; then
14144          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14146          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14147$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14148          BOOT_JDK_FOUND=no
14149        else
14150          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14151          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14152            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14154            BOOT_JDK_FOUND=no
14155          else
14156            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14158
14159            # Extra M4 quote needed to protect [] in grep expression.
14160            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14161            if test "x$FOUND_VERSION_78" = x; then
14162              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14164              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14165$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14166              BOOT_JDK_FOUND=no
14167            else
14168              # We're done! :-)
14169              BOOT_JDK_FOUND=yes
14170
14171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14172
14173  # Input might be given as Windows format, start by converting to
14174  # unix format.
14175  path="$BOOT_JDK"
14176  new_path=`$CYGPATH -u "$path"`
14177
14178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14181  # "foo.exe" is OK but "foo" is an error.
14182  #
14183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14184  # It is also a way to make sure we got the proper file name for the real test later on.
14185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14186  if test "x$test_shortpath" = x; then
14187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14189    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14190  fi
14191
14192  # Call helper function which possibly converts this using DOS-style short mode.
14193  # If so, the updated path is stored in $new_path.
14194
14195  input_path="$new_path"
14196  # Check if we need to convert this using DOS-style short mode. If the path
14197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14198  # take no chances and rewrite it.
14199  # Note: m4 eats our [], so we need to use [ and ] instead.
14200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14201  if test "x$has_forbidden_chars" != x; then
14202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14206      # Going to short mode and back again did indeed matter. Since short mode is
14207      # case insensitive, let's make it lowercase to improve readability.
14208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14209      # Now convert it back to Unix-stile (cygpath)
14210      input_path=`$CYGPATH -u "$shortmode_path"`
14211      new_path="$input_path"
14212    fi
14213  fi
14214
14215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14216  if test "x$test_cygdrive_prefix" = x; then
14217    # As a simple fix, exclude /usr/bin since it's not a real path.
14218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14220      # a path prefixed by /cygdrive for fixpath to work.
14221      new_path="$CYGWIN_ROOT_PATH$input_path"
14222    fi
14223  fi
14224
14225
14226  if test "x$path" != "x$new_path"; then
14227    BOOT_JDK="$new_path"
14228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14230  fi
14231
14232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14233
14234  path="$BOOT_JDK"
14235  has_colon=`$ECHO $path | $GREP ^.:`
14236  new_path="$path"
14237  if test "x$has_colon" = x; then
14238    # Not in mixed or Windows style, start by that.
14239    new_path=`cmd //c echo $path`
14240  fi
14241
14242
14243  input_path="$new_path"
14244  # Check if we need to convert this using DOS-style short mode. If the path
14245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14246  # take no chances and rewrite it.
14247  # Note: m4 eats our [], so we need to use [ and ] instead.
14248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14249  if test "x$has_forbidden_chars" != x; then
14250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14252  fi
14253
14254
14255  windows_path="$new_path"
14256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14257    unix_path=`$CYGPATH -u "$windows_path"`
14258    new_path="$unix_path"
14259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14261    new_path="$unix_path"
14262  fi
14263
14264  if test "x$path" != "x$new_path"; then
14265    BOOT_JDK="$new_path"
14266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14268  fi
14269
14270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14272
14273  else
14274    # We're on a posix platform. Hooray! :)
14275    path="$BOOT_JDK"
14276
14277    if test ! -f "$path" && test ! -d "$path"; then
14278      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14279    fi
14280
14281    has_space=`$ECHO "$path" | $GREP " "`
14282    if test "x$has_space" != x; then
14283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14284$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14285      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14286    fi
14287  fi
14288
14289              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14290$as_echo_n "checking for Boot JDK... " >&6; }
14291              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14292$as_echo "$BOOT_JDK" >&6; }
14293              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14294$as_echo_n "checking Boot JDK version... " >&6; }
14295              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14296              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14297$as_echo "$BOOT_JDK_VERSION" >&6; }
14298            fi # end check jdk version
14299          fi # end check rt.jar
14300        fi # end check javac
14301      fi # end check java
14302    fi # end check boot jdk found
14303  fi
14304
14305    done
14306  fi
14307
14308
14309    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14310    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14311      # Do we have a bin/java?
14312      if test ! -x "$BOOT_JDK/bin/java"; then
14313        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14315        BOOT_JDK_FOUND=no
14316      else
14317        # Do we have a bin/javac?
14318        if test ! -x "$BOOT_JDK/bin/javac"; then
14319          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14321          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14322$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14323          BOOT_JDK_FOUND=no
14324        else
14325          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14326          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14327            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14329            BOOT_JDK_FOUND=no
14330          else
14331            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14332            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14333
14334            # Extra M4 quote needed to protect [] in grep expression.
14335            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14336            if test "x$FOUND_VERSION_78" = x; then
14337              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14339              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14340$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14341              BOOT_JDK_FOUND=no
14342            else
14343              # We're done! :-)
14344              BOOT_JDK_FOUND=yes
14345
14346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14347
14348  # Input might be given as Windows format, start by converting to
14349  # unix format.
14350  path="$BOOT_JDK"
14351  new_path=`$CYGPATH -u "$path"`
14352
14353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14356  # "foo.exe" is OK but "foo" is an error.
14357  #
14358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14359  # It is also a way to make sure we got the proper file name for the real test later on.
14360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14361  if test "x$test_shortpath" = x; then
14362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14364    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14365  fi
14366
14367  # Call helper function which possibly converts this using DOS-style short mode.
14368  # If so, the updated path is stored in $new_path.
14369
14370  input_path="$new_path"
14371  # Check if we need to convert this using DOS-style short mode. If the path
14372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14373  # take no chances and rewrite it.
14374  # Note: m4 eats our [], so we need to use [ and ] instead.
14375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14376  if test "x$has_forbidden_chars" != x; then
14377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14381      # Going to short mode and back again did indeed matter. Since short mode is
14382      # case insensitive, let's make it lowercase to improve readability.
14383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14384      # Now convert it back to Unix-stile (cygpath)
14385      input_path=`$CYGPATH -u "$shortmode_path"`
14386      new_path="$input_path"
14387    fi
14388  fi
14389
14390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14391  if test "x$test_cygdrive_prefix" = x; then
14392    # As a simple fix, exclude /usr/bin since it's not a real path.
14393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14395      # a path prefixed by /cygdrive for fixpath to work.
14396      new_path="$CYGWIN_ROOT_PATH$input_path"
14397    fi
14398  fi
14399
14400
14401  if test "x$path" != "x$new_path"; then
14402    BOOT_JDK="$new_path"
14403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14405  fi
14406
14407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14408
14409  path="$BOOT_JDK"
14410  has_colon=`$ECHO $path | $GREP ^.:`
14411  new_path="$path"
14412  if test "x$has_colon" = x; then
14413    # Not in mixed or Windows style, start by that.
14414    new_path=`cmd //c echo $path`
14415  fi
14416
14417
14418  input_path="$new_path"
14419  # Check if we need to convert this using DOS-style short mode. If the path
14420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14421  # take no chances and rewrite it.
14422  # Note: m4 eats our [], so we need to use [ and ] instead.
14423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14424  if test "x$has_forbidden_chars" != x; then
14425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14427  fi
14428
14429
14430  windows_path="$new_path"
14431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14432    unix_path=`$CYGPATH -u "$windows_path"`
14433    new_path="$unix_path"
14434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14436    new_path="$unix_path"
14437  fi
14438
14439  if test "x$path" != "x$new_path"; then
14440    BOOT_JDK="$new_path"
14441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14443  fi
14444
14445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14447
14448  else
14449    # We're on a posix platform. Hooray! :)
14450    path="$BOOT_JDK"
14451
14452    if test ! -f "$path" && test ! -d "$path"; then
14453      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14454    fi
14455
14456    has_space=`$ECHO "$path" | $GREP " "`
14457    if test "x$has_space" != x; then
14458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14460      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14461    fi
14462  fi
14463
14464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14465$as_echo_n "checking for Boot JDK... " >&6; }
14466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14467$as_echo "$BOOT_JDK" >&6; }
14468              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14469$as_echo_n "checking Boot JDK version... " >&6; }
14470              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14471              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14472$as_echo "$BOOT_JDK_VERSION" >&6; }
14473            fi # end check jdk version
14474          fi # end check rt.jar
14475        fi # end check javac
14476      fi # end check java
14477    fi # end check boot jdk found
14478  fi
14479
14480
14481  if test "x$BOOT_JDK_FOUND" = xno; then
14482    # Now execute the test
14483
14484  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14485  BOOT_JDK_SUFFIX="/Contents/Home"
14486  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14487  if test "x$ALL_JDKS_FOUND" != x; then
14488    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14489
14490  if test "x$BOOT_JDK_FOUND" = xno; then
14491    # Now execute the test
14492
14493        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14494        if test -d "$BOOT_JDK"; then
14495          BOOT_JDK_FOUND=maybe
14496          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14497$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14498        fi
14499
14500
14501    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14502    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14503      # Do we have a bin/java?
14504      if test ! -x "$BOOT_JDK/bin/java"; then
14505        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14507        BOOT_JDK_FOUND=no
14508      else
14509        # Do we have a bin/javac?
14510        if test ! -x "$BOOT_JDK/bin/javac"; then
14511          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14513          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14514$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14515          BOOT_JDK_FOUND=no
14516        else
14517          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14518          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14519            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14521            BOOT_JDK_FOUND=no
14522          else
14523            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14524            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14525
14526            # Extra M4 quote needed to protect [] in grep expression.
14527            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14528            if test "x$FOUND_VERSION_78" = x; then
14529              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14531              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14532$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14533              BOOT_JDK_FOUND=no
14534            else
14535              # We're done! :-)
14536              BOOT_JDK_FOUND=yes
14537
14538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14539
14540  # Input might be given as Windows format, start by converting to
14541  # unix format.
14542  path="$BOOT_JDK"
14543  new_path=`$CYGPATH -u "$path"`
14544
14545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14548  # "foo.exe" is OK but "foo" is an error.
14549  #
14550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14551  # It is also a way to make sure we got the proper file name for the real test later on.
14552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14553  if test "x$test_shortpath" = x; then
14554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14556    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14557  fi
14558
14559  # Call helper function which possibly converts this using DOS-style short mode.
14560  # If so, the updated path is stored in $new_path.
14561
14562  input_path="$new_path"
14563  # Check if we need to convert this using DOS-style short mode. If the path
14564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14565  # take no chances and rewrite it.
14566  # Note: m4 eats our [], so we need to use [ and ] instead.
14567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14568  if test "x$has_forbidden_chars" != x; then
14569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14573      # Going to short mode and back again did indeed matter. Since short mode is
14574      # case insensitive, let's make it lowercase to improve readability.
14575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14576      # Now convert it back to Unix-stile (cygpath)
14577      input_path=`$CYGPATH -u "$shortmode_path"`
14578      new_path="$input_path"
14579    fi
14580  fi
14581
14582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14583  if test "x$test_cygdrive_prefix" = x; then
14584    # As a simple fix, exclude /usr/bin since it's not a real path.
14585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14587      # a path prefixed by /cygdrive for fixpath to work.
14588      new_path="$CYGWIN_ROOT_PATH$input_path"
14589    fi
14590  fi
14591
14592
14593  if test "x$path" != "x$new_path"; then
14594    BOOT_JDK="$new_path"
14595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14596$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14597  fi
14598
14599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14600
14601  path="$BOOT_JDK"
14602  has_colon=`$ECHO $path | $GREP ^.:`
14603  new_path="$path"
14604  if test "x$has_colon" = x; then
14605    # Not in mixed or Windows style, start by that.
14606    new_path=`cmd //c echo $path`
14607  fi
14608
14609
14610  input_path="$new_path"
14611  # Check if we need to convert this using DOS-style short mode. If the path
14612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14613  # take no chances and rewrite it.
14614  # Note: m4 eats our [], so we need to use [ and ] instead.
14615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14616  if test "x$has_forbidden_chars" != x; then
14617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14619  fi
14620
14621
14622  windows_path="$new_path"
14623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14624    unix_path=`$CYGPATH -u "$windows_path"`
14625    new_path="$unix_path"
14626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14628    new_path="$unix_path"
14629  fi
14630
14631  if test "x$path" != "x$new_path"; then
14632    BOOT_JDK="$new_path"
14633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14634$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14635  fi
14636
14637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14639
14640  else
14641    # We're on a posix platform. Hooray! :)
14642    path="$BOOT_JDK"
14643
14644    if test ! -f "$path" && test ! -d "$path"; then
14645      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14646    fi
14647
14648    has_space=`$ECHO "$path" | $GREP " "`
14649    if test "x$has_space" != x; then
14650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14652      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14653    fi
14654  fi
14655
14656              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14657$as_echo_n "checking for Boot JDK... " >&6; }
14658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14659$as_echo "$BOOT_JDK" >&6; }
14660              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14661$as_echo_n "checking Boot JDK version... " >&6; }
14662              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14663              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14664$as_echo "$BOOT_JDK_VERSION" >&6; }
14665            fi # end check jdk version
14666          fi # end check rt.jar
14667        fi # end check javac
14668      fi # end check java
14669    fi # end check boot jdk found
14670  fi
14671
14672    done
14673  fi
14674
14675
14676    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14677    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14678      # Do we have a bin/java?
14679      if test ! -x "$BOOT_JDK/bin/java"; then
14680        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14682        BOOT_JDK_FOUND=no
14683      else
14684        # Do we have a bin/javac?
14685        if test ! -x "$BOOT_JDK/bin/javac"; then
14686          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14688          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14689$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14690          BOOT_JDK_FOUND=no
14691        else
14692          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14693          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14694            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14696            BOOT_JDK_FOUND=no
14697          else
14698            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14699            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14700
14701            # Extra M4 quote needed to protect [] in grep expression.
14702            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14703            if test "x$FOUND_VERSION_78" = x; then
14704              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14706              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14707$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14708              BOOT_JDK_FOUND=no
14709            else
14710              # We're done! :-)
14711              BOOT_JDK_FOUND=yes
14712
14713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14714
14715  # Input might be given as Windows format, start by converting to
14716  # unix format.
14717  path="$BOOT_JDK"
14718  new_path=`$CYGPATH -u "$path"`
14719
14720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14723  # "foo.exe" is OK but "foo" is an error.
14724  #
14725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14726  # It is also a way to make sure we got the proper file name for the real test later on.
14727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14728  if test "x$test_shortpath" = x; then
14729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14731    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14732  fi
14733
14734  # Call helper function which possibly converts this using DOS-style short mode.
14735  # If so, the updated path is stored in $new_path.
14736
14737  input_path="$new_path"
14738  # Check if we need to convert this using DOS-style short mode. If the path
14739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14740  # take no chances and rewrite it.
14741  # Note: m4 eats our [], so we need to use [ and ] instead.
14742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14743  if test "x$has_forbidden_chars" != x; then
14744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14748      # Going to short mode and back again did indeed matter. Since short mode is
14749      # case insensitive, let's make it lowercase to improve readability.
14750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14751      # Now convert it back to Unix-stile (cygpath)
14752      input_path=`$CYGPATH -u "$shortmode_path"`
14753      new_path="$input_path"
14754    fi
14755  fi
14756
14757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14758  if test "x$test_cygdrive_prefix" = x; then
14759    # As a simple fix, exclude /usr/bin since it's not a real path.
14760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14762      # a path prefixed by /cygdrive for fixpath to work.
14763      new_path="$CYGWIN_ROOT_PATH$input_path"
14764    fi
14765  fi
14766
14767
14768  if test "x$path" != "x$new_path"; then
14769    BOOT_JDK="$new_path"
14770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14772  fi
14773
14774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14775
14776  path="$BOOT_JDK"
14777  has_colon=`$ECHO $path | $GREP ^.:`
14778  new_path="$path"
14779  if test "x$has_colon" = x; then
14780    # Not in mixed or Windows style, start by that.
14781    new_path=`cmd //c echo $path`
14782  fi
14783
14784
14785  input_path="$new_path"
14786  # Check if we need to convert this using DOS-style short mode. If the path
14787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14788  # take no chances and rewrite it.
14789  # Note: m4 eats our [], so we need to use [ and ] instead.
14790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14791  if test "x$has_forbidden_chars" != x; then
14792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14794  fi
14795
14796
14797  windows_path="$new_path"
14798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14799    unix_path=`$CYGPATH -u "$windows_path"`
14800    new_path="$unix_path"
14801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14803    new_path="$unix_path"
14804  fi
14805
14806  if test "x$path" != "x$new_path"; then
14807    BOOT_JDK="$new_path"
14808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14810  fi
14811
14812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14814
14815  else
14816    # We're on a posix platform. Hooray! :)
14817    path="$BOOT_JDK"
14818
14819    if test ! -f "$path" && test ! -d "$path"; then
14820      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14821    fi
14822
14823    has_space=`$ECHO "$path" | $GREP " "`
14824    if test "x$has_space" != x; then
14825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14827      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14828    fi
14829  fi
14830
14831              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14832$as_echo_n "checking for Boot JDK... " >&6; }
14833              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14834$as_echo "$BOOT_JDK" >&6; }
14835              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14836$as_echo_n "checking Boot JDK version... " >&6; }
14837              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14838              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14839$as_echo "$BOOT_JDK_VERSION" >&6; }
14840            fi # end check jdk version
14841          fi # end check rt.jar
14842        fi # end check javac
14843      fi # end check java
14844    fi # end check boot jdk found
14845  fi
14846
14847  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14848
14849  if test "x$BOOT_JDK_FOUND" = xno; then
14850    # Now execute the test
14851
14852  BOOT_JDK_PREFIX="/usr/lib/jvm"
14853  BOOT_JDK_SUFFIX=""
14854  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14855  if test "x$ALL_JDKS_FOUND" != x; then
14856    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14857
14858  if test "x$BOOT_JDK_FOUND" = xno; then
14859    # Now execute the test
14860
14861        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14862        if test -d "$BOOT_JDK"; then
14863          BOOT_JDK_FOUND=maybe
14864          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14865$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14866        fi
14867
14868
14869    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14870    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14871      # Do we have a bin/java?
14872      if test ! -x "$BOOT_JDK/bin/java"; then
14873        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14875        BOOT_JDK_FOUND=no
14876      else
14877        # Do we have a bin/javac?
14878        if test ! -x "$BOOT_JDK/bin/javac"; then
14879          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14882$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14883          BOOT_JDK_FOUND=no
14884        else
14885          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14886          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14887            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14889            BOOT_JDK_FOUND=no
14890          else
14891            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14892            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14893
14894            # Extra M4 quote needed to protect [] in grep expression.
14895            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14896            if test "x$FOUND_VERSION_78" = x; then
14897              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14899              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14900$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14901              BOOT_JDK_FOUND=no
14902            else
14903              # We're done! :-)
14904              BOOT_JDK_FOUND=yes
14905
14906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14907
14908  # Input might be given as Windows format, start by converting to
14909  # unix format.
14910  path="$BOOT_JDK"
14911  new_path=`$CYGPATH -u "$path"`
14912
14913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14916  # "foo.exe" is OK but "foo" is an error.
14917  #
14918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14919  # It is also a way to make sure we got the proper file name for the real test later on.
14920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14921  if test "x$test_shortpath" = x; then
14922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14923$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14924    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14925  fi
14926
14927  # Call helper function which possibly converts this using DOS-style short mode.
14928  # If so, the updated path is stored in $new_path.
14929
14930  input_path="$new_path"
14931  # Check if we need to convert this using DOS-style short mode. If the path
14932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14933  # take no chances and rewrite it.
14934  # Note: m4 eats our [], so we need to use [ and ] instead.
14935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14936  if test "x$has_forbidden_chars" != x; then
14937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14941      # Going to short mode and back again did indeed matter. Since short mode is
14942      # case insensitive, let's make it lowercase to improve readability.
14943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14944      # Now convert it back to Unix-stile (cygpath)
14945      input_path=`$CYGPATH -u "$shortmode_path"`
14946      new_path="$input_path"
14947    fi
14948  fi
14949
14950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14951  if test "x$test_cygdrive_prefix" = x; then
14952    # As a simple fix, exclude /usr/bin since it's not a real path.
14953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14955      # a path prefixed by /cygdrive for fixpath to work.
14956      new_path="$CYGWIN_ROOT_PATH$input_path"
14957    fi
14958  fi
14959
14960
14961  if test "x$path" != "x$new_path"; then
14962    BOOT_JDK="$new_path"
14963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14965  fi
14966
14967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14968
14969  path="$BOOT_JDK"
14970  has_colon=`$ECHO $path | $GREP ^.:`
14971  new_path="$path"
14972  if test "x$has_colon" = x; then
14973    # Not in mixed or Windows style, start by that.
14974    new_path=`cmd //c echo $path`
14975  fi
14976
14977
14978  input_path="$new_path"
14979  # Check if we need to convert this using DOS-style short mode. If the path
14980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14981  # take no chances and rewrite it.
14982  # Note: m4 eats our [], so we need to use [ and ] instead.
14983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14984  if test "x$has_forbidden_chars" != x; then
14985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14987  fi
14988
14989
14990  windows_path="$new_path"
14991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14992    unix_path=`$CYGPATH -u "$windows_path"`
14993    new_path="$unix_path"
14994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14996    new_path="$unix_path"
14997  fi
14998
14999  if test "x$path" != "x$new_path"; then
15000    BOOT_JDK="$new_path"
15001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15003  fi
15004
15005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15007
15008  else
15009    # We're on a posix platform. Hooray! :)
15010    path="$BOOT_JDK"
15011
15012    if test ! -f "$path" && test ! -d "$path"; then
15013      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15014    fi
15015
15016    has_space=`$ECHO "$path" | $GREP " "`
15017    if test "x$has_space" != x; then
15018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15020      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15021    fi
15022  fi
15023
15024              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15025$as_echo_n "checking for Boot JDK... " >&6; }
15026              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15027$as_echo "$BOOT_JDK" >&6; }
15028              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15029$as_echo_n "checking Boot JDK version... " >&6; }
15030              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15031              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15032$as_echo "$BOOT_JDK_VERSION" >&6; }
15033            fi # end check jdk version
15034          fi # end check rt.jar
15035        fi # end check javac
15036      fi # end check java
15037    fi # end check boot jdk found
15038  fi
15039
15040    done
15041  fi
15042
15043
15044    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15045    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15046      # Do we have a bin/java?
15047      if test ! -x "$BOOT_JDK/bin/java"; then
15048        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15050        BOOT_JDK_FOUND=no
15051      else
15052        # Do we have a bin/javac?
15053        if test ! -x "$BOOT_JDK/bin/javac"; then
15054          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15056          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15057$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15058          BOOT_JDK_FOUND=no
15059        else
15060          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15061          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15062            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15064            BOOT_JDK_FOUND=no
15065          else
15066            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15067            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15068
15069            # Extra M4 quote needed to protect [] in grep expression.
15070            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15071            if test "x$FOUND_VERSION_78" = x; then
15072              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15074              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15075$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15076              BOOT_JDK_FOUND=no
15077            else
15078              # We're done! :-)
15079              BOOT_JDK_FOUND=yes
15080
15081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15082
15083  # Input might be given as Windows format, start by converting to
15084  # unix format.
15085  path="$BOOT_JDK"
15086  new_path=`$CYGPATH -u "$path"`
15087
15088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15091  # "foo.exe" is OK but "foo" is an error.
15092  #
15093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15094  # It is also a way to make sure we got the proper file name for the real test later on.
15095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15096  if test "x$test_shortpath" = x; then
15097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15099    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15100  fi
15101
15102  # Call helper function which possibly converts this using DOS-style short mode.
15103  # If so, the updated path is stored in $new_path.
15104
15105  input_path="$new_path"
15106  # Check if we need to convert this using DOS-style short mode. If the path
15107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15108  # take no chances and rewrite it.
15109  # Note: m4 eats our [], so we need to use [ and ] instead.
15110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15111  if test "x$has_forbidden_chars" != x; then
15112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15116      # Going to short mode and back again did indeed matter. Since short mode is
15117      # case insensitive, let's make it lowercase to improve readability.
15118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15119      # Now convert it back to Unix-stile (cygpath)
15120      input_path=`$CYGPATH -u "$shortmode_path"`
15121      new_path="$input_path"
15122    fi
15123  fi
15124
15125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15126  if test "x$test_cygdrive_prefix" = x; then
15127    # As a simple fix, exclude /usr/bin since it's not a real path.
15128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15130      # a path prefixed by /cygdrive for fixpath to work.
15131      new_path="$CYGWIN_ROOT_PATH$input_path"
15132    fi
15133  fi
15134
15135
15136  if test "x$path" != "x$new_path"; then
15137    BOOT_JDK="$new_path"
15138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15140  fi
15141
15142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15143
15144  path="$BOOT_JDK"
15145  has_colon=`$ECHO $path | $GREP ^.:`
15146  new_path="$path"
15147  if test "x$has_colon" = x; then
15148    # Not in mixed or Windows style, start by that.
15149    new_path=`cmd //c echo $path`
15150  fi
15151
15152
15153  input_path="$new_path"
15154  # Check if we need to convert this using DOS-style short mode. If the path
15155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15156  # take no chances and rewrite it.
15157  # Note: m4 eats our [], so we need to use [ and ] instead.
15158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15159  if test "x$has_forbidden_chars" != x; then
15160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15162  fi
15163
15164
15165  windows_path="$new_path"
15166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15167    unix_path=`$CYGPATH -u "$windows_path"`
15168    new_path="$unix_path"
15169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15171    new_path="$unix_path"
15172  fi
15173
15174  if test "x$path" != "x$new_path"; then
15175    BOOT_JDK="$new_path"
15176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15178  fi
15179
15180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15182
15183  else
15184    # We're on a posix platform. Hooray! :)
15185    path="$BOOT_JDK"
15186
15187    if test ! -f "$path" && test ! -d "$path"; then
15188      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15189    fi
15190
15191    has_space=`$ECHO "$path" | $GREP " "`
15192    if test "x$has_space" != x; then
15193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15194$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15195      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15196    fi
15197  fi
15198
15199              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15200$as_echo_n "checking for Boot JDK... " >&6; }
15201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15202$as_echo "$BOOT_JDK" >&6; }
15203              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15204$as_echo_n "checking Boot JDK version... " >&6; }
15205              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15206              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15207$as_echo "$BOOT_JDK_VERSION" >&6; }
15208            fi # end check jdk version
15209          fi # end check rt.jar
15210        fi # end check javac
15211      fi # end check java
15212    fi # end check boot jdk found
15213  fi
15214
15215  fi
15216
15217
15218    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15219    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15220      # Do we have a bin/java?
15221      if test ! -x "$BOOT_JDK/bin/java"; then
15222        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15224        BOOT_JDK_FOUND=no
15225      else
15226        # Do we have a bin/javac?
15227        if test ! -x "$BOOT_JDK/bin/javac"; then
15228          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15230          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15231$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15232          BOOT_JDK_FOUND=no
15233        else
15234          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15235          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15236            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15238            BOOT_JDK_FOUND=no
15239          else
15240            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15242
15243            # Extra M4 quote needed to protect [] in grep expression.
15244            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15245            if test "x$FOUND_VERSION_78" = x; then
15246              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15248              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15249$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15250              BOOT_JDK_FOUND=no
15251            else
15252              # We're done! :-)
15253              BOOT_JDK_FOUND=yes
15254
15255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15256
15257  # Input might be given as Windows format, start by converting to
15258  # unix format.
15259  path="$BOOT_JDK"
15260  new_path=`$CYGPATH -u "$path"`
15261
15262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15265  # "foo.exe" is OK but "foo" is an error.
15266  #
15267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15268  # It is also a way to make sure we got the proper file name for the real test later on.
15269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15270  if test "x$test_shortpath" = x; then
15271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15273    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15274  fi
15275
15276  # Call helper function which possibly converts this using DOS-style short mode.
15277  # If so, the updated path is stored in $new_path.
15278
15279  input_path="$new_path"
15280  # Check if we need to convert this using DOS-style short mode. If the path
15281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15282  # take no chances and rewrite it.
15283  # Note: m4 eats our [], so we need to use [ and ] instead.
15284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15285  if test "x$has_forbidden_chars" != x; then
15286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15290      # Going to short mode and back again did indeed matter. Since short mode is
15291      # case insensitive, let's make it lowercase to improve readability.
15292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15293      # Now convert it back to Unix-stile (cygpath)
15294      input_path=`$CYGPATH -u "$shortmode_path"`
15295      new_path="$input_path"
15296    fi
15297  fi
15298
15299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15300  if test "x$test_cygdrive_prefix" = x; then
15301    # As a simple fix, exclude /usr/bin since it's not a real path.
15302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15304      # a path prefixed by /cygdrive for fixpath to work.
15305      new_path="$CYGWIN_ROOT_PATH$input_path"
15306    fi
15307  fi
15308
15309
15310  if test "x$path" != "x$new_path"; then
15311    BOOT_JDK="$new_path"
15312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15314  fi
15315
15316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15317
15318  path="$BOOT_JDK"
15319  has_colon=`$ECHO $path | $GREP ^.:`
15320  new_path="$path"
15321  if test "x$has_colon" = x; then
15322    # Not in mixed or Windows style, start by that.
15323    new_path=`cmd //c echo $path`
15324  fi
15325
15326
15327  input_path="$new_path"
15328  # Check if we need to convert this using DOS-style short mode. If the path
15329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15330  # take no chances and rewrite it.
15331  # Note: m4 eats our [], so we need to use [ and ] instead.
15332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15333  if test "x$has_forbidden_chars" != x; then
15334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15336  fi
15337
15338
15339  windows_path="$new_path"
15340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15341    unix_path=`$CYGPATH -u "$windows_path"`
15342    new_path="$unix_path"
15343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15345    new_path="$unix_path"
15346  fi
15347
15348  if test "x$path" != "x$new_path"; then
15349    BOOT_JDK="$new_path"
15350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15352  fi
15353
15354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15356
15357  else
15358    # We're on a posix platform. Hooray! :)
15359    path="$BOOT_JDK"
15360
15361    if test ! -f "$path" && test ! -d "$path"; then
15362      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15363    fi
15364
15365    has_space=`$ECHO "$path" | $GREP " "`
15366    if test "x$has_space" != x; then
15367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15369      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15370    fi
15371  fi
15372
15373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15374$as_echo_n "checking for Boot JDK... " >&6; }
15375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15376$as_echo "$BOOT_JDK" >&6; }
15377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15378$as_echo_n "checking Boot JDK version... " >&6; }
15379              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15380              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15381$as_echo "$BOOT_JDK_VERSION" >&6; }
15382            fi # end check jdk version
15383          fi # end check rt.jar
15384        fi # end check javac
15385      fi # end check java
15386    fi # end check boot jdk found
15387  fi
15388
15389
15390# If we haven't found anything yet, we've truly lost. Give up.
15391if test "x$BOOT_JDK_FOUND" = xno; then
15392
15393    # Print a helpful message on how to acquire the necessary build dependency.
15394    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15395    MISSING_DEPENDENCY=openjdk
15396    PKGHANDLER_COMMAND=
15397
15398    case $PKGHANDLER in
15399	apt-get)
15400                apt_help     $MISSING_DEPENDENCY ;;
15401    yum)
15402                yum_help     $MISSING_DEPENDENCY ;;
15403	port)
15404                port_help    $MISSING_DEPENDENCY ;;
15405	pkgutil)
15406                pkgutil_help $MISSING_DEPENDENCY ;;
15407	pkgadd)
15408                pkgadd_help  $MISSING_DEPENDENCY ;;
15409    * )
15410      break ;;
15411    esac
15412
15413    if test "x$PKGHANDLER_COMMAND" != x; then
15414        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15415    fi
15416
15417  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15418$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15419  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15420$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15421  as_fn_error $? "Cannot continue" "$LINENO" 5
15422fi
15423
15424# Setup proper paths for what we found
15425BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15426if test ! -f "$BOOT_RTJAR"; then
15427    # On MacOSX it is called classes.jar
15428    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15429    if test -f "$BOOT_RTJAR"; then
15430      # Remove the ..
15431      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15432    fi
15433fi
15434BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15435BOOT_JDK="$BOOT_JDK"
15436
15437
15438
15439
15440# Setup tools from the Boot JDK.
15441
15442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15443$as_echo_n "checking for java in Boot JDK... " >&6; }
15444  JAVA=$BOOT_JDK/bin/java
15445  if test ! -x $JAVA; then
15446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15447$as_echo "not found" >&6; }
15448      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15449$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15450      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15451  fi
15452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15453$as_echo "ok" >&6; }
15454
15455
15456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15457$as_echo_n "checking for javac in Boot JDK... " >&6; }
15458  JAVAC=$BOOT_JDK/bin/javac
15459  if test ! -x $JAVAC; then
15460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15461$as_echo "not found" >&6; }
15462      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15463$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15464      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15465  fi
15466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15467$as_echo "ok" >&6; }
15468
15469
15470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15471$as_echo_n "checking for javah in Boot JDK... " >&6; }
15472  JAVAH=$BOOT_JDK/bin/javah
15473  if test ! -x $JAVAH; then
15474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15475$as_echo "not found" >&6; }
15476      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15477$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15478      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15479  fi
15480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15481$as_echo "ok" >&6; }
15482
15483
15484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15485$as_echo_n "checking for javap in Boot JDK... " >&6; }
15486  JAVAP=$BOOT_JDK/bin/javap
15487  if test ! -x $JAVAP; then
15488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15489$as_echo "not found" >&6; }
15490      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15491$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15492      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15493  fi
15494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15495$as_echo "ok" >&6; }
15496
15497
15498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15499$as_echo_n "checking for jar in Boot JDK... " >&6; }
15500  JAR=$BOOT_JDK/bin/jar
15501  if test ! -x $JAR; then
15502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15503$as_echo "not found" >&6; }
15504      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15505$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15506      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15507  fi
15508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15509$as_echo "ok" >&6; }
15510
15511
15512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15513$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15514  RMIC=$BOOT_JDK/bin/rmic
15515  if test ! -x $RMIC; then
15516      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15517$as_echo "not found" >&6; }
15518      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15519$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15520      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15521  fi
15522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15523$as_echo "ok" >&6; }
15524
15525
15526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15527$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15528  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15529  if test ! -x $NATIVE2ASCII; then
15530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15531$as_echo "not found" >&6; }
15532      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15533$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15534      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15535  fi
15536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15537$as_echo "ok" >&6; }
15538
15539
15540# Finally, set some other options...
15541
15542# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15543BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15544
15545
15546
15547
15548##############################################################################
15549#
15550# Specify options for anything that is run with the Boot JDK.
15551#
15552
15553# Check whether --with-boot-jdk-jvmargs was given.
15554if test "${with_boot_jdk_jvmargs+set}" = set; then :
15555  withval=$with_boot_jdk_jvmargs;
15556fi
15557
15558
15559if test "x$with_boot_jdk_jvmargs" = x; then
15560    # Not all JVM:s accept the same arguments on the command line.
15561    # OpenJDK specific increase in thread stack for JDK build,
15562    # well more specifically, when running javac.
15563    if test "x$BUILD_NUM_BITS" = x32; then
15564       STACK_SIZE=768
15565    else
15566       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15567       # since 64-bit pointers are pushed on the stach. Apparently, we need
15568       # to increase the stack space when javacing the JDK....
15569       STACK_SIZE=1536
15570    fi
15571
15572    # Minimum amount of heap memory.
15573
15574    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15575    # If so, then append -Xms64M to boot_jdk_jvmargs
15576    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15577    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15578    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15579        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15580    fi
15581
15582    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15583        # Why does macosx need more heap? Its the huge JDK batch.
15584
15585    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15586    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15587    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15588    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15589    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15590        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15591    fi
15592
15593    else
15594
15595    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15596    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15597    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15598    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15599    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15600        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15601    fi
15602
15603    fi
15604    # When is adding -client something that speeds up the JVM?
15605    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15606
15607    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15608    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15609    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15610    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15611    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15612        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15613    fi
15614
15615
15616    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15617    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15618    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15619    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15620    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15621        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15622    fi
15623
15624
15625    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15626    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15627    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15628    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15629    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15630        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15631    fi
15632
15633    # Disable special log output when a debug build is used as Boot JDK...
15634
15635    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15636    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15637    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15638    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15639    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15640        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15641    fi
15642
15643fi
15644
15645BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15646
15647
15648
15649###############################################################################
15650#
15651# Configure the sources to use. We can add or override individual directories.
15652#
15653###############################################################################
15654
15655
15656
15657# Where are the sources. Any of these can be overridden
15658# using --with-override-corba and the likes.
15659LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15660CORBA_TOPDIR="$SRC_ROOT/corba"
15661JAXP_TOPDIR="$SRC_ROOT/jaxp"
15662JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15663HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15664NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15665JDK_TOPDIR="$SRC_ROOT/jdk"
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676###############################################################################
15677#
15678# Pickup additional source for a component from outside of the source root
15679# or override source for a component.
15680#
15681
15682# Check whether --with-add-source-root was given.
15683if test "${with_add_source_root+set}" = set; then :
15684  withval=$with_add_source_root;
15685fi
15686
15687
15688
15689# Check whether --with-override-source-root was given.
15690if test "${with_override_source_root+set}" = set; then :
15691  withval=$with_override_source_root;
15692fi
15693
15694
15695
15696# Check whether --with-adds-and-overrides was given.
15697if test "${with_adds_and_overrides+set}" = set; then :
15698  withval=$with_adds_and_overrides;
15699fi
15700
15701
15702if test "x$with_adds_and_overrides" != x; then
15703    with_add_source_root="$with_adds_and_overrides/adds"
15704    with_override_source_root="$with_adds_and_overrides/overrides"
15705fi
15706
15707if test "x$with_add_source_root" != x; then
15708    if ! test -d $with_add_source_root; then
15709       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15710    fi
15711    CURDIR="$PWD"
15712    cd "$with_add_source_root"
15713    ADD_SRC_ROOT="`pwd`"
15714    cd "$CURDIR"
15715    # Verify that the addon source root does not have any root makefiles.
15716    # If it does, then it is usually an error, prevent this.
15717    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15718       test -f $with_add_source_root/langtools/make/Makefile; then
15719        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
15720    fi
15721    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15722       test -f $with_add_source_root/corba/make/Makefile; then
15723        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
15724    fi
15725    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15726       test -f $with_add_source_root/jaxp/make/Makefile; then
15727        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
15728    fi
15729    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15730       test -f $with_add_source_root/jaxws/make/Makefile; then
15731        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
15732    fi
15733    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15734       test -f $with_add_source_root/hotspot/make/Makefile; then
15735        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
15736    fi
15737    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15738       test -f $with_add_source_root/jdk/make/Makefile; then
15739        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
15740    fi
15741fi
15742
15743
15744if test "x$with_override_source_root" != x; then
15745    if ! test -d $with_override_source_root; then
15746       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15747    fi
15748    CURDIR="$PWD"
15749    cd "$with_override_source_root"
15750    OVERRIDE_SRC_ROOT="`pwd`"
15751    cd "$CURDIR"
15752    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15753       test -f $with_override_source_root/langtools/make/Makefile; then
15754        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
15755    fi
15756    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15757       test -f $with_override_source_root/corba/make/Makefile; then
15758        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
15759    fi
15760    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15761       test -f $with_override_source_root/jaxp/make/Makefile; then
15762        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
15763    fi
15764    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15765       test -f $with_override_source_root/jaxws/make/Makefile; then
15766        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
15767    fi
15768    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15769       test -f $with_override_source_root/hotspot/make/Makefile; then
15770        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
15771    fi
15772    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15773       test -f $with_override_source_root/jdk/make/Makefile; then
15774        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
15775    fi
15776fi
15777
15778
15779###############################################################################
15780#
15781# Override a repo completely, this is used for example when you have 3 small
15782# development sandboxes of the langtools sources and want to avoid having 3 full
15783# OpenJDK sources checked out on disk.
15784#
15785# Assuming that the 3 langtools sandboxes are located here:
15786# /home/fredrik/sandbox1/langtools
15787# /home/fredrik/sandbox2/langtools
15788# /home/fredrik/sandbox3/langtools
15789#
15790# From the source root you create build subdirs manually:
15791#     mkdir -p build1 build2 build3
15792# in each build directory run:
15793#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15794#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15795#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15796#
15797
15798
15799# Check whether --with-override-langtools was given.
15800if test "${with_override_langtools+set}" = set; then :
15801  withval=$with_override_langtools;
15802fi
15803
15804
15805
15806# Check whether --with-override-corba was given.
15807if test "${with_override_corba+set}" = set; then :
15808  withval=$with_override_corba;
15809fi
15810
15811
15812
15813# Check whether --with-override-jaxp was given.
15814if test "${with_override_jaxp+set}" = set; then :
15815  withval=$with_override_jaxp;
15816fi
15817
15818
15819
15820# Check whether --with-override-jaxws was given.
15821if test "${with_override_jaxws+set}" = set; then :
15822  withval=$with_override_jaxws;
15823fi
15824
15825
15826
15827# Check whether --with-override-hotspot was given.
15828if test "${with_override_hotspot+set}" = set; then :
15829  withval=$with_override_hotspot;
15830fi
15831
15832
15833
15834# Check whether --with-override-jdk was given.
15835if test "${with_override_jdk+set}" = set; then :
15836  withval=$with_override_jdk;
15837fi
15838
15839
15840if test "x$with_override_langtools" != x; then
15841    CURDIR="$PWD"
15842    cd "$with_override_langtools"
15843    LANGTOOLS_TOPDIR="`pwd`"
15844    cd "$CURDIR"
15845    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15846        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15847    fi
15848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15849$as_echo_n "checking if langtools should be overridden... " >&6; }
15850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15851$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15852fi
15853if test "x$with_override_corba" != x; then
15854    CURDIR="$PWD"
15855    cd "$with_override_corba"
15856    CORBA_TOPDIR="`pwd`"
15857    cd "$CURDIR"
15858    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15859        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15860    fi
15861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15862$as_echo_n "checking if corba should be overridden... " >&6; }
15863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15864$as_echo "yes with $CORBA_TOPDIR" >&6; }
15865fi
15866if test "x$with_override_jaxp" != x; then
15867    CURDIR="$PWD"
15868    cd "$with_override_jaxp"
15869    JAXP_TOPDIR="`pwd`"
15870    cd "$CURDIR"
15871    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15872        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15873    fi
15874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15875$as_echo_n "checking if jaxp should be overridden... " >&6; }
15876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15877$as_echo "yes with $JAXP_TOPDIR" >&6; }
15878fi
15879if test "x$with_override_jaxws" != x; then
15880    CURDIR="$PWD"
15881    cd "$with_override_jaxws"
15882    JAXWS_TOPDIR="`pwd`"
15883    cd "$CURDIR"
15884    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15885        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15886    fi
15887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15888$as_echo_n "checking if jaxws should be overridden... " >&6; }
15889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15890$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15891fi
15892if test "x$with_override_hotspot" != x; then
15893    CURDIR="$PWD"
15894    cd "$with_override_hotspot"
15895    HOTSPOT_TOPDIR="`pwd`"
15896    cd "$CURDIR"
15897    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15898       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15899        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15900    fi
15901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15902$as_echo_n "checking if hotspot should be overridden... " >&6; }
15903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15904$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15905fi
15906if test "x$with_override_nashorn" != x; then
15907    CURDIR="$PWD"
15908    cd "$with_override_nashorn"
15909    NASHORN_TOPDIR="`pwd`"
15910    cd "$CURDIR"
15911    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15912        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15913    fi
15914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15915$as_echo_n "checking if nashorn should be overridden... " >&6; }
15916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15917$as_echo "yes with $NASHORN_TOPDIR" >&6; }
15918fi
15919if test "x$with_override_jdk" != x; then
15920    CURDIR="$PWD"
15921    cd "$with_override_jdk"
15922    JDK_TOPDIR="`pwd`"
15923    cd "$CURDIR"
15924    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15925        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15926    fi
15927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15928$as_echo_n "checking if JDK should be overridden... " >&6; }
15929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15930$as_echo "yes with $JDK_TOPDIR" >&6; }
15931fi
15932
15933
15934
15935BUILD_OUTPUT="$OUTPUT_ROOT"
15936
15937
15938HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15939BUILD_HOTSPOT=true
15940
15941
15942
15943# Check whether --with-import-hotspot was given.
15944if test "${with_import_hotspot+set}" = set; then :
15945  withval=$with_import_hotspot;
15946fi
15947
15948if test "x$with_import_hotspot" != x; then
15949    CURDIR="$PWD"
15950    cd "$with_import_hotspot"
15951    HOTSPOT_DIST="`pwd`"
15952    cd "$CURDIR"
15953    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15954        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15955    fi
15956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15957$as_echo_n "checking if hotspot should be imported... " >&6; }
15958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15959$as_echo "yes from $HOTSPOT_DIST" >&6; }
15960    BUILD_HOTSPOT=false
15961fi
15962
15963JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15964
15965
15966###############################################################################
15967#
15968# Setup the toolchain (compilers etc), i.e. the tools that need to be
15969# cross-compilation aware.
15970#
15971###############################################################################
15972
15973
15974###############################################################################
15975#
15976# Configure the development tool paths and potential sysroot.
15977#
15978ac_ext=cpp
15979ac_cpp='$CXXCPP $CPPFLAGS'
15980ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15981ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15982ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15983
15984
15985# The option used to specify the target .o,.a or .so file.
15986# When compiling, how to specify the to be created object file.
15987CC_OUT_OPTION='-o$(SPACE)'
15988# When linking, how to specify the to be created executable.
15989EXE_OUT_OPTION='-o$(SPACE)'
15990# When linking, how to specify the to be created dynamically linkable library.
15991LD_OUT_OPTION='-o$(SPACE)'
15992# When archiving, how to specify the to be create static archive for object files.
15993AR_OUT_OPTION='rcs$(SPACE)'
15994
15995
15996
15997
15998
15999# Locate the actual tools
16000
16001if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16002
16003  # Store path to cygwin link.exe to help excluding it when searching for
16004  # VS linker. This must be done before changing the PATH when looking for VS.
16005  # Extract the first word of "link", so it can be a program name with args.
16006set dummy link; ac_word=$2
16007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16008$as_echo_n "checking for $ac_word... " >&6; }
16009if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16010  $as_echo_n "(cached) " >&6
16011else
16012  case $CYGWIN_LINK in
16013  [\\/]* | ?:[\\/]*)
16014  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16015  ;;
16016  *)
16017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16018for as_dir in $PATH
16019do
16020  IFS=$as_save_IFS
16021  test -z "$as_dir" && as_dir=.
16022    for ac_exec_ext in '' $ac_executable_extensions; do
16023  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16024    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16026    break 2
16027  fi
16028done
16029  done
16030IFS=$as_save_IFS
16031
16032  ;;
16033esac
16034fi
16035CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16036if test -n "$CYGWIN_LINK"; then
16037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16038$as_echo "$CYGWIN_LINK" >&6; }
16039else
16040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16041$as_echo "no" >&6; }
16042fi
16043
16044
16045  if test "x$CYGWIN_LINK" != x; then
16046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16047$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16048    "$CYGWIN_LINK" --version > /dev/null
16049    if test $? -eq 0 ; then
16050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16051$as_echo "yes" >&6; }
16052    else
16053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16054$as_echo "no" >&6; }
16055      # This might be the VS linker. Don't exclude it later on.
16056      CYGWIN_LINK=""
16057    fi
16058  fi
16059
16060  # First-hand choice is to locate and run the vsvars bat file.
16061
16062  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16063    VCVARSFILE="vc/bin/vcvars32.bat"
16064  else
16065    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16066  fi
16067
16068  VS_ENV_CMD=""
16069  VS_ENV_ARGS=""
16070  if test "x$with_toolsdir" != x; then
16071
16072  if test "x$VS_ENV_CMD" = x; then
16073    VS100BASE="$with_toolsdir/../.."
16074    METHOD="--with-tools-dir"
16075
16076  windows_path="$VS100BASE"
16077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16078    unix_path=`$CYGPATH -u "$windows_path"`
16079    VS100BASE="$unix_path"
16080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16082    VS100BASE="$unix_path"
16083  fi
16084
16085    if test -d "$VS100BASE"; then
16086      if test -f "$VS100BASE/$VCVARSFILE"; then
16087        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16088$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16089        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16090      else
16091        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16092$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16093        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16094$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16095      fi
16096    fi
16097  fi
16098
16099  fi
16100
16101  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16102    # Having specified an argument which is incorrect will produce an instant failure;
16103    # we should not go on looking
16104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16105$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16106    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16107$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16108    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16109  fi
16110
16111  if test "x$ProgramW6432" != x; then
16112
16113  if test "x$VS_ENV_CMD" = x; then
16114    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16115    METHOD="well-known name"
16116
16117  windows_path="$WIN_SDK_BASE"
16118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16119    unix_path=`$CYGPATH -u "$windows_path"`
16120    WIN_SDK_BASE="$unix_path"
16121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16123    WIN_SDK_BASE="$unix_path"
16124  fi
16125
16126    if test -d "$WIN_SDK_BASE"; then
16127      # There have been cases of partial or broken SDK installations. A missing
16128      # lib dir is not going to work.
16129      if test ! -d "$WIN_SDK_BASE/../lib"; then
16130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16131$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16132        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16133$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16134      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16135        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16136$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16137        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16138        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16139          VS_ENV_ARGS="/x86"
16140        else
16141          VS_ENV_ARGS="/x64"
16142        fi
16143      else
16144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16145$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16146        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16147$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16148      fi
16149    fi
16150  fi
16151
16152  fi
16153  if test "x$PROGRAMW6432" != x; then
16154
16155  if test "x$VS_ENV_CMD" = x; then
16156    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16157    METHOD="well-known name"
16158
16159  windows_path="$WIN_SDK_BASE"
16160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16161    unix_path=`$CYGPATH -u "$windows_path"`
16162    WIN_SDK_BASE="$unix_path"
16163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16165    WIN_SDK_BASE="$unix_path"
16166  fi
16167
16168    if test -d "$WIN_SDK_BASE"; then
16169      # There have been cases of partial or broken SDK installations. A missing
16170      # lib dir is not going to work.
16171      if test ! -d "$WIN_SDK_BASE/../lib"; then
16172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16173$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16174        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16175$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16176      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16177        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16178$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16179        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16180        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16181          VS_ENV_ARGS="/x86"
16182        else
16183          VS_ENV_ARGS="/x64"
16184        fi
16185      else
16186        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16187$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16188        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16189$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16190      fi
16191    fi
16192  fi
16193
16194  fi
16195  if test "x$PROGRAMFILES" != x; then
16196
16197  if test "x$VS_ENV_CMD" = x; then
16198    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16199    METHOD="well-known name"
16200
16201  windows_path="$WIN_SDK_BASE"
16202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16203    unix_path=`$CYGPATH -u "$windows_path"`
16204    WIN_SDK_BASE="$unix_path"
16205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16207    WIN_SDK_BASE="$unix_path"
16208  fi
16209
16210    if test -d "$WIN_SDK_BASE"; then
16211      # There have been cases of partial or broken SDK installations. A missing
16212      # lib dir is not going to work.
16213      if test ! -d "$WIN_SDK_BASE/../lib"; then
16214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16215$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16216        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16217$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16218      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16219        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16220$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16221        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16222        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16223          VS_ENV_ARGS="/x86"
16224        else
16225          VS_ENV_ARGS="/x64"
16226        fi
16227      else
16228        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16229$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16230        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16231$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16232      fi
16233    fi
16234  fi
16235
16236  fi
16237
16238  if test "x$VS_ENV_CMD" = x; then
16239    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16240    METHOD="well-known name"
16241
16242  windows_path="$WIN_SDK_BASE"
16243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16244    unix_path=`$CYGPATH -u "$windows_path"`
16245    WIN_SDK_BASE="$unix_path"
16246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16248    WIN_SDK_BASE="$unix_path"
16249  fi
16250
16251    if test -d "$WIN_SDK_BASE"; then
16252      # There have been cases of partial or broken SDK installations. A missing
16253      # lib dir is not going to work.
16254      if test ! -d "$WIN_SDK_BASE/../lib"; then
16255        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16256$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16257        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16258$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16259      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16260        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16261$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16262        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16263        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16264          VS_ENV_ARGS="/x86"
16265        else
16266          VS_ENV_ARGS="/x64"
16267        fi
16268      else
16269        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16270$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16271        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16272$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16273      fi
16274    fi
16275  fi
16276
16277
16278  if test "x$VS_ENV_CMD" = x; then
16279    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16280    METHOD="well-known name"
16281
16282  windows_path="$WIN_SDK_BASE"
16283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16284    unix_path=`$CYGPATH -u "$windows_path"`
16285    WIN_SDK_BASE="$unix_path"
16286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16288    WIN_SDK_BASE="$unix_path"
16289  fi
16290
16291    if test -d "$WIN_SDK_BASE"; then
16292      # There have been cases of partial or broken SDK installations. A missing
16293      # lib dir is not going to work.
16294      if test ! -d "$WIN_SDK_BASE/../lib"; then
16295        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16296$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16297        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16298$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16299      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16300        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16301$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16302        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16303        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16304          VS_ENV_ARGS="/x86"
16305        else
16306          VS_ENV_ARGS="/x64"
16307        fi
16308      else
16309        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16310$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16311        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16312$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16313      fi
16314    fi
16315  fi
16316
16317
16318  if test "x$VS100COMNTOOLS" != x; then
16319
16320  if test "x$VS_ENV_CMD" = x; then
16321    VS100BASE="$VS100COMNTOOLS/../.."
16322    METHOD="VS100COMNTOOLS variable"
16323
16324  windows_path="$VS100BASE"
16325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16326    unix_path=`$CYGPATH -u "$windows_path"`
16327    VS100BASE="$unix_path"
16328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16330    VS100BASE="$unix_path"
16331  fi
16332
16333    if test -d "$VS100BASE"; then
16334      if test -f "$VS100BASE/$VCVARSFILE"; then
16335        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16336$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16337        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16338      else
16339        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16340$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16341        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16342$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16343      fi
16344    fi
16345  fi
16346
16347  fi
16348  if test "x$PROGRAMFILES" != x; then
16349
16350  if test "x$VS_ENV_CMD" = x; then
16351    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16352    METHOD="well-known name"
16353
16354  windows_path="$VS100BASE"
16355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16356    unix_path=`$CYGPATH -u "$windows_path"`
16357    VS100BASE="$unix_path"
16358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16360    VS100BASE="$unix_path"
16361  fi
16362
16363    if test -d "$VS100BASE"; then
16364      if test -f "$VS100BASE/$VCVARSFILE"; then
16365        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16366$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16367        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16368      else
16369        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16370$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16371        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16372$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16373      fi
16374    fi
16375  fi
16376
16377  fi
16378
16379  if test "x$VS_ENV_CMD" = x; then
16380    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16381    METHOD="well-known name"
16382
16383  windows_path="$VS100BASE"
16384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16385    unix_path=`$CYGPATH -u "$windows_path"`
16386    VS100BASE="$unix_path"
16387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16389    VS100BASE="$unix_path"
16390  fi
16391
16392    if test -d "$VS100BASE"; then
16393      if test -f "$VS100BASE/$VCVARSFILE"; then
16394        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16395$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16396        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16397      else
16398        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16399$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16400        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16401$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16402      fi
16403    fi
16404  fi
16405
16406
16407  if test "x$VS_ENV_CMD" = x; then
16408    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16409    METHOD="well-known name"
16410
16411  windows_path="$VS100BASE"
16412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16413    unix_path=`$CYGPATH -u "$windows_path"`
16414    VS100BASE="$unix_path"
16415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16417    VS100BASE="$unix_path"
16418  fi
16419
16420    if test -d "$VS100BASE"; then
16421      if test -f "$VS100BASE/$VCVARSFILE"; then
16422        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16423$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16424        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16425      else
16426        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16427$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16428        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16429$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16430      fi
16431    fi
16432  fi
16433
16434
16435  if test "x$VS_ENV_CMD" != x; then
16436    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16437
16438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16439
16440  # First separate the path from the arguments. This will split at the first
16441  # space.
16442  complete="$VS_ENV_CMD"
16443  path="${complete%% *}"
16444  tmp="$complete EOL"
16445  arguments="${tmp#* }"
16446
16447  # Input might be given as Windows format, start by converting to
16448  # unix format.
16449  new_path=`$CYGPATH -u "$path"`
16450
16451  # Now try to locate executable using which
16452  new_path=`$WHICH "$new_path" 2> /dev/null`
16453  # bat and cmd files are not always considered executable in cygwin causing which
16454  # to not find them
16455  if test "x$new_path" = x \
16456           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16457           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16458    new_path=`$CYGPATH -u "$path"`
16459  fi
16460  if test "x$new_path" = x; then
16461    # Oops. Which didn't find the executable.
16462    # The splitting of arguments from the executable at a space might have been incorrect,
16463    # since paths with space are more likely in Windows. Give it another try with the whole
16464    # argument.
16465    path="$complete"
16466    arguments="EOL"
16467    new_path=`$CYGPATH -u "$path"`
16468    new_path=`$WHICH "$new_path" 2> /dev/null`
16469    # bat and cmd files are not always considered executable in cygwin causing which
16470    # to not find them
16471    if test "x$new_path" = x \
16472             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16473             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16474      new_path=`$CYGPATH -u "$path"`
16475    fi
16476    if test "x$new_path" = x; then
16477      # It's still not found. Now this is an unrecoverable error.
16478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16479$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16480      has_space=`$ECHO "$complete" | $GREP " "`
16481      if test "x$has_space" != x; then
16482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16484      fi
16485      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16486    fi
16487  fi
16488
16489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16492  # "foo.exe" is OK but "foo" is an error.
16493  #
16494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16495  # It is also a way to make sure we got the proper file name for the real test later on.
16496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16497  if test "x$test_shortpath" = x; then
16498    # Short path failed, file does not exist as specified.
16499    # Try adding .exe or .cmd
16500    if test -f "${new_path}.exe"; then
16501       input_to_shortpath="${new_path}.exe"
16502    elif test -f "${new_path}.cmd"; then
16503       input_to_shortpath="${new_path}.cmd"
16504    else
16505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16506$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16507      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16508$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16509      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16510    fi
16511  else
16512    input_to_shortpath="$new_path"
16513  fi
16514
16515  # Call helper function which possibly converts this using DOS-style short mode.
16516  # If so, the updated path is stored in $new_path.
16517  new_path="$input_to_shortpath"
16518
16519  input_path="$input_to_shortpath"
16520  # Check if we need to convert this using DOS-style short mode. If the path
16521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16522  # take no chances and rewrite it.
16523  # Note: m4 eats our [], so we need to use [ and ] instead.
16524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16525  if test "x$has_forbidden_chars" != x; then
16526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16530      # Going to short mode and back again did indeed matter. Since short mode is
16531      # case insensitive, let's make it lowercase to improve readability.
16532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16533      # Now convert it back to Unix-stile (cygpath)
16534      input_path=`$CYGPATH -u "$shortmode_path"`
16535      new_path="$input_path"
16536    fi
16537  fi
16538
16539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16540  if test "x$test_cygdrive_prefix" = x; then
16541    # As a simple fix, exclude /usr/bin since it's not a real path.
16542    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16544      # a path prefixed by /cygdrive for fixpath to work.
16545      new_path="$CYGWIN_ROOT_PATH$input_path"
16546    fi
16547  fi
16548
16549  # remove trailing .exe if any
16550  new_path="${new_path/%.exe/}"
16551
16552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16553
16554  # First separate the path from the arguments. This will split at the first
16555  # space.
16556  complete="$VS_ENV_CMD"
16557  path="${complete%% *}"
16558  tmp="$complete EOL"
16559  arguments="${tmp#* }"
16560
16561  # Input might be given as Windows format, start by converting to
16562  # unix format.
16563  new_path="$path"
16564
16565  windows_path="$new_path"
16566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16567    unix_path=`$CYGPATH -u "$windows_path"`
16568    new_path="$unix_path"
16569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16571    new_path="$unix_path"
16572  fi
16573
16574
16575  # Now try to locate executable using which
16576  new_path=`$WHICH "$new_path" 2> /dev/null`
16577
16578  if test "x$new_path" = x; then
16579    # Oops. Which didn't find the executable.
16580    # The splitting of arguments from the executable at a space might have been incorrect,
16581    # since paths with space are more likely in Windows. Give it another try with the whole
16582    # argument.
16583    path="$complete"
16584    arguments="EOL"
16585    new_path="$path"
16586
16587  windows_path="$new_path"
16588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16589    unix_path=`$CYGPATH -u "$windows_path"`
16590    new_path="$unix_path"
16591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16593    new_path="$unix_path"
16594  fi
16595
16596
16597    new_path=`$WHICH "$new_path" 2> /dev/null`
16598
16599    if test "x$new_path" = x; then
16600      # It's still not found. Now this is an unrecoverable error.
16601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16602$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16603      has_space=`$ECHO "$complete" | $GREP " "`
16604      if test "x$has_space" != x; then
16605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16607      fi
16608      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16609    fi
16610  fi
16611
16612  # Now new_path has a complete unix path to the binary
16613  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16614    # Keep paths in /bin as-is, but remove trailing .exe if any
16615    new_path="${new_path/%.exe/}"
16616    # Do not save /bin paths to all_fixpath_prefixes!
16617  else
16618    # Not in mixed or Windows style, start by that.
16619    new_path=`cmd //c echo $new_path`
16620
16621  input_path="$new_path"
16622  # Check if we need to convert this using DOS-style short mode. If the path
16623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16624  # take no chances and rewrite it.
16625  # Note: m4 eats our [], so we need to use [ and ] instead.
16626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16627  if test "x$has_forbidden_chars" != x; then
16628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16630  fi
16631
16632    # Output is in $new_path
16633
16634  windows_path="$new_path"
16635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16636    unix_path=`$CYGPATH -u "$windows_path"`
16637    new_path="$unix_path"
16638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16640    new_path="$unix_path"
16641  fi
16642
16643    # remove trailing .exe if any
16644    new_path="${new_path/%.exe/}"
16645
16646    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16647    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16648  fi
16649
16650  else
16651    # We're on a posix platform. Hooray! :)
16652    # First separate the path from the arguments. This will split at the first
16653    # space.
16654    complete="$VS_ENV_CMD"
16655    path="${complete%% *}"
16656    tmp="$complete EOL"
16657    arguments="${tmp#* }"
16658
16659    # Cannot rely on the command "which" here since it doesn't always work.
16660    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16661    if test -z "$is_absolute_path"; then
16662      # Path to executable is not absolute. Find it.
16663      IFS_save="$IFS"
16664      IFS=:
16665      for p in $PATH; do
16666        if test -f "$p/$path" && test -x "$p/$path"; then
16667          new_path="$p/$path"
16668          break
16669        fi
16670      done
16671      IFS="$IFS_save"
16672    else
16673      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16674$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16675      new_path="$path"
16676    fi
16677
16678    if test "x$new_path" = x; then
16679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16680$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16681        has_space=`$ECHO "$complete" | $GREP " "`
16682        if test "x$has_space" != x; then
16683          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16684$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16685        fi
16686        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16687      fi
16688  fi
16689
16690      # Now join together the path and the arguments once again
16691      if test "x$arguments" != xEOL; then
16692        new_complete="$new_path ${arguments% *}"
16693      else
16694        new_complete="$new_path"
16695      fi
16696
16697  if test "x$complete" != "x$new_complete"; then
16698      VS_ENV_CMD="$new_complete"
16699      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16700$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16701    fi
16702
16703
16704    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16705    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16706$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16707    cd $OUTPUT_ROOT
16708    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16709    # to autoconf standards.
16710
16711    #----
16712
16713    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16714    # but calculate the difference in Cygwin environment before/after running it and then
16715    # apply the diff.
16716
16717    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16718      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16719      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16720      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16721    else
16722      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16723      _dosbash=`cmd //c echo \`which bash\``
16724    fi
16725
16726    # generate the set of exported vars before/after the vs10 setup
16727    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16728    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16729    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16730    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16731
16732    # Now execute the newly created bat file.
16733    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16734    cmd /c localdevenvtmp.bat | cat
16735
16736    # apply the diff (less some non-vs10 vars named by "!")
16737    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16738    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16739    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16740
16741    # cleanup
16742    $RM localdevenvtmp*
16743    #----
16744    cd $CURDIR
16745    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16747$as_echo "no" >&6; }
16748      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16749$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16750      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16751$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16752      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16753$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16754      as_fn_error $? "Cannot continue" "$LINENO" 5
16755    fi
16756
16757    # Now set all paths and other env variables. This will allow the rest of
16758    # the configure script to find and run the compiler in the proper way.
16759    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16760$as_echo "$as_me: Setting extracted environment variables" >&6;}
16761    . $OUTPUT_ROOT/localdevenv.sh
16762  else
16763    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16764    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16765$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16766  fi
16767
16768  # At this point, we should have corrent variables in the environment, or we can't continue.
16769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16770$as_echo_n "checking for Visual Studio variables... " >&6; }
16771
16772  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16773    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16775$as_echo "present but broken" >&6; }
16776      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16777    else
16778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16779$as_echo "ok" >&6; }
16780      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16781      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16782      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16783      VS_PATH="$PATH"
16784
16785
16786
16787    fi
16788  else
16789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16790$as_echo "not found" >&6; }
16791
16792    if test "x$VS_ENV_CMD" = x; then
16793      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16794$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16795      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16796$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16797    else
16798      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16799$as_echo "$as_me: Running the extraction script failed." >&6;}
16800    fi
16801    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16802$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16803    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16804$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16805    as_fn_error $? "Cannot continue" "$LINENO" 5
16806  fi
16807
16808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16809$as_echo_n "checking for msvcr100.dll... " >&6; }
16810
16811# Check whether --with-msvcr-dll was given.
16812if test "${with_msvcr_dll+set}" = set; then :
16813  withval=$with_msvcr_dll;
16814fi
16815
16816  if test "x$with_msvcr_dll" != x; then
16817    MSVCR_DLL="$with_msvcr_dll"
16818  else
16819    if test "x$VCINSTALLDIR" != x; then
16820      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16821        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16822      else
16823        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16824        if test "x$MSVCR_DLL" = x; then
16825          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16826        fi
16827      fi
16828      if test "x$MSVCR_DLL" != x; then
16829        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16830$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16831      else
16832        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16833$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16834      fi
16835    fi
16836    if test "x$MSVCR_DLL" = x; then
16837      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16838        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16839$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16840        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16841      fi
16842    fi
16843  fi
16844  if test "x$MSVCR_DLL" = x; then
16845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16846$as_echo "no" >&6; }
16847    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16848  fi
16849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16850$as_echo "$MSVCR_DLL" >&6; }
16851
16852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16853
16854  # Input might be given as Windows format, start by converting to
16855  # unix format.
16856  path="$MSVCR_DLL"
16857  new_path=`$CYGPATH -u "$path"`
16858
16859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16862  # "foo.exe" is OK but "foo" is an error.
16863  #
16864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16865  # It is also a way to make sure we got the proper file name for the real test later on.
16866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16867  if test "x$test_shortpath" = x; then
16868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16869$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16870    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16871  fi
16872
16873  # Call helper function which possibly converts this using DOS-style short mode.
16874  # If so, the updated path is stored in $new_path.
16875
16876  input_path="$new_path"
16877  # Check if we need to convert this using DOS-style short mode. If the path
16878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16879  # take no chances and rewrite it.
16880  # Note: m4 eats our [], so we need to use [ and ] instead.
16881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16882  if test "x$has_forbidden_chars" != x; then
16883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16887      # Going to short mode and back again did indeed matter. Since short mode is
16888      # case insensitive, let's make it lowercase to improve readability.
16889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16890      # Now convert it back to Unix-stile (cygpath)
16891      input_path=`$CYGPATH -u "$shortmode_path"`
16892      new_path="$input_path"
16893    fi
16894  fi
16895
16896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16897  if test "x$test_cygdrive_prefix" = x; then
16898    # As a simple fix, exclude /usr/bin since it's not a real path.
16899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16901      # a path prefixed by /cygdrive for fixpath to work.
16902      new_path="$CYGWIN_ROOT_PATH$input_path"
16903    fi
16904  fi
16905
16906
16907  if test "x$path" != "x$new_path"; then
16908    MSVCR_DLL="$new_path"
16909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16910$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16911  fi
16912
16913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16914
16915  path="$MSVCR_DLL"
16916  has_colon=`$ECHO $path | $GREP ^.:`
16917  new_path="$path"
16918  if test "x$has_colon" = x; then
16919    # Not in mixed or Windows style, start by that.
16920    new_path=`cmd //c echo $path`
16921  fi
16922
16923
16924  input_path="$new_path"
16925  # Check if we need to convert this using DOS-style short mode. If the path
16926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16927  # take no chances and rewrite it.
16928  # Note: m4 eats our [], so we need to use [ and ] instead.
16929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16930  if test "x$has_forbidden_chars" != x; then
16931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16933  fi
16934
16935
16936  windows_path="$new_path"
16937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16938    unix_path=`$CYGPATH -u "$windows_path"`
16939    new_path="$unix_path"
16940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16942    new_path="$unix_path"
16943  fi
16944
16945  if test "x$path" != "x$new_path"; then
16946    MSVCR_DLL="$new_path"
16947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16948$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16949  fi
16950
16951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16953
16954  else
16955    # We're on a posix platform. Hooray! :)
16956    path="$MSVCR_DLL"
16957
16958    if test ! -f "$path" && test ! -d "$path"; then
16959      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16960    fi
16961
16962    has_space=`$ECHO "$path" | $GREP " "`
16963    if test "x$has_space" != x; then
16964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16965$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16966      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16967    fi
16968  fi
16969
16970
16971fi
16972
16973
16974
16975# If --build AND --host is set, then the configure script will find any
16976# cross compilation tools in the PATH. Cross compilation tools
16977# follows the cross compilation standard where they are prefixed with ${host}.
16978# For example the binary i686-sun-solaris2.10-gcc
16979# will cross compile for i686-sun-solaris2.10
16980# If neither of build and host is not set, then build=host and the
16981# default compiler found in the path will be used.
16982# Setting only --host, does not seem to be really supported.
16983# Please set both --build and --host if you want to cross compile.
16984
16985if test "x$COMPILE_TYPE" = "xcross"; then
16986    # Now we to find a C/C++ compiler that can build executables for the build
16987    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16988    # once. Also, we need to do this before adding a tools dir to the path,
16989    # otherwise we might pick up cross-compilers which don't use standard naming.
16990    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16991    # to wait until they are properly discovered.
16992    for ac_prog in cl cc gcc
16993do
16994  # Extract the first word of "$ac_prog", so it can be a program name with args.
16995set dummy $ac_prog; ac_word=$2
16996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16997$as_echo_n "checking for $ac_word... " >&6; }
16998if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16999  $as_echo_n "(cached) " >&6
17000else
17001  case $BUILD_CC in
17002  [\\/]* | ?:[\\/]*)
17003  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17004  ;;
17005  *)
17006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17007for as_dir in $PATH
17008do
17009  IFS=$as_save_IFS
17010  test -z "$as_dir" && as_dir=.
17011    for ac_exec_ext in '' $ac_executable_extensions; do
17012  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17013    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17015    break 2
17016  fi
17017done
17018  done
17019IFS=$as_save_IFS
17020
17021  ;;
17022esac
17023fi
17024BUILD_CC=$ac_cv_path_BUILD_CC
17025if test -n "$BUILD_CC"; then
17026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17027$as_echo "$BUILD_CC" >&6; }
17028else
17029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17030$as_echo "no" >&6; }
17031fi
17032
17033
17034  test -n "$BUILD_CC" && break
17035done
17036
17037
17038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17039
17040  # First separate the path from the arguments. This will split at the first
17041  # space.
17042  complete="$BUILD_CC"
17043  path="${complete%% *}"
17044  tmp="$complete EOL"
17045  arguments="${tmp#* }"
17046
17047  # Input might be given as Windows format, start by converting to
17048  # unix format.
17049  new_path=`$CYGPATH -u "$path"`
17050
17051  # Now try to locate executable using which
17052  new_path=`$WHICH "$new_path" 2> /dev/null`
17053  # bat and cmd files are not always considered executable in cygwin causing which
17054  # to not find them
17055  if test "x$new_path" = x \
17056           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17057           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17058    new_path=`$CYGPATH -u "$path"`
17059  fi
17060  if test "x$new_path" = x; then
17061    # Oops. Which didn't find the executable.
17062    # The splitting of arguments from the executable at a space might have been incorrect,
17063    # since paths with space are more likely in Windows. Give it another try with the whole
17064    # argument.
17065    path="$complete"
17066    arguments="EOL"
17067    new_path=`$CYGPATH -u "$path"`
17068    new_path=`$WHICH "$new_path" 2> /dev/null`
17069    # bat and cmd files are not always considered executable in cygwin causing which
17070    # to not find them
17071    if test "x$new_path" = x \
17072             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17073             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17074      new_path=`$CYGPATH -u "$path"`
17075    fi
17076    if test "x$new_path" = x; then
17077      # It's still not found. Now this is an unrecoverable error.
17078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17079$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17080      has_space=`$ECHO "$complete" | $GREP " "`
17081      if test "x$has_space" != x; then
17082        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17083$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17084      fi
17085      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17086    fi
17087  fi
17088
17089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17092  # "foo.exe" is OK but "foo" is an error.
17093  #
17094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17095  # It is also a way to make sure we got the proper file name for the real test later on.
17096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17097  if test "x$test_shortpath" = x; then
17098    # Short path failed, file does not exist as specified.
17099    # Try adding .exe or .cmd
17100    if test -f "${new_path}.exe"; then
17101       input_to_shortpath="${new_path}.exe"
17102    elif test -f "${new_path}.cmd"; then
17103       input_to_shortpath="${new_path}.cmd"
17104    else
17105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17106$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17107      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17108$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17109      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17110    fi
17111  else
17112    input_to_shortpath="$new_path"
17113  fi
17114
17115  # Call helper function which possibly converts this using DOS-style short mode.
17116  # If so, the updated path is stored in $new_path.
17117  new_path="$input_to_shortpath"
17118
17119  input_path="$input_to_shortpath"
17120  # Check if we need to convert this using DOS-style short mode. If the path
17121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17122  # take no chances and rewrite it.
17123  # Note: m4 eats our [], so we need to use [ and ] instead.
17124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17125  if test "x$has_forbidden_chars" != x; then
17126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17130      # Going to short mode and back again did indeed matter. Since short mode is
17131      # case insensitive, let's make it lowercase to improve readability.
17132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17133      # Now convert it back to Unix-stile (cygpath)
17134      input_path=`$CYGPATH -u "$shortmode_path"`
17135      new_path="$input_path"
17136    fi
17137  fi
17138
17139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17140  if test "x$test_cygdrive_prefix" = x; then
17141    # As a simple fix, exclude /usr/bin since it's not a real path.
17142    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17144      # a path prefixed by /cygdrive for fixpath to work.
17145      new_path="$CYGWIN_ROOT_PATH$input_path"
17146    fi
17147  fi
17148
17149  # remove trailing .exe if any
17150  new_path="${new_path/%.exe/}"
17151
17152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17153
17154  # First separate the path from the arguments. This will split at the first
17155  # space.
17156  complete="$BUILD_CC"
17157  path="${complete%% *}"
17158  tmp="$complete EOL"
17159  arguments="${tmp#* }"
17160
17161  # Input might be given as Windows format, start by converting to
17162  # unix format.
17163  new_path="$path"
17164
17165  windows_path="$new_path"
17166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17167    unix_path=`$CYGPATH -u "$windows_path"`
17168    new_path="$unix_path"
17169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17171    new_path="$unix_path"
17172  fi
17173
17174
17175  # Now try to locate executable using which
17176  new_path=`$WHICH "$new_path" 2> /dev/null`
17177
17178  if test "x$new_path" = x; then
17179    # Oops. Which didn't find the executable.
17180    # The splitting of arguments from the executable at a space might have been incorrect,
17181    # since paths with space are more likely in Windows. Give it another try with the whole
17182    # argument.
17183    path="$complete"
17184    arguments="EOL"
17185    new_path="$path"
17186
17187  windows_path="$new_path"
17188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17189    unix_path=`$CYGPATH -u "$windows_path"`
17190    new_path="$unix_path"
17191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17193    new_path="$unix_path"
17194  fi
17195
17196
17197    new_path=`$WHICH "$new_path" 2> /dev/null`
17198
17199    if test "x$new_path" = x; then
17200      # It's still not found. Now this is an unrecoverable error.
17201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17202$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17203      has_space=`$ECHO "$complete" | $GREP " "`
17204      if test "x$has_space" != x; then
17205        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17206$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17207      fi
17208      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17209    fi
17210  fi
17211
17212  # Now new_path has a complete unix path to the binary
17213  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17214    # Keep paths in /bin as-is, but remove trailing .exe if any
17215    new_path="${new_path/%.exe/}"
17216    # Do not save /bin paths to all_fixpath_prefixes!
17217  else
17218    # Not in mixed or Windows style, start by that.
17219    new_path=`cmd //c echo $new_path`
17220
17221  input_path="$new_path"
17222  # Check if we need to convert this using DOS-style short mode. If the path
17223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17224  # take no chances and rewrite it.
17225  # Note: m4 eats our [], so we need to use [ and ] instead.
17226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17227  if test "x$has_forbidden_chars" != x; then
17228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17230  fi
17231
17232    # Output is in $new_path
17233
17234  windows_path="$new_path"
17235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17236    unix_path=`$CYGPATH -u "$windows_path"`
17237    new_path="$unix_path"
17238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17240    new_path="$unix_path"
17241  fi
17242
17243    # remove trailing .exe if any
17244    new_path="${new_path/%.exe/}"
17245
17246    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17247    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17248  fi
17249
17250  else
17251    # We're on a posix platform. Hooray! :)
17252    # First separate the path from the arguments. This will split at the first
17253    # space.
17254    complete="$BUILD_CC"
17255    path="${complete%% *}"
17256    tmp="$complete EOL"
17257    arguments="${tmp#* }"
17258
17259    # Cannot rely on the command "which" here since it doesn't always work.
17260    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17261    if test -z "$is_absolute_path"; then
17262      # Path to executable is not absolute. Find it.
17263      IFS_save="$IFS"
17264      IFS=:
17265      for p in $PATH; do
17266        if test -f "$p/$path" && test -x "$p/$path"; then
17267          new_path="$p/$path"
17268          break
17269        fi
17270      done
17271      IFS="$IFS_save"
17272    else
17273      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17274$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17275      new_path="$path"
17276    fi
17277
17278    if test "x$new_path" = x; then
17279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17280$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17281        has_space=`$ECHO "$complete" | $GREP " "`
17282        if test "x$has_space" != x; then
17283          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17284$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17285        fi
17286        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17287      fi
17288  fi
17289
17290      # Now join together the path and the arguments once again
17291      if test "x$arguments" != xEOL; then
17292        new_complete="$new_path ${arguments% *}"
17293      else
17294        new_complete="$new_path"
17295      fi
17296
17297  if test "x$complete" != "x$new_complete"; then
17298      BUILD_CC="$new_complete"
17299      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17300$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17301    fi
17302
17303    for ac_prog in cl CC g++
17304do
17305  # Extract the first word of "$ac_prog", so it can be a program name with args.
17306set dummy $ac_prog; ac_word=$2
17307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17308$as_echo_n "checking for $ac_word... " >&6; }
17309if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17310  $as_echo_n "(cached) " >&6
17311else
17312  case $BUILD_CXX in
17313  [\\/]* | ?:[\\/]*)
17314  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17315  ;;
17316  *)
17317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17318for as_dir in $PATH
17319do
17320  IFS=$as_save_IFS
17321  test -z "$as_dir" && as_dir=.
17322    for ac_exec_ext in '' $ac_executable_extensions; do
17323  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17324    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17326    break 2
17327  fi
17328done
17329  done
17330IFS=$as_save_IFS
17331
17332  ;;
17333esac
17334fi
17335BUILD_CXX=$ac_cv_path_BUILD_CXX
17336if test -n "$BUILD_CXX"; then
17337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17338$as_echo "$BUILD_CXX" >&6; }
17339else
17340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17341$as_echo "no" >&6; }
17342fi
17343
17344
17345  test -n "$BUILD_CXX" && break
17346done
17347
17348
17349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17350
17351  # First separate the path from the arguments. This will split at the first
17352  # space.
17353  complete="$BUILD_CXX"
17354  path="${complete%% *}"
17355  tmp="$complete EOL"
17356  arguments="${tmp#* }"
17357
17358  # Input might be given as Windows format, start by converting to
17359  # unix format.
17360  new_path=`$CYGPATH -u "$path"`
17361
17362  # Now try to locate executable using which
17363  new_path=`$WHICH "$new_path" 2> /dev/null`
17364  # bat and cmd files are not always considered executable in cygwin causing which
17365  # to not find them
17366  if test "x$new_path" = x \
17367           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17368           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17369    new_path=`$CYGPATH -u "$path"`
17370  fi
17371  if test "x$new_path" = x; then
17372    # Oops. Which didn't find the executable.
17373    # The splitting of arguments from the executable at a space might have been incorrect,
17374    # since paths with space are more likely in Windows. Give it another try with the whole
17375    # argument.
17376    path="$complete"
17377    arguments="EOL"
17378    new_path=`$CYGPATH -u "$path"`
17379    new_path=`$WHICH "$new_path" 2> /dev/null`
17380    # bat and cmd files are not always considered executable in cygwin causing which
17381    # to not find them
17382    if test "x$new_path" = x \
17383             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17384             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17385      new_path=`$CYGPATH -u "$path"`
17386    fi
17387    if test "x$new_path" = x; then
17388      # It's still not found. Now this is an unrecoverable error.
17389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17390$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17391      has_space=`$ECHO "$complete" | $GREP " "`
17392      if test "x$has_space" != x; then
17393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17395      fi
17396      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17397    fi
17398  fi
17399
17400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17403  # "foo.exe" is OK but "foo" is an error.
17404  #
17405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17406  # It is also a way to make sure we got the proper file name for the real test later on.
17407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17408  if test "x$test_shortpath" = x; then
17409    # Short path failed, file does not exist as specified.
17410    # Try adding .exe or .cmd
17411    if test -f "${new_path}.exe"; then
17412       input_to_shortpath="${new_path}.exe"
17413    elif test -f "${new_path}.cmd"; then
17414       input_to_shortpath="${new_path}.cmd"
17415    else
17416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17417$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17418      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17419$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17420      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17421    fi
17422  else
17423    input_to_shortpath="$new_path"
17424  fi
17425
17426  # Call helper function which possibly converts this using DOS-style short mode.
17427  # If so, the updated path is stored in $new_path.
17428  new_path="$input_to_shortpath"
17429
17430  input_path="$input_to_shortpath"
17431  # Check if we need to convert this using DOS-style short mode. If the path
17432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17433  # take no chances and rewrite it.
17434  # Note: m4 eats our [], so we need to use [ and ] instead.
17435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17436  if test "x$has_forbidden_chars" != x; then
17437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17441      # Going to short mode and back again did indeed matter. Since short mode is
17442      # case insensitive, let's make it lowercase to improve readability.
17443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17444      # Now convert it back to Unix-stile (cygpath)
17445      input_path=`$CYGPATH -u "$shortmode_path"`
17446      new_path="$input_path"
17447    fi
17448  fi
17449
17450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17451  if test "x$test_cygdrive_prefix" = x; then
17452    # As a simple fix, exclude /usr/bin since it's not a real path.
17453    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17455      # a path prefixed by /cygdrive for fixpath to work.
17456      new_path="$CYGWIN_ROOT_PATH$input_path"
17457    fi
17458  fi
17459
17460  # remove trailing .exe if any
17461  new_path="${new_path/%.exe/}"
17462
17463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17464
17465  # First separate the path from the arguments. This will split at the first
17466  # space.
17467  complete="$BUILD_CXX"
17468  path="${complete%% *}"
17469  tmp="$complete EOL"
17470  arguments="${tmp#* }"
17471
17472  # Input might be given as Windows format, start by converting to
17473  # unix format.
17474  new_path="$path"
17475
17476  windows_path="$new_path"
17477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17478    unix_path=`$CYGPATH -u "$windows_path"`
17479    new_path="$unix_path"
17480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17482    new_path="$unix_path"
17483  fi
17484
17485
17486  # Now try to locate executable using which
17487  new_path=`$WHICH "$new_path" 2> /dev/null`
17488
17489  if test "x$new_path" = x; then
17490    # Oops. Which didn't find the executable.
17491    # The splitting of arguments from the executable at a space might have been incorrect,
17492    # since paths with space are more likely in Windows. Give it another try with the whole
17493    # argument.
17494    path="$complete"
17495    arguments="EOL"
17496    new_path="$path"
17497
17498  windows_path="$new_path"
17499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17500    unix_path=`$CYGPATH -u "$windows_path"`
17501    new_path="$unix_path"
17502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17504    new_path="$unix_path"
17505  fi
17506
17507
17508    new_path=`$WHICH "$new_path" 2> /dev/null`
17509
17510    if test "x$new_path" = x; then
17511      # It's still not found. Now this is an unrecoverable error.
17512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17513$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17514      has_space=`$ECHO "$complete" | $GREP " "`
17515      if test "x$has_space" != x; then
17516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17518      fi
17519      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17520    fi
17521  fi
17522
17523  # Now new_path has a complete unix path to the binary
17524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17525    # Keep paths in /bin as-is, but remove trailing .exe if any
17526    new_path="${new_path/%.exe/}"
17527    # Do not save /bin paths to all_fixpath_prefixes!
17528  else
17529    # Not in mixed or Windows style, start by that.
17530    new_path=`cmd //c echo $new_path`
17531
17532  input_path="$new_path"
17533  # Check if we need to convert this using DOS-style short mode. If the path
17534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17535  # take no chances and rewrite it.
17536  # Note: m4 eats our [], so we need to use [ and ] instead.
17537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17538  if test "x$has_forbidden_chars" != x; then
17539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17541  fi
17542
17543    # Output is in $new_path
17544
17545  windows_path="$new_path"
17546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17547    unix_path=`$CYGPATH -u "$windows_path"`
17548    new_path="$unix_path"
17549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17551    new_path="$unix_path"
17552  fi
17553
17554    # remove trailing .exe if any
17555    new_path="${new_path/%.exe/}"
17556
17557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17559  fi
17560
17561  else
17562    # We're on a posix platform. Hooray! :)
17563    # First separate the path from the arguments. This will split at the first
17564    # space.
17565    complete="$BUILD_CXX"
17566    path="${complete%% *}"
17567    tmp="$complete EOL"
17568    arguments="${tmp#* }"
17569
17570    # Cannot rely on the command "which" here since it doesn't always work.
17571    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17572    if test -z "$is_absolute_path"; then
17573      # Path to executable is not absolute. Find it.
17574      IFS_save="$IFS"
17575      IFS=:
17576      for p in $PATH; do
17577        if test -f "$p/$path" && test -x "$p/$path"; then
17578          new_path="$p/$path"
17579          break
17580        fi
17581      done
17582      IFS="$IFS_save"
17583    else
17584      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17585$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17586      new_path="$path"
17587    fi
17588
17589    if test "x$new_path" = x; then
17590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17591$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17592        has_space=`$ECHO "$complete" | $GREP " "`
17593        if test "x$has_space" != x; then
17594          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17595$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17596        fi
17597        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17598      fi
17599  fi
17600
17601      # Now join together the path and the arguments once again
17602      if test "x$arguments" != xEOL; then
17603        new_complete="$new_path ${arguments% *}"
17604      else
17605        new_complete="$new_path"
17606      fi
17607
17608  if test "x$complete" != "x$new_complete"; then
17609      BUILD_CXX="$new_complete"
17610      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17611$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17612    fi
17613
17614    # Extract the first word of "ld", so it can be a program name with args.
17615set dummy ld; ac_word=$2
17616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17617$as_echo_n "checking for $ac_word... " >&6; }
17618if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17619  $as_echo_n "(cached) " >&6
17620else
17621  case $BUILD_LD in
17622  [\\/]* | ?:[\\/]*)
17623  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17624  ;;
17625  *)
17626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17627for as_dir in $PATH
17628do
17629  IFS=$as_save_IFS
17630  test -z "$as_dir" && as_dir=.
17631    for ac_exec_ext in '' $ac_executable_extensions; do
17632  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17633    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17635    break 2
17636  fi
17637done
17638  done
17639IFS=$as_save_IFS
17640
17641  ;;
17642esac
17643fi
17644BUILD_LD=$ac_cv_path_BUILD_LD
17645if test -n "$BUILD_LD"; then
17646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17647$as_echo "$BUILD_LD" >&6; }
17648else
17649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17650$as_echo "no" >&6; }
17651fi
17652
17653
17654
17655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17656
17657  # First separate the path from the arguments. This will split at the first
17658  # space.
17659  complete="$BUILD_LD"
17660  path="${complete%% *}"
17661  tmp="$complete EOL"
17662  arguments="${tmp#* }"
17663
17664  # Input might be given as Windows format, start by converting to
17665  # unix format.
17666  new_path=`$CYGPATH -u "$path"`
17667
17668  # Now try to locate executable using which
17669  new_path=`$WHICH "$new_path" 2> /dev/null`
17670  # bat and cmd files are not always considered executable in cygwin causing which
17671  # to not find them
17672  if test "x$new_path" = x \
17673           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17674           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17675    new_path=`$CYGPATH -u "$path"`
17676  fi
17677  if test "x$new_path" = x; then
17678    # Oops. Which didn't find the executable.
17679    # The splitting of arguments from the executable at a space might have been incorrect,
17680    # since paths with space are more likely in Windows. Give it another try with the whole
17681    # argument.
17682    path="$complete"
17683    arguments="EOL"
17684    new_path=`$CYGPATH -u "$path"`
17685    new_path=`$WHICH "$new_path" 2> /dev/null`
17686    # bat and cmd files are not always considered executable in cygwin causing which
17687    # to not find them
17688    if test "x$new_path" = x \
17689             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17690             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17691      new_path=`$CYGPATH -u "$path"`
17692    fi
17693    if test "x$new_path" = x; then
17694      # It's still not found. Now this is an unrecoverable error.
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17696$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17697      has_space=`$ECHO "$complete" | $GREP " "`
17698      if test "x$has_space" != x; then
17699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17701      fi
17702      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17703    fi
17704  fi
17705
17706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17709  # "foo.exe" is OK but "foo" is an error.
17710  #
17711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17712  # It is also a way to make sure we got the proper file name for the real test later on.
17713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17714  if test "x$test_shortpath" = x; then
17715    # Short path failed, file does not exist as specified.
17716    # Try adding .exe or .cmd
17717    if test -f "${new_path}.exe"; then
17718       input_to_shortpath="${new_path}.exe"
17719    elif test -f "${new_path}.cmd"; then
17720       input_to_shortpath="${new_path}.cmd"
17721    else
17722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17723$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17724      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17725$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17726      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17727    fi
17728  else
17729    input_to_shortpath="$new_path"
17730  fi
17731
17732  # Call helper function which possibly converts this using DOS-style short mode.
17733  # If so, the updated path is stored in $new_path.
17734  new_path="$input_to_shortpath"
17735
17736  input_path="$input_to_shortpath"
17737  # Check if we need to convert this using DOS-style short mode. If the path
17738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17739  # take no chances and rewrite it.
17740  # Note: m4 eats our [], so we need to use [ and ] instead.
17741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17742  if test "x$has_forbidden_chars" != x; then
17743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17747      # Going to short mode and back again did indeed matter. Since short mode is
17748      # case insensitive, let's make it lowercase to improve readability.
17749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17750      # Now convert it back to Unix-stile (cygpath)
17751      input_path=`$CYGPATH -u "$shortmode_path"`
17752      new_path="$input_path"
17753    fi
17754  fi
17755
17756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17757  if test "x$test_cygdrive_prefix" = x; then
17758    # As a simple fix, exclude /usr/bin since it's not a real path.
17759    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17761      # a path prefixed by /cygdrive for fixpath to work.
17762      new_path="$CYGWIN_ROOT_PATH$input_path"
17763    fi
17764  fi
17765
17766  # remove trailing .exe if any
17767  new_path="${new_path/%.exe/}"
17768
17769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17770
17771  # First separate the path from the arguments. This will split at the first
17772  # space.
17773  complete="$BUILD_LD"
17774  path="${complete%% *}"
17775  tmp="$complete EOL"
17776  arguments="${tmp#* }"
17777
17778  # Input might be given as Windows format, start by converting to
17779  # unix format.
17780  new_path="$path"
17781
17782  windows_path="$new_path"
17783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17784    unix_path=`$CYGPATH -u "$windows_path"`
17785    new_path="$unix_path"
17786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17788    new_path="$unix_path"
17789  fi
17790
17791
17792  # Now try to locate executable using which
17793  new_path=`$WHICH "$new_path" 2> /dev/null`
17794
17795  if test "x$new_path" = x; then
17796    # Oops. Which didn't find the executable.
17797    # The splitting of arguments from the executable at a space might have been incorrect,
17798    # since paths with space are more likely in Windows. Give it another try with the whole
17799    # argument.
17800    path="$complete"
17801    arguments="EOL"
17802    new_path="$path"
17803
17804  windows_path="$new_path"
17805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17806    unix_path=`$CYGPATH -u "$windows_path"`
17807    new_path="$unix_path"
17808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17810    new_path="$unix_path"
17811  fi
17812
17813
17814    new_path=`$WHICH "$new_path" 2> /dev/null`
17815
17816    if test "x$new_path" = x; then
17817      # It's still not found. Now this is an unrecoverable error.
17818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17819$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17820      has_space=`$ECHO "$complete" | $GREP " "`
17821      if test "x$has_space" != x; then
17822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17824      fi
17825      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17826    fi
17827  fi
17828
17829  # Now new_path has a complete unix path to the binary
17830  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17831    # Keep paths in /bin as-is, but remove trailing .exe if any
17832    new_path="${new_path/%.exe/}"
17833    # Do not save /bin paths to all_fixpath_prefixes!
17834  else
17835    # Not in mixed or Windows style, start by that.
17836    new_path=`cmd //c echo $new_path`
17837
17838  input_path="$new_path"
17839  # Check if we need to convert this using DOS-style short mode. If the path
17840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17841  # take no chances and rewrite it.
17842  # Note: m4 eats our [], so we need to use [ and ] instead.
17843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17844  if test "x$has_forbidden_chars" != x; then
17845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17847  fi
17848
17849    # Output is in $new_path
17850
17851  windows_path="$new_path"
17852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17853    unix_path=`$CYGPATH -u "$windows_path"`
17854    new_path="$unix_path"
17855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17857    new_path="$unix_path"
17858  fi
17859
17860    # remove trailing .exe if any
17861    new_path="${new_path/%.exe/}"
17862
17863    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17864    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17865  fi
17866
17867  else
17868    # We're on a posix platform. Hooray! :)
17869    # First separate the path from the arguments. This will split at the first
17870    # space.
17871    complete="$BUILD_LD"
17872    path="${complete%% *}"
17873    tmp="$complete EOL"
17874    arguments="${tmp#* }"
17875
17876    # Cannot rely on the command "which" here since it doesn't always work.
17877    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17878    if test -z "$is_absolute_path"; then
17879      # Path to executable is not absolute. Find it.
17880      IFS_save="$IFS"
17881      IFS=:
17882      for p in $PATH; do
17883        if test -f "$p/$path" && test -x "$p/$path"; then
17884          new_path="$p/$path"
17885          break
17886        fi
17887      done
17888      IFS="$IFS_save"
17889    else
17890      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17891$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17892      new_path="$path"
17893    fi
17894
17895    if test "x$new_path" = x; then
17896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17897$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17898        has_space=`$ECHO "$complete" | $GREP " "`
17899        if test "x$has_space" != x; then
17900          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17901$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17902        fi
17903        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17904      fi
17905  fi
17906
17907      # Now join together the path and the arguments once again
17908      if test "x$arguments" != xEOL; then
17909        new_complete="$new_path ${arguments% *}"
17910      else
17911        new_complete="$new_path"
17912      fi
17913
17914  if test "x$complete" != "x$new_complete"; then
17915      BUILD_LD="$new_complete"
17916      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17917$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17918    fi
17919
17920fi
17921
17922
17923
17924
17925# If a devkit is found on the builddeps server, then prepend its path to the
17926# PATH variable. If there are cross compilers available in the devkit, these
17927# will be found by AC_PROG_CC et al.
17928DEVKIT=
17929
17930
17931    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17932        # Source the builddeps file again, to make sure it uses the latest variables!
17933        . $builddepsfile
17934        # Look for a target and build machine specific resource!
17935        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17936        if test "x$resource" = x; then
17937            # Ok, lets instead look for a target specific resource
17938            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17939        fi
17940        if test "x$resource" = x; then
17941            # Ok, lets instead look for a build specific resource
17942            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17943        fi
17944        if test "x$resource" = x; then
17945            # Ok, lets instead look for a generic resource
17946            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17947            resource=${builddep_devkit}
17948        fi
17949        if test "x$resource" != x; then
17950            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17951$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17952	    # If the resource in the builddeps.conf file is an existing directory,
17953	    # for example /java/linux/cups
17954	    if test -d ${resource}; then
17955	       depdir=${resource}
17956	    else
17957
17958# devkit is for example mymodule
17959# $resource is for example libs/general/libmymod_1_2_3.zip
17960# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17961# $with_builddeps_dir is for example /localhome/builddeps
17962# depdir is the name of the variable into which we store the depdir, eg MYMOD
17963# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17964# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17965    filename=`basename $resource`
17966    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17967    filebase=${filename%%.*}
17968    extension=${filename#*.}
17969    installdir=$with_builddeps_dir/$filebase
17970    if test ! -f $installdir/$filename.unpacked; then
17971        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17972$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17973        if test ! -d $installdir; then
17974            mkdir -p $installdir
17975        fi
17976        if test ! -d $installdir; then
17977            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17978        fi
17979        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17980        touch $tmpfile
17981        if test ! -f $tmpfile; then
17982            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17983        fi
17984
17985    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17986    # $tmpfile is the local file name for the downloaded file.
17987    VALID_TOOL=no
17988    if test "x$BDEPS_FTP" = xwget; then
17989       VALID_TOOL=yes
17990       wget -O $tmpfile $with_builddeps_server/$resource
17991    fi
17992    if test "x$BDEPS_FTP" = xlftp; then
17993       VALID_TOOL=yes
17994       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17995    fi
17996    if test "x$BDEPS_FTP" = xftp; then
17997        VALID_TOOL=yes
17998        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17999        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18000        FTPUSERPWD=${FTPSERVER%%@*}
18001        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18002            FTPUSER=${userpwd%%:*}
18003            FTPPWD=${userpwd#*@}
18004            FTPSERVER=${FTPSERVER#*@}
18005        else
18006            FTPUSER=ftp
18007            FTPPWD=ftp
18008        fi
18009        # the "pass" command does not work on some
18010        # ftp clients (read ftp.exe) but if it works,
18011        # passive mode is better!
18012        (\
18013            echo "user $FTPUSER $FTPPWD"        ;\
18014            echo "pass"                         ;\
18015            echo "bin"                          ;\
18016            echo "get $FTPPATH $tmpfile"              ;\
18017        ) | ftp -in $FTPSERVER
18018    fi
18019    if test "x$VALID_TOOL" != xyes; then
18020       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18021    fi
18022
18023        mv $tmpfile $installdir/$filename
18024        if test ! -s $installdir/$filename; then
18025            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18026        fi
18027        case "$extension" in
18028            zip)  echo "Unzipping $installdir/$filename..."
18029               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18030            ;;
18031            tar.gz) echo "Untaring $installdir/$filename..."
18032               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18033            ;;
18034            tgz) echo "Untaring $installdir/$filename..."
18035               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18036            ;;
18037            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18038            ;;
18039        esac
18040    fi
18041    if test -f $installdir/$filename.unpacked; then
18042        depdir=$installdir
18043    fi
18044
18045	    fi
18046            # Source the builddeps file again, because in the previous command, the depdir
18047            # was updated to point at the current build dependency install directory.
18048            . $builddepsfile
18049            # Now extract variables from the builddeps.conf files.
18050            theroot=${builddep_devkit_ROOT}
18051            thecflags=${builddep_devkit_CFLAGS}
18052            thelibs=${builddep_devkit_LIBS}
18053            if test "x$depdir" = x; then
18054                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18055            fi
18056            DEVKIT=$depdir
18057            if test "x$theroot" != x; then
18058               DEVKIT="$theroot"
18059            fi
18060            if test "x$thecflags" != x; then
18061               DEVKIT_CFLAGS="$thecflags"
18062            fi
18063            if test "x$thelibs" != x; then
18064               DEVKIT_LIBS="$thelibs"
18065            fi
18066            # Found devkit
18067                     PATH="$DEVKIT/bin:$PATH"
18068                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18069                     if test "x$x_includes" = "xNONE"; then
18070                         x_includes="$SYS_ROOT/usr/include/X11"
18071                     fi
18072                     if test "x$x_libraries" = "xNONE"; then
18073                         x_libraries="$SYS_ROOT/usr/lib"
18074                     fi
18075
18076
18077        fi
18078
18079    fi
18080
18081
18082if test "x$SYS_ROOT" != "x/" ; then
18083    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18084    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18085    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18086    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18087    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18088    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18089fi
18090
18091# Store the CFLAGS etal passed to the configure script.
18092ORG_CFLAGS="$CFLAGS"
18093ORG_CXXFLAGS="$CXXFLAGS"
18094ORG_OBJCFLAGS="$OBJCFLAGS"
18095
18096# autoconf magic only relies on PATH, so update it if tools dir is specified
18097OLD_PATH="$PATH"
18098if test "x$TOOLS_DIR" != x; then
18099  PATH=$TOOLS_DIR:$PATH
18100fi
18101
18102
18103### Locate C compiler (CC)
18104
18105# On windows, only cl.exe is supported.
18106# On Solaris, cc is preferred to gcc.
18107# Elsewhere, gcc is preferred to cc.
18108
18109if test "x$CC" != x; then
18110  COMPILER_CHECK_LIST="$CC"
18111elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18112  COMPILER_CHECK_LIST="cl"
18113elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18114  COMPILER_CHECK_LIST="cc gcc"
18115else
18116  COMPILER_CHECK_LIST="gcc cc"
18117fi
18118
18119
18120  COMPILER_NAME=C
18121
18122  CC=
18123  # If TOOLS_DIR is set, check for all compiler names in there first
18124  # before checking the rest of the PATH.
18125  if test -n "$TOOLS_DIR"; then
18126    PATH_save="$PATH"
18127    PATH="$TOOLS_DIR"
18128    for ac_prog in $COMPILER_CHECK_LIST
18129do
18130  # Extract the first word of "$ac_prog", so it can be a program name with args.
18131set dummy $ac_prog; ac_word=$2
18132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18133$as_echo_n "checking for $ac_word... " >&6; }
18134if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18135  $as_echo_n "(cached) " >&6
18136else
18137  case $TOOLS_DIR_CC in
18138  [\\/]* | ?:[\\/]*)
18139  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18140  ;;
18141  *)
18142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18143for as_dir in $PATH
18144do
18145  IFS=$as_save_IFS
18146  test -z "$as_dir" && as_dir=.
18147    for ac_exec_ext in '' $ac_executable_extensions; do
18148  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18149    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18151    break 2
18152  fi
18153done
18154  done
18155IFS=$as_save_IFS
18156
18157  ;;
18158esac
18159fi
18160TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18161if test -n "$TOOLS_DIR_CC"; then
18162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18163$as_echo "$TOOLS_DIR_CC" >&6; }
18164else
18165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18166$as_echo "no" >&6; }
18167fi
18168
18169
18170  test -n "$TOOLS_DIR_CC" && break
18171done
18172
18173    CC=$TOOLS_DIR_CC
18174    PATH="$PATH_save"
18175  fi
18176
18177  # AC_PATH_PROGS can't be run multiple times with the same variable,
18178  # so create a new name for this run.
18179  if test "x$CC" = x; then
18180    for ac_prog in $COMPILER_CHECK_LIST
18181do
18182  # Extract the first word of "$ac_prog", so it can be a program name with args.
18183set dummy $ac_prog; ac_word=$2
18184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18185$as_echo_n "checking for $ac_word... " >&6; }
18186if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18187  $as_echo_n "(cached) " >&6
18188else
18189  case $POTENTIAL_CC in
18190  [\\/]* | ?:[\\/]*)
18191  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18192  ;;
18193  *)
18194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18195for as_dir in $PATH
18196do
18197  IFS=$as_save_IFS
18198  test -z "$as_dir" && as_dir=.
18199    for ac_exec_ext in '' $ac_executable_extensions; do
18200  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18201    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18203    break 2
18204  fi
18205done
18206  done
18207IFS=$as_save_IFS
18208
18209  ;;
18210esac
18211fi
18212POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18213if test -n "$POTENTIAL_CC"; then
18214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18215$as_echo "$POTENTIAL_CC" >&6; }
18216else
18217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18218$as_echo "no" >&6; }
18219fi
18220
18221
18222  test -n "$POTENTIAL_CC" && break
18223done
18224
18225    CC=$POTENTIAL_CC
18226  fi
18227
18228  if test "x$CC" = x; then
18229
18230    # Print a helpful message on how to acquire the necessary build dependency.
18231    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18232    MISSING_DEPENDENCY=devkit
18233    PKGHANDLER_COMMAND=
18234
18235    case $PKGHANDLER in
18236	apt-get)
18237                apt_help     $MISSING_DEPENDENCY ;;
18238    yum)
18239                yum_help     $MISSING_DEPENDENCY ;;
18240	port)
18241                port_help    $MISSING_DEPENDENCY ;;
18242	pkgutil)
18243                pkgutil_help $MISSING_DEPENDENCY ;;
18244	pkgadd)
18245                pkgadd_help  $MISSING_DEPENDENCY ;;
18246    * )
18247      break ;;
18248    esac
18249
18250    if test "x$PKGHANDLER_COMMAND" != x; then
18251        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18252    fi
18253
18254      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18255  fi
18256
18257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18258
18259  # First separate the path from the arguments. This will split at the first
18260  # space.
18261  complete="$CC"
18262  path="${complete%% *}"
18263  tmp="$complete EOL"
18264  arguments="${tmp#* }"
18265
18266  # Input might be given as Windows format, start by converting to
18267  # unix format.
18268  new_path=`$CYGPATH -u "$path"`
18269
18270  # Now try to locate executable using which
18271  new_path=`$WHICH "$new_path" 2> /dev/null`
18272  # bat and cmd files are not always considered executable in cygwin causing which
18273  # to not find them
18274  if test "x$new_path" = x \
18275           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18276           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18277    new_path=`$CYGPATH -u "$path"`
18278  fi
18279  if test "x$new_path" = x; then
18280    # Oops. Which didn't find the executable.
18281    # The splitting of arguments from the executable at a space might have been incorrect,
18282    # since paths with space are more likely in Windows. Give it another try with the whole
18283    # argument.
18284    path="$complete"
18285    arguments="EOL"
18286    new_path=`$CYGPATH -u "$path"`
18287    new_path=`$WHICH "$new_path" 2> /dev/null`
18288    # bat and cmd files are not always considered executable in cygwin causing which
18289    # to not find them
18290    if test "x$new_path" = x \
18291             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18292             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18293      new_path=`$CYGPATH -u "$path"`
18294    fi
18295    if test "x$new_path" = x; then
18296      # It's still not found. Now this is an unrecoverable error.
18297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18298$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18299      has_space=`$ECHO "$complete" | $GREP " "`
18300      if test "x$has_space" != x; then
18301        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18302$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18303      fi
18304      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18305    fi
18306  fi
18307
18308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18311  # "foo.exe" is OK but "foo" is an error.
18312  #
18313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18314  # It is also a way to make sure we got the proper file name for the real test later on.
18315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18316  if test "x$test_shortpath" = x; then
18317    # Short path failed, file does not exist as specified.
18318    # Try adding .exe or .cmd
18319    if test -f "${new_path}.exe"; then
18320       input_to_shortpath="${new_path}.exe"
18321    elif test -f "${new_path}.cmd"; then
18322       input_to_shortpath="${new_path}.cmd"
18323    else
18324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18325$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18326      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18327$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18328      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18329    fi
18330  else
18331    input_to_shortpath="$new_path"
18332  fi
18333
18334  # Call helper function which possibly converts this using DOS-style short mode.
18335  # If so, the updated path is stored in $new_path.
18336  new_path="$input_to_shortpath"
18337
18338  input_path="$input_to_shortpath"
18339  # Check if we need to convert this using DOS-style short mode. If the path
18340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18341  # take no chances and rewrite it.
18342  # Note: m4 eats our [], so we need to use [ and ] instead.
18343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18344  if test "x$has_forbidden_chars" != x; then
18345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18349      # Going to short mode and back again did indeed matter. Since short mode is
18350      # case insensitive, let's make it lowercase to improve readability.
18351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18352      # Now convert it back to Unix-stile (cygpath)
18353      input_path=`$CYGPATH -u "$shortmode_path"`
18354      new_path="$input_path"
18355    fi
18356  fi
18357
18358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18359  if test "x$test_cygdrive_prefix" = x; then
18360    # As a simple fix, exclude /usr/bin since it's not a real path.
18361    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18363      # a path prefixed by /cygdrive for fixpath to work.
18364      new_path="$CYGWIN_ROOT_PATH$input_path"
18365    fi
18366  fi
18367
18368  # remove trailing .exe if any
18369  new_path="${new_path/%.exe/}"
18370
18371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18372
18373  # First separate the path from the arguments. This will split at the first
18374  # space.
18375  complete="$CC"
18376  path="${complete%% *}"
18377  tmp="$complete EOL"
18378  arguments="${tmp#* }"
18379
18380  # Input might be given as Windows format, start by converting to
18381  # unix format.
18382  new_path="$path"
18383
18384  windows_path="$new_path"
18385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18386    unix_path=`$CYGPATH -u "$windows_path"`
18387    new_path="$unix_path"
18388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18390    new_path="$unix_path"
18391  fi
18392
18393
18394  # Now try to locate executable using which
18395  new_path=`$WHICH "$new_path" 2> /dev/null`
18396
18397  if test "x$new_path" = x; then
18398    # Oops. Which didn't find the executable.
18399    # The splitting of arguments from the executable at a space might have been incorrect,
18400    # since paths with space are more likely in Windows. Give it another try with the whole
18401    # argument.
18402    path="$complete"
18403    arguments="EOL"
18404    new_path="$path"
18405
18406  windows_path="$new_path"
18407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18408    unix_path=`$CYGPATH -u "$windows_path"`
18409    new_path="$unix_path"
18410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18412    new_path="$unix_path"
18413  fi
18414
18415
18416    new_path=`$WHICH "$new_path" 2> /dev/null`
18417
18418    if test "x$new_path" = x; then
18419      # It's still not found. Now this is an unrecoverable error.
18420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18421$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18422      has_space=`$ECHO "$complete" | $GREP " "`
18423      if test "x$has_space" != x; then
18424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18426      fi
18427      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18428    fi
18429  fi
18430
18431  # Now new_path has a complete unix path to the binary
18432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18433    # Keep paths in /bin as-is, but remove trailing .exe if any
18434    new_path="${new_path/%.exe/}"
18435    # Do not save /bin paths to all_fixpath_prefixes!
18436  else
18437    # Not in mixed or Windows style, start by that.
18438    new_path=`cmd //c echo $new_path`
18439
18440  input_path="$new_path"
18441  # Check if we need to convert this using DOS-style short mode. If the path
18442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18443  # take no chances and rewrite it.
18444  # Note: m4 eats our [], so we need to use [ and ] instead.
18445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18446  if test "x$has_forbidden_chars" != x; then
18447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18449  fi
18450
18451    # Output is in $new_path
18452
18453  windows_path="$new_path"
18454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18455    unix_path=`$CYGPATH -u "$windows_path"`
18456    new_path="$unix_path"
18457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18459    new_path="$unix_path"
18460  fi
18461
18462    # remove trailing .exe if any
18463    new_path="${new_path/%.exe/}"
18464
18465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18467  fi
18468
18469  else
18470    # We're on a posix platform. Hooray! :)
18471    # First separate the path from the arguments. This will split at the first
18472    # space.
18473    complete="$CC"
18474    path="${complete%% *}"
18475    tmp="$complete EOL"
18476    arguments="${tmp#* }"
18477
18478    # Cannot rely on the command "which" here since it doesn't always work.
18479    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18480    if test -z "$is_absolute_path"; then
18481      # Path to executable is not absolute. Find it.
18482      IFS_save="$IFS"
18483      IFS=:
18484      for p in $PATH; do
18485        if test -f "$p/$path" && test -x "$p/$path"; then
18486          new_path="$p/$path"
18487          break
18488        fi
18489      done
18490      IFS="$IFS_save"
18491    else
18492      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18493$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18494      new_path="$path"
18495    fi
18496
18497    if test "x$new_path" = x; then
18498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18499$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18500        has_space=`$ECHO "$complete" | $GREP " "`
18501        if test "x$has_space" != x; then
18502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18504        fi
18505        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18506      fi
18507  fi
18508
18509      # Now join together the path and the arguments once again
18510      if test "x$arguments" != xEOL; then
18511        new_complete="$new_path ${arguments% *}"
18512      else
18513        new_complete="$new_path"
18514      fi
18515
18516  if test "x$complete" != "x$new_complete"; then
18517      CC="$new_complete"
18518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18519$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18520    fi
18521
18522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18523$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18524  TEST_COMPILER="$CC"
18525
18526    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18527        # Follow a chain of symbolic links. Use readlink
18528        # where it exists, else fall back to horribly
18529        # complicated shell code.
18530        if test "x$READLINK_TESTED" != yes; then
18531            # On MacOSX there is a readlink tool with a different
18532            # purpose than the GNU readlink tool. Check the found readlink.
18533            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18534            if test "x$ISGNU" = x; then
18535                 # A readlink that we do not know how to use.
18536                 # Are there other non-GNU readlinks out there?
18537                 READLINK_TESTED=yes
18538                 READLINK=
18539            fi
18540        fi
18541
18542        if test "x$READLINK" != x; then
18543            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18544        else
18545            # Save the current directory for restoring afterwards
18546            STARTDIR=$PWD
18547            COUNTER=0
18548            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18549            sym_link_file=`$BASENAME $TEST_COMPILER`
18550            # Use the system pwd and not the shell builtin to resolve directory symlinks
18551            cd $sym_link_dir
18552            cd `$THEPWDCMD`
18553            sym_link_dir=`$THEPWDCMD`
18554            # Resolve file symlinks
18555            while test $COUNTER -lt 20; do
18556                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18557                if test "x$ISLINK" == x; then
18558                    # This is not a symbolic link! We are done!
18559                    break
18560                fi
18561                # Again resolve directory symlinks since the target of the just found
18562                # link could be in a different directory
18563                cd `$DIRNAME $ISLINK`
18564                sym_link_dir=`$THEPWDCMD`
18565                sym_link_file=`$BASENAME $ISLINK`
18566                let COUNTER=COUNTER+1
18567            done
18568            cd $STARTDIR
18569            TEST_COMPILER=$sym_link_dir/$sym_link_file
18570        fi
18571    fi
18572
18573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18574$as_echo "$TEST_COMPILER" >&6; }
18575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18576$as_echo_n "checking if CC is disguised ccache... " >&6; }
18577
18578  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18579  if test "x$COMPILER_BASENAME" = "xccache"; then
18580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18581$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18582    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18583    # We want to control ccache invocation ourselves, so ignore this cc and try
18584    # searching again.
18585
18586    # Remove the path to the fake ccache cc from the PATH
18587    RETRY_COMPILER_SAVED_PATH="$PATH"
18588    COMPILER_DIRNAME=`$DIRNAME $CC`
18589    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18590
18591    # Try again looking for our compiler
18592    if test -n "$ac_tool_prefix"; then
18593  for ac_prog in $COMPILER_CHECK_LIST
18594  do
18595    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18596set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18598$as_echo_n "checking for $ac_word... " >&6; }
18599if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18600  $as_echo_n "(cached) " >&6
18601else
18602  if test -n "$PROPER_COMPILER_CC"; then
18603  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18604else
18605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18606for as_dir in $PATH
18607do
18608  IFS=$as_save_IFS
18609  test -z "$as_dir" && as_dir=.
18610    for ac_exec_ext in '' $ac_executable_extensions; do
18611  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18612    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18614    break 2
18615  fi
18616done
18617  done
18618IFS=$as_save_IFS
18619
18620fi
18621fi
18622PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18623if test -n "$PROPER_COMPILER_CC"; then
18624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18625$as_echo "$PROPER_COMPILER_CC" >&6; }
18626else
18627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18628$as_echo "no" >&6; }
18629fi
18630
18631
18632    test -n "$PROPER_COMPILER_CC" && break
18633  done
18634fi
18635if test -z "$PROPER_COMPILER_CC"; then
18636  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18637  for ac_prog in $COMPILER_CHECK_LIST
18638do
18639  # Extract the first word of "$ac_prog", so it can be a program name with args.
18640set dummy $ac_prog; ac_word=$2
18641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18642$as_echo_n "checking for $ac_word... " >&6; }
18643if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18644  $as_echo_n "(cached) " >&6
18645else
18646  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18647  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18648else
18649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18650for as_dir in $PATH
18651do
18652  IFS=$as_save_IFS
18653  test -z "$as_dir" && as_dir=.
18654    for ac_exec_ext in '' $ac_executable_extensions; do
18655  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18656    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18658    break 2
18659  fi
18660done
18661  done
18662IFS=$as_save_IFS
18663
18664fi
18665fi
18666ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18667if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18669$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18670else
18671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18672$as_echo "no" >&6; }
18673fi
18674
18675
18676  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18677done
18678
18679  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18680    PROPER_COMPILER_CC=""
18681  else
18682    case $cross_compiling:$ac_tool_warned in
18683yes:)
18684{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18685$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18686ac_tool_warned=yes ;;
18687esac
18688    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18689  fi
18690fi
18691
18692
18693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18694
18695  # First separate the path from the arguments. This will split at the first
18696  # space.
18697  complete="$PROPER_COMPILER_CC"
18698  path="${complete%% *}"
18699  tmp="$complete EOL"
18700  arguments="${tmp#* }"
18701
18702  # Input might be given as Windows format, start by converting to
18703  # unix format.
18704  new_path=`$CYGPATH -u "$path"`
18705
18706  # Now try to locate executable using which
18707  new_path=`$WHICH "$new_path" 2> /dev/null`
18708  # bat and cmd files are not always considered executable in cygwin causing which
18709  # to not find them
18710  if test "x$new_path" = x \
18711           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18712           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18713    new_path=`$CYGPATH -u "$path"`
18714  fi
18715  if test "x$new_path" = x; then
18716    # Oops. Which didn't find the executable.
18717    # The splitting of arguments from the executable at a space might have been incorrect,
18718    # since paths with space are more likely in Windows. Give it another try with the whole
18719    # argument.
18720    path="$complete"
18721    arguments="EOL"
18722    new_path=`$CYGPATH -u "$path"`
18723    new_path=`$WHICH "$new_path" 2> /dev/null`
18724    # bat and cmd files are not always considered executable in cygwin causing which
18725    # to not find them
18726    if test "x$new_path" = x \
18727             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18728             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18729      new_path=`$CYGPATH -u "$path"`
18730    fi
18731    if test "x$new_path" = x; then
18732      # It's still not found. Now this is an unrecoverable error.
18733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18734$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18735      has_space=`$ECHO "$complete" | $GREP " "`
18736      if test "x$has_space" != x; then
18737        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18738$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18739      fi
18740      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18741    fi
18742  fi
18743
18744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18747  # "foo.exe" is OK but "foo" is an error.
18748  #
18749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18750  # It is also a way to make sure we got the proper file name for the real test later on.
18751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18752  if test "x$test_shortpath" = x; then
18753    # Short path failed, file does not exist as specified.
18754    # Try adding .exe or .cmd
18755    if test -f "${new_path}.exe"; then
18756       input_to_shortpath="${new_path}.exe"
18757    elif test -f "${new_path}.cmd"; then
18758       input_to_shortpath="${new_path}.cmd"
18759    else
18760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18761$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18762      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18763$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18764      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18765    fi
18766  else
18767    input_to_shortpath="$new_path"
18768  fi
18769
18770  # Call helper function which possibly converts this using DOS-style short mode.
18771  # If so, the updated path is stored in $new_path.
18772  new_path="$input_to_shortpath"
18773
18774  input_path="$input_to_shortpath"
18775  # Check if we need to convert this using DOS-style short mode. If the path
18776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18777  # take no chances and rewrite it.
18778  # Note: m4 eats our [], so we need to use [ and ] instead.
18779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18780  if test "x$has_forbidden_chars" != x; then
18781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18785      # Going to short mode and back again did indeed matter. Since short mode is
18786      # case insensitive, let's make it lowercase to improve readability.
18787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18788      # Now convert it back to Unix-stile (cygpath)
18789      input_path=`$CYGPATH -u "$shortmode_path"`
18790      new_path="$input_path"
18791    fi
18792  fi
18793
18794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18795  if test "x$test_cygdrive_prefix" = x; then
18796    # As a simple fix, exclude /usr/bin since it's not a real path.
18797    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18799      # a path prefixed by /cygdrive for fixpath to work.
18800      new_path="$CYGWIN_ROOT_PATH$input_path"
18801    fi
18802  fi
18803
18804  # remove trailing .exe if any
18805  new_path="${new_path/%.exe/}"
18806
18807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18808
18809  # First separate the path from the arguments. This will split at the first
18810  # space.
18811  complete="$PROPER_COMPILER_CC"
18812  path="${complete%% *}"
18813  tmp="$complete EOL"
18814  arguments="${tmp#* }"
18815
18816  # Input might be given as Windows format, start by converting to
18817  # unix format.
18818  new_path="$path"
18819
18820  windows_path="$new_path"
18821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18822    unix_path=`$CYGPATH -u "$windows_path"`
18823    new_path="$unix_path"
18824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18826    new_path="$unix_path"
18827  fi
18828
18829
18830  # Now try to locate executable using which
18831  new_path=`$WHICH "$new_path" 2> /dev/null`
18832
18833  if test "x$new_path" = x; then
18834    # Oops. Which didn't find the executable.
18835    # The splitting of arguments from the executable at a space might have been incorrect,
18836    # since paths with space are more likely in Windows. Give it another try with the whole
18837    # argument.
18838    path="$complete"
18839    arguments="EOL"
18840    new_path="$path"
18841
18842  windows_path="$new_path"
18843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18844    unix_path=`$CYGPATH -u "$windows_path"`
18845    new_path="$unix_path"
18846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18848    new_path="$unix_path"
18849  fi
18850
18851
18852    new_path=`$WHICH "$new_path" 2> /dev/null`
18853
18854    if test "x$new_path" = x; then
18855      # It's still not found. Now this is an unrecoverable error.
18856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18857$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18858      has_space=`$ECHO "$complete" | $GREP " "`
18859      if test "x$has_space" != x; then
18860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18862      fi
18863      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18864    fi
18865  fi
18866
18867  # Now new_path has a complete unix path to the binary
18868  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18869    # Keep paths in /bin as-is, but remove trailing .exe if any
18870    new_path="${new_path/%.exe/}"
18871    # Do not save /bin paths to all_fixpath_prefixes!
18872  else
18873    # Not in mixed or Windows style, start by that.
18874    new_path=`cmd //c echo $new_path`
18875
18876  input_path="$new_path"
18877  # Check if we need to convert this using DOS-style short mode. If the path
18878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18879  # take no chances and rewrite it.
18880  # Note: m4 eats our [], so we need to use [ and ] instead.
18881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18882  if test "x$has_forbidden_chars" != x; then
18883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18885  fi
18886
18887    # Output is in $new_path
18888
18889  windows_path="$new_path"
18890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18891    unix_path=`$CYGPATH -u "$windows_path"`
18892    new_path="$unix_path"
18893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18895    new_path="$unix_path"
18896  fi
18897
18898    # remove trailing .exe if any
18899    new_path="${new_path/%.exe/}"
18900
18901    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18902    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18903  fi
18904
18905  else
18906    # We're on a posix platform. Hooray! :)
18907    # First separate the path from the arguments. This will split at the first
18908    # space.
18909    complete="$PROPER_COMPILER_CC"
18910    path="${complete%% *}"
18911    tmp="$complete EOL"
18912    arguments="${tmp#* }"
18913
18914    # Cannot rely on the command "which" here since it doesn't always work.
18915    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18916    if test -z "$is_absolute_path"; then
18917      # Path to executable is not absolute. Find it.
18918      IFS_save="$IFS"
18919      IFS=:
18920      for p in $PATH; do
18921        if test -f "$p/$path" && test -x "$p/$path"; then
18922          new_path="$p/$path"
18923          break
18924        fi
18925      done
18926      IFS="$IFS_save"
18927    else
18928      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18929$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18930      new_path="$path"
18931    fi
18932
18933    if test "x$new_path" = x; then
18934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18935$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18936        has_space=`$ECHO "$complete" | $GREP " "`
18937        if test "x$has_space" != x; then
18938          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18939$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18940        fi
18941        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18942      fi
18943  fi
18944
18945      # Now join together the path and the arguments once again
18946      if test "x$arguments" != xEOL; then
18947        new_complete="$new_path ${arguments% *}"
18948      else
18949        new_complete="$new_path"
18950      fi
18951
18952  if test "x$complete" != "x$new_complete"; then
18953      PROPER_COMPILER_CC="$new_complete"
18954      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18955$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18956    fi
18957
18958    PATH="$RETRY_COMPILER_SAVED_PATH"
18959
18960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18961$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18962
18963    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18964        # Follow a chain of symbolic links. Use readlink
18965        # where it exists, else fall back to horribly
18966        # complicated shell code.
18967        if test "x$READLINK_TESTED" != yes; then
18968            # On MacOSX there is a readlink tool with a different
18969            # purpose than the GNU readlink tool. Check the found readlink.
18970            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18971            if test "x$ISGNU" = x; then
18972                 # A readlink that we do not know how to use.
18973                 # Are there other non-GNU readlinks out there?
18974                 READLINK_TESTED=yes
18975                 READLINK=
18976            fi
18977        fi
18978
18979        if test "x$READLINK" != x; then
18980            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18981        else
18982            # Save the current directory for restoring afterwards
18983            STARTDIR=$PWD
18984            COUNTER=0
18985            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18986            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18987            # Use the system pwd and not the shell builtin to resolve directory symlinks
18988            cd $sym_link_dir
18989            cd `$THEPWDCMD`
18990            sym_link_dir=`$THEPWDCMD`
18991            # Resolve file symlinks
18992            while test $COUNTER -lt 20; do
18993                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18994                if test "x$ISLINK" == x; then
18995                    # This is not a symbolic link! We are done!
18996                    break
18997                fi
18998                # Again resolve directory symlinks since the target of the just found
18999                # link could be in a different directory
19000                cd `$DIRNAME $ISLINK`
19001                sym_link_dir=`$THEPWDCMD`
19002                sym_link_file=`$BASENAME $ISLINK`
19003                let COUNTER=COUNTER+1
19004            done
19005            cd $STARTDIR
19006            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19007        fi
19008    fi
19009
19010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19011$as_echo "$PROPER_COMPILER_CC" >&6; }
19012    CC="$PROPER_COMPILER_CC"
19013  else
19014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19015$as_echo "no, keeping CC" >&6; }
19016    CC="$TEST_COMPILER"
19017  fi
19018
19019  COMPILER=$CC
19020  COMPILER_NAME=$COMPILER_NAME
19021
19022  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19023    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19024    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19025    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19026    if test $? -ne 0; then
19027      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19028
19029      { $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
19030$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19031      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19032$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19033      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19034    else
19035      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19036      COMPILER_VENDOR="Sun Studio"
19037    fi
19038  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19039    # First line typically looks something like:
19040    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19041    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19042    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19043    COMPILER_VENDOR="Microsoft CL.EXE"
19044    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19045    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19046      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19047        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19048      fi
19049    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19050      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19051        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19052      fi
19053    fi
19054  else
19055    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19056    # Check that this is likely to be GCC.
19057    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19058    if test $? -ne 0; then
19059      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19060$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19061      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19062$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19063      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19064    fi
19065
19066    # First line typically looks something like:
19067    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19068    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19069    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19070  fi
19071  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19072  CC_VERSION="$COMPILER_VERSION"
19073  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19074  CC_VENDOR="$COMPILER_VENDOR"
19075
19076  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19077$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19078
19079
19080# Now that we have resolved CC ourself, let autoconf have its go at it
19081ac_ext=c
19082ac_cpp='$CPP $CPPFLAGS'
19083ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19084ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19085ac_compiler_gnu=$ac_cv_c_compiler_gnu
19086if test -n "$ac_tool_prefix"; then
19087  for ac_prog in $CC
19088  do
19089    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19092$as_echo_n "checking for $ac_word... " >&6; }
19093if test "${ac_cv_prog_CC+set}" = set; then :
19094  $as_echo_n "(cached) " >&6
19095else
19096  if test -n "$CC"; then
19097  ac_cv_prog_CC="$CC" # Let the user override the test.
19098else
19099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19100for as_dir in $PATH
19101do
19102  IFS=$as_save_IFS
19103  test -z "$as_dir" && as_dir=.
19104    for ac_exec_ext in '' $ac_executable_extensions; do
19105  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19106    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19108    break 2
19109  fi
19110done
19111  done
19112IFS=$as_save_IFS
19113
19114fi
19115fi
19116CC=$ac_cv_prog_CC
19117if test -n "$CC"; then
19118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19119$as_echo "$CC" >&6; }
19120else
19121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19122$as_echo "no" >&6; }
19123fi
19124
19125
19126    test -n "$CC" && break
19127  done
19128fi
19129if test -z "$CC"; then
19130  ac_ct_CC=$CC
19131  for ac_prog in $CC
19132do
19133  # Extract the first word of "$ac_prog", so it can be a program name with args.
19134set dummy $ac_prog; ac_word=$2
19135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19136$as_echo_n "checking for $ac_word... " >&6; }
19137if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19138  $as_echo_n "(cached) " >&6
19139else
19140  if test -n "$ac_ct_CC"; then
19141  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19142else
19143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19144for as_dir in $PATH
19145do
19146  IFS=$as_save_IFS
19147  test -z "$as_dir" && as_dir=.
19148    for ac_exec_ext in '' $ac_executable_extensions; do
19149  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19150    ac_cv_prog_ac_ct_CC="$ac_prog"
19151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19152    break 2
19153  fi
19154done
19155  done
19156IFS=$as_save_IFS
19157
19158fi
19159fi
19160ac_ct_CC=$ac_cv_prog_ac_ct_CC
19161if test -n "$ac_ct_CC"; then
19162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19163$as_echo "$ac_ct_CC" >&6; }
19164else
19165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19166$as_echo "no" >&6; }
19167fi
19168
19169
19170  test -n "$ac_ct_CC" && break
19171done
19172
19173  if test "x$ac_ct_CC" = x; then
19174    CC=""
19175  else
19176    case $cross_compiling:$ac_tool_warned in
19177yes:)
19178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19180ac_tool_warned=yes ;;
19181esac
19182    CC=$ac_ct_CC
19183  fi
19184fi
19185
19186
19187test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19189as_fn_error $? "no acceptable C compiler found in \$PATH
19190See \`config.log' for more details" "$LINENO" 5 ; }
19191
19192# Provide some information about the compiler.
19193$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19194set X $ac_compile
19195ac_compiler=$2
19196for ac_option in --version -v -V -qversion; do
19197  { { ac_try="$ac_compiler $ac_option >&5"
19198case "(($ac_try" in
19199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19200  *) ac_try_echo=$ac_try;;
19201esac
19202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19203$as_echo "$ac_try_echo"; } >&5
19204  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19205  ac_status=$?
19206  if test -s conftest.err; then
19207    sed '10a\
19208... rest of stderr output deleted ...
19209         10q' conftest.err >conftest.er1
19210    cat conftest.er1 >&5
19211  fi
19212  rm -f conftest.er1 conftest.err
19213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19214  test $ac_status = 0; }
19215done
19216
19217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19218/* end confdefs.h.  */
19219
19220int
19221main ()
19222{
19223
19224  ;
19225  return 0;
19226}
19227_ACEOF
19228ac_clean_files_save=$ac_clean_files
19229ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19230# Try to create an executable without -o first, disregard a.out.
19231# It will help us diagnose broken compilers, and finding out an intuition
19232# of exeext.
19233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19234$as_echo_n "checking whether the C compiler works... " >&6; }
19235ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19236
19237# The possible output files:
19238ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19239
19240ac_rmfiles=
19241for ac_file in $ac_files
19242do
19243  case $ac_file in
19244    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19245    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19246  esac
19247done
19248rm -f $ac_rmfiles
19249
19250if { { ac_try="$ac_link_default"
19251case "(($ac_try" in
19252  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19253  *) ac_try_echo=$ac_try;;
19254esac
19255eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19256$as_echo "$ac_try_echo"; } >&5
19257  (eval "$ac_link_default") 2>&5
19258  ac_status=$?
19259  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19260  test $ac_status = 0; }; then :
19261  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19262# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19263# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19264# so that the user can short-circuit this test for compilers unknown to
19265# Autoconf.
19266for ac_file in $ac_files ''
19267do
19268  test -f "$ac_file" || continue
19269  case $ac_file in
19270    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19271	;;
19272    [ab].out )
19273	# We found the default executable, but exeext='' is most
19274	# certainly right.
19275	break;;
19276    *.* )
19277	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19278	then :; else
19279	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19280	fi
19281	# We set ac_cv_exeext here because the later test for it is not
19282	# safe: cross compilers may not add the suffix if given an `-o'
19283	# argument, so we may need to know it at that point already.
19284	# Even if this section looks crufty: it has the advantage of
19285	# actually working.
19286	break;;
19287    * )
19288	break;;
19289  esac
19290done
19291test "$ac_cv_exeext" = no && ac_cv_exeext=
19292
19293else
19294  ac_file=''
19295fi
19296if test -z "$ac_file"; then :
19297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19298$as_echo "no" >&6; }
19299$as_echo "$as_me: failed program was:" >&5
19300sed 's/^/| /' conftest.$ac_ext >&5
19301
19302{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19303$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19304as_fn_error 77 "C compiler cannot create executables
19305See \`config.log' for more details" "$LINENO" 5 ; }
19306else
19307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19308$as_echo "yes" >&6; }
19309fi
19310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19311$as_echo_n "checking for C compiler default output file name... " >&6; }
19312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19313$as_echo "$ac_file" >&6; }
19314ac_exeext=$ac_cv_exeext
19315
19316rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19317ac_clean_files=$ac_clean_files_save
19318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19319$as_echo_n "checking for suffix of executables... " >&6; }
19320if { { ac_try="$ac_link"
19321case "(($ac_try" in
19322  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19323  *) ac_try_echo=$ac_try;;
19324esac
19325eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19326$as_echo "$ac_try_echo"; } >&5
19327  (eval "$ac_link") 2>&5
19328  ac_status=$?
19329  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19330  test $ac_status = 0; }; then :
19331  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19332# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19333# work properly (i.e., refer to `conftest.exe'), while it won't with
19334# `rm'.
19335for ac_file in conftest.exe conftest conftest.*; do
19336  test -f "$ac_file" || continue
19337  case $ac_file in
19338    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19339    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19340	  break;;
19341    * ) break;;
19342  esac
19343done
19344else
19345  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19347as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19348See \`config.log' for more details" "$LINENO" 5 ; }
19349fi
19350rm -f conftest conftest$ac_cv_exeext
19351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19352$as_echo "$ac_cv_exeext" >&6; }
19353
19354rm -f conftest.$ac_ext
19355EXEEXT=$ac_cv_exeext
19356ac_exeext=$EXEEXT
19357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19358/* end confdefs.h.  */
19359#include <stdio.h>
19360int
19361main ()
19362{
19363FILE *f = fopen ("conftest.out", "w");
19364 return ferror (f) || fclose (f) != 0;
19365
19366  ;
19367  return 0;
19368}
19369_ACEOF
19370ac_clean_files="$ac_clean_files conftest.out"
19371# Check that the compiler produces executables we can run.  If not, either
19372# the compiler is broken, or we cross compile.
19373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19374$as_echo_n "checking whether we are cross compiling... " >&6; }
19375if test "$cross_compiling" != yes; then
19376  { { ac_try="$ac_link"
19377case "(($ac_try" in
19378  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19379  *) ac_try_echo=$ac_try;;
19380esac
19381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19382$as_echo "$ac_try_echo"; } >&5
19383  (eval "$ac_link") 2>&5
19384  ac_status=$?
19385  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19386  test $ac_status = 0; }
19387  if { ac_try='./conftest$ac_cv_exeext'
19388  { { case "(($ac_try" in
19389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19390  *) ac_try_echo=$ac_try;;
19391esac
19392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19393$as_echo "$ac_try_echo"; } >&5
19394  (eval "$ac_try") 2>&5
19395  ac_status=$?
19396  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19397  test $ac_status = 0; }; }; then
19398    cross_compiling=no
19399  else
19400    if test "$cross_compiling" = maybe; then
19401	cross_compiling=yes
19402    else
19403	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19405as_fn_error $? "cannot run C compiled programs.
19406If you meant to cross compile, use \`--host'.
19407See \`config.log' for more details" "$LINENO" 5 ; }
19408    fi
19409  fi
19410fi
19411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19412$as_echo "$cross_compiling" >&6; }
19413
19414rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19415ac_clean_files=$ac_clean_files_save
19416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19417$as_echo_n "checking for suffix of object files... " >&6; }
19418if test "${ac_cv_objext+set}" = set; then :
19419  $as_echo_n "(cached) " >&6
19420else
19421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19422/* end confdefs.h.  */
19423
19424int
19425main ()
19426{
19427
19428  ;
19429  return 0;
19430}
19431_ACEOF
19432rm -f conftest.o conftest.obj
19433if { { ac_try="$ac_compile"
19434case "(($ac_try" in
19435  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19436  *) ac_try_echo=$ac_try;;
19437esac
19438eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19439$as_echo "$ac_try_echo"; } >&5
19440  (eval "$ac_compile") 2>&5
19441  ac_status=$?
19442  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19443  test $ac_status = 0; }; then :
19444  for ac_file in conftest.o conftest.obj conftest.*; do
19445  test -f "$ac_file" || continue;
19446  case $ac_file in
19447    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19448    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19449       break;;
19450  esac
19451done
19452else
19453  $as_echo "$as_me: failed program was:" >&5
19454sed 's/^/| /' conftest.$ac_ext >&5
19455
19456{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19458as_fn_error $? "cannot compute suffix of object files: cannot compile
19459See \`config.log' for more details" "$LINENO" 5 ; }
19460fi
19461rm -f conftest.$ac_cv_objext conftest.$ac_ext
19462fi
19463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19464$as_echo "$ac_cv_objext" >&6; }
19465OBJEXT=$ac_cv_objext
19466ac_objext=$OBJEXT
19467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19468$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19469if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19470  $as_echo_n "(cached) " >&6
19471else
19472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19473/* end confdefs.h.  */
19474
19475int
19476main ()
19477{
19478#ifndef __GNUC__
19479       choke me
19480#endif
19481
19482  ;
19483  return 0;
19484}
19485_ACEOF
19486if ac_fn_c_try_compile "$LINENO"; then :
19487  ac_compiler_gnu=yes
19488else
19489  ac_compiler_gnu=no
19490fi
19491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19492ac_cv_c_compiler_gnu=$ac_compiler_gnu
19493
19494fi
19495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19496$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19497if test $ac_compiler_gnu = yes; then
19498  GCC=yes
19499else
19500  GCC=
19501fi
19502ac_test_CFLAGS=${CFLAGS+set}
19503ac_save_CFLAGS=$CFLAGS
19504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19505$as_echo_n "checking whether $CC accepts -g... " >&6; }
19506if test "${ac_cv_prog_cc_g+set}" = set; then :
19507  $as_echo_n "(cached) " >&6
19508else
19509  ac_save_c_werror_flag=$ac_c_werror_flag
19510   ac_c_werror_flag=yes
19511   ac_cv_prog_cc_g=no
19512   CFLAGS="-g"
19513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19514/* end confdefs.h.  */
19515
19516int
19517main ()
19518{
19519
19520  ;
19521  return 0;
19522}
19523_ACEOF
19524if ac_fn_c_try_compile "$LINENO"; then :
19525  ac_cv_prog_cc_g=yes
19526else
19527  CFLAGS=""
19528      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19529/* end confdefs.h.  */
19530
19531int
19532main ()
19533{
19534
19535  ;
19536  return 0;
19537}
19538_ACEOF
19539if ac_fn_c_try_compile "$LINENO"; then :
19540
19541else
19542  ac_c_werror_flag=$ac_save_c_werror_flag
19543	 CFLAGS="-g"
19544	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19545/* end confdefs.h.  */
19546
19547int
19548main ()
19549{
19550
19551  ;
19552  return 0;
19553}
19554_ACEOF
19555if ac_fn_c_try_compile "$LINENO"; then :
19556  ac_cv_prog_cc_g=yes
19557fi
19558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19559fi
19560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19561fi
19562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19563   ac_c_werror_flag=$ac_save_c_werror_flag
19564fi
19565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19566$as_echo "$ac_cv_prog_cc_g" >&6; }
19567if test "$ac_test_CFLAGS" = set; then
19568  CFLAGS=$ac_save_CFLAGS
19569elif test $ac_cv_prog_cc_g = yes; then
19570  if test "$GCC" = yes; then
19571    CFLAGS="-g -O2"
19572  else
19573    CFLAGS="-g"
19574  fi
19575else
19576  if test "$GCC" = yes; then
19577    CFLAGS="-O2"
19578  else
19579    CFLAGS=
19580  fi
19581fi
19582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19583$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19584if test "${ac_cv_prog_cc_c89+set}" = set; then :
19585  $as_echo_n "(cached) " >&6
19586else
19587  ac_cv_prog_cc_c89=no
19588ac_save_CC=$CC
19589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19590/* end confdefs.h.  */
19591#include <stdarg.h>
19592#include <stdio.h>
19593#include <sys/types.h>
19594#include <sys/stat.h>
19595/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19596struct buf { int x; };
19597FILE * (*rcsopen) (struct buf *, struct stat *, int);
19598static char *e (p, i)
19599     char **p;
19600     int i;
19601{
19602  return p[i];
19603}
19604static char *f (char * (*g) (char **, int), char **p, ...)
19605{
19606  char *s;
19607  va_list v;
19608  va_start (v,p);
19609  s = g (p, va_arg (v,int));
19610  va_end (v);
19611  return s;
19612}
19613
19614/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19615   function prototypes and stuff, but not '\xHH' hex character constants.
19616   These don't provoke an error unfortunately, instead are silently treated
19617   as 'x'.  The following induces an error, until -std is added to get
19618   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19619   array size at least.  It's necessary to write '\x00'==0 to get something
19620   that's true only with -std.  */
19621int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19622
19623/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19624   inside strings and character constants.  */
19625#define FOO(x) 'x'
19626int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19627
19628int test (int i, double x);
19629struct s1 {int (*f) (int a);};
19630struct s2 {int (*f) (double a);};
19631int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19632int argc;
19633char **argv;
19634int
19635main ()
19636{
19637return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19638  ;
19639  return 0;
19640}
19641_ACEOF
19642for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19643	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19644do
19645  CC="$ac_save_CC $ac_arg"
19646  if ac_fn_c_try_compile "$LINENO"; then :
19647  ac_cv_prog_cc_c89=$ac_arg
19648fi
19649rm -f core conftest.err conftest.$ac_objext
19650  test "x$ac_cv_prog_cc_c89" != "xno" && break
19651done
19652rm -f conftest.$ac_ext
19653CC=$ac_save_CC
19654
19655fi
19656# AC_CACHE_VAL
19657case "x$ac_cv_prog_cc_c89" in
19658  x)
19659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19660$as_echo "none needed" >&6; } ;;
19661  xno)
19662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19663$as_echo "unsupported" >&6; } ;;
19664  *)
19665    CC="$CC $ac_cv_prog_cc_c89"
19666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19667$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19668esac
19669if test "x$ac_cv_prog_cc_c89" != xno; then :
19670
19671fi
19672
19673ac_ext=cpp
19674ac_cpp='$CXXCPP $CPPFLAGS'
19675ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19676ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19677ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19678
19679
19680### Locate C++ compiler (CXX)
19681
19682if test "x$CXX" != x; then
19683  COMPILER_CHECK_LIST="$CXX"
19684elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19685  COMPILER_CHECK_LIST="cl"
19686elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19687  COMPILER_CHECK_LIST="CC g++"
19688else
19689  COMPILER_CHECK_LIST="g++ CC"
19690fi
19691
19692
19693  COMPILER_NAME=C++
19694
19695  CXX=
19696  # If TOOLS_DIR is set, check for all compiler names in there first
19697  # before checking the rest of the PATH.
19698  if test -n "$TOOLS_DIR"; then
19699    PATH_save="$PATH"
19700    PATH="$TOOLS_DIR"
19701    for ac_prog in $COMPILER_CHECK_LIST
19702do
19703  # Extract the first word of "$ac_prog", so it can be a program name with args.
19704set dummy $ac_prog; ac_word=$2
19705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19706$as_echo_n "checking for $ac_word... " >&6; }
19707if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19708  $as_echo_n "(cached) " >&6
19709else
19710  case $TOOLS_DIR_CXX in
19711  [\\/]* | ?:[\\/]*)
19712  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19713  ;;
19714  *)
19715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19716for as_dir in $PATH
19717do
19718  IFS=$as_save_IFS
19719  test -z "$as_dir" && as_dir=.
19720    for ac_exec_ext in '' $ac_executable_extensions; do
19721  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19722    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19724    break 2
19725  fi
19726done
19727  done
19728IFS=$as_save_IFS
19729
19730  ;;
19731esac
19732fi
19733TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19734if test -n "$TOOLS_DIR_CXX"; then
19735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19736$as_echo "$TOOLS_DIR_CXX" >&6; }
19737else
19738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19739$as_echo "no" >&6; }
19740fi
19741
19742
19743  test -n "$TOOLS_DIR_CXX" && break
19744done
19745
19746    CXX=$TOOLS_DIR_CXX
19747    PATH="$PATH_save"
19748  fi
19749
19750  # AC_PATH_PROGS can't be run multiple times with the same variable,
19751  # so create a new name for this run.
19752  if test "x$CXX" = x; then
19753    for ac_prog in $COMPILER_CHECK_LIST
19754do
19755  # Extract the first word of "$ac_prog", so it can be a program name with args.
19756set dummy $ac_prog; ac_word=$2
19757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19758$as_echo_n "checking for $ac_word... " >&6; }
19759if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19760  $as_echo_n "(cached) " >&6
19761else
19762  case $POTENTIAL_CXX in
19763  [\\/]* | ?:[\\/]*)
19764  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19765  ;;
19766  *)
19767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19768for as_dir in $PATH
19769do
19770  IFS=$as_save_IFS
19771  test -z "$as_dir" && as_dir=.
19772    for ac_exec_ext in '' $ac_executable_extensions; do
19773  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19774    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19776    break 2
19777  fi
19778done
19779  done
19780IFS=$as_save_IFS
19781
19782  ;;
19783esac
19784fi
19785POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19786if test -n "$POTENTIAL_CXX"; then
19787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19788$as_echo "$POTENTIAL_CXX" >&6; }
19789else
19790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19791$as_echo "no" >&6; }
19792fi
19793
19794
19795  test -n "$POTENTIAL_CXX" && break
19796done
19797
19798    CXX=$POTENTIAL_CXX
19799  fi
19800
19801  if test "x$CXX" = x; then
19802
19803    # Print a helpful message on how to acquire the necessary build dependency.
19804    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19805    MISSING_DEPENDENCY=devkit
19806    PKGHANDLER_COMMAND=
19807
19808    case $PKGHANDLER in
19809	apt-get)
19810                apt_help     $MISSING_DEPENDENCY ;;
19811    yum)
19812                yum_help     $MISSING_DEPENDENCY ;;
19813	port)
19814                port_help    $MISSING_DEPENDENCY ;;
19815	pkgutil)
19816                pkgutil_help $MISSING_DEPENDENCY ;;
19817	pkgadd)
19818                pkgadd_help  $MISSING_DEPENDENCY ;;
19819    * )
19820      break ;;
19821    esac
19822
19823    if test "x$PKGHANDLER_COMMAND" != x; then
19824        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19825    fi
19826
19827      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19828  fi
19829
19830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19831
19832  # First separate the path from the arguments. This will split at the first
19833  # space.
19834  complete="$CXX"
19835  path="${complete%% *}"
19836  tmp="$complete EOL"
19837  arguments="${tmp#* }"
19838
19839  # Input might be given as Windows format, start by converting to
19840  # unix format.
19841  new_path=`$CYGPATH -u "$path"`
19842
19843  # Now try to locate executable using which
19844  new_path=`$WHICH "$new_path" 2> /dev/null`
19845  # bat and cmd files are not always considered executable in cygwin causing which
19846  # to not find them
19847  if test "x$new_path" = x \
19848           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19849           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19850    new_path=`$CYGPATH -u "$path"`
19851  fi
19852  if test "x$new_path" = x; then
19853    # Oops. Which didn't find the executable.
19854    # The splitting of arguments from the executable at a space might have been incorrect,
19855    # since paths with space are more likely in Windows. Give it another try with the whole
19856    # argument.
19857    path="$complete"
19858    arguments="EOL"
19859    new_path=`$CYGPATH -u "$path"`
19860    new_path=`$WHICH "$new_path" 2> /dev/null`
19861    # bat and cmd files are not always considered executable in cygwin causing which
19862    # to not find them
19863    if test "x$new_path" = x \
19864             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19865             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19866      new_path=`$CYGPATH -u "$path"`
19867    fi
19868    if test "x$new_path" = x; then
19869      # It's still not found. Now this is an unrecoverable error.
19870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19871$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19872      has_space=`$ECHO "$complete" | $GREP " "`
19873      if test "x$has_space" != x; then
19874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19876      fi
19877      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19878    fi
19879  fi
19880
19881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19884  # "foo.exe" is OK but "foo" is an error.
19885  #
19886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19887  # It is also a way to make sure we got the proper file name for the real test later on.
19888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19889  if test "x$test_shortpath" = x; then
19890    # Short path failed, file does not exist as specified.
19891    # Try adding .exe or .cmd
19892    if test -f "${new_path}.exe"; then
19893       input_to_shortpath="${new_path}.exe"
19894    elif test -f "${new_path}.cmd"; then
19895       input_to_shortpath="${new_path}.cmd"
19896    else
19897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19898$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19901      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19902    fi
19903  else
19904    input_to_shortpath="$new_path"
19905  fi
19906
19907  # Call helper function which possibly converts this using DOS-style short mode.
19908  # If so, the updated path is stored in $new_path.
19909  new_path="$input_to_shortpath"
19910
19911  input_path="$input_to_shortpath"
19912  # Check if we need to convert this using DOS-style short mode. If the path
19913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19914  # take no chances and rewrite it.
19915  # Note: m4 eats our [], so we need to use [ and ] instead.
19916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19917  if test "x$has_forbidden_chars" != x; then
19918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19922      # Going to short mode and back again did indeed matter. Since short mode is
19923      # case insensitive, let's make it lowercase to improve readability.
19924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19925      # Now convert it back to Unix-stile (cygpath)
19926      input_path=`$CYGPATH -u "$shortmode_path"`
19927      new_path="$input_path"
19928    fi
19929  fi
19930
19931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19932  if test "x$test_cygdrive_prefix" = x; then
19933    # As a simple fix, exclude /usr/bin since it's not a real path.
19934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19936      # a path prefixed by /cygdrive for fixpath to work.
19937      new_path="$CYGWIN_ROOT_PATH$input_path"
19938    fi
19939  fi
19940
19941  # remove trailing .exe if any
19942  new_path="${new_path/%.exe/}"
19943
19944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19945
19946  # First separate the path from the arguments. This will split at the first
19947  # space.
19948  complete="$CXX"
19949  path="${complete%% *}"
19950  tmp="$complete EOL"
19951  arguments="${tmp#* }"
19952
19953  # Input might be given as Windows format, start by converting to
19954  # unix format.
19955  new_path="$path"
19956
19957  windows_path="$new_path"
19958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19959    unix_path=`$CYGPATH -u "$windows_path"`
19960    new_path="$unix_path"
19961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19963    new_path="$unix_path"
19964  fi
19965
19966
19967  # Now try to locate executable using which
19968  new_path=`$WHICH "$new_path" 2> /dev/null`
19969
19970  if test "x$new_path" = x; then
19971    # Oops. Which didn't find the executable.
19972    # The splitting of arguments from the executable at a space might have been incorrect,
19973    # since paths with space are more likely in Windows. Give it another try with the whole
19974    # argument.
19975    path="$complete"
19976    arguments="EOL"
19977    new_path="$path"
19978
19979  windows_path="$new_path"
19980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19981    unix_path=`$CYGPATH -u "$windows_path"`
19982    new_path="$unix_path"
19983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19985    new_path="$unix_path"
19986  fi
19987
19988
19989    new_path=`$WHICH "$new_path" 2> /dev/null`
19990
19991    if test "x$new_path" = x; then
19992      # It's still not found. Now this is an unrecoverable error.
19993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19994$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19995      has_space=`$ECHO "$complete" | $GREP " "`
19996      if test "x$has_space" != x; then
19997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19999      fi
20000      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20001    fi
20002  fi
20003
20004  # Now new_path has a complete unix path to the binary
20005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20006    # Keep paths in /bin as-is, but remove trailing .exe if any
20007    new_path="${new_path/%.exe/}"
20008    # Do not save /bin paths to all_fixpath_prefixes!
20009  else
20010    # Not in mixed or Windows style, start by that.
20011    new_path=`cmd //c echo $new_path`
20012
20013  input_path="$new_path"
20014  # Check if we need to convert this using DOS-style short mode. If the path
20015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20016  # take no chances and rewrite it.
20017  # Note: m4 eats our [], so we need to use [ and ] instead.
20018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20019  if test "x$has_forbidden_chars" != x; then
20020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20022  fi
20023
20024    # Output is in $new_path
20025
20026  windows_path="$new_path"
20027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20028    unix_path=`$CYGPATH -u "$windows_path"`
20029    new_path="$unix_path"
20030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20032    new_path="$unix_path"
20033  fi
20034
20035    # remove trailing .exe if any
20036    new_path="${new_path/%.exe/}"
20037
20038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20040  fi
20041
20042  else
20043    # We're on a posix platform. Hooray! :)
20044    # First separate the path from the arguments. This will split at the first
20045    # space.
20046    complete="$CXX"
20047    path="${complete%% *}"
20048    tmp="$complete EOL"
20049    arguments="${tmp#* }"
20050
20051    # Cannot rely on the command "which" here since it doesn't always work.
20052    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20053    if test -z "$is_absolute_path"; then
20054      # Path to executable is not absolute. Find it.
20055      IFS_save="$IFS"
20056      IFS=:
20057      for p in $PATH; do
20058        if test -f "$p/$path" && test -x "$p/$path"; then
20059          new_path="$p/$path"
20060          break
20061        fi
20062      done
20063      IFS="$IFS_save"
20064    else
20065      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20066$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20067      new_path="$path"
20068    fi
20069
20070    if test "x$new_path" = x; then
20071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20072$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20073        has_space=`$ECHO "$complete" | $GREP " "`
20074        if test "x$has_space" != x; then
20075          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20076$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20077        fi
20078        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20079      fi
20080  fi
20081
20082      # Now join together the path and the arguments once again
20083      if test "x$arguments" != xEOL; then
20084        new_complete="$new_path ${arguments% *}"
20085      else
20086        new_complete="$new_path"
20087      fi
20088
20089  if test "x$complete" != "x$new_complete"; then
20090      CXX="$new_complete"
20091      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20092$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20093    fi
20094
20095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20096$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20097  TEST_COMPILER="$CXX"
20098
20099    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20100        # Follow a chain of symbolic links. Use readlink
20101        # where it exists, else fall back to horribly
20102        # complicated shell code.
20103        if test "x$READLINK_TESTED" != yes; then
20104            # On MacOSX there is a readlink tool with a different
20105            # purpose than the GNU readlink tool. Check the found readlink.
20106            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20107            if test "x$ISGNU" = x; then
20108                 # A readlink that we do not know how to use.
20109                 # Are there other non-GNU readlinks out there?
20110                 READLINK_TESTED=yes
20111                 READLINK=
20112            fi
20113        fi
20114
20115        if test "x$READLINK" != x; then
20116            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20117        else
20118            # Save the current directory for restoring afterwards
20119            STARTDIR=$PWD
20120            COUNTER=0
20121            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20122            sym_link_file=`$BASENAME $TEST_COMPILER`
20123            # Use the system pwd and not the shell builtin to resolve directory symlinks
20124            cd $sym_link_dir
20125            cd `$THEPWDCMD`
20126            sym_link_dir=`$THEPWDCMD`
20127            # Resolve file symlinks
20128            while test $COUNTER -lt 20; do
20129                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20130                if test "x$ISLINK" == x; then
20131                    # This is not a symbolic link! We are done!
20132                    break
20133                fi
20134                # Again resolve directory symlinks since the target of the just found
20135                # link could be in a different directory
20136                cd `$DIRNAME $ISLINK`
20137                sym_link_dir=`$THEPWDCMD`
20138                sym_link_file=`$BASENAME $ISLINK`
20139                let COUNTER=COUNTER+1
20140            done
20141            cd $STARTDIR
20142            TEST_COMPILER=$sym_link_dir/$sym_link_file
20143        fi
20144    fi
20145
20146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20147$as_echo "$TEST_COMPILER" >&6; }
20148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20149$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20150
20151  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20152  if test "x$COMPILER_BASENAME" = "xccache"; then
20153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20154$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20155    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20156    # We want to control ccache invocation ourselves, so ignore this cc and try
20157    # searching again.
20158
20159    # Remove the path to the fake ccache cc from the PATH
20160    RETRY_COMPILER_SAVED_PATH="$PATH"
20161    COMPILER_DIRNAME=`$DIRNAME $CXX`
20162    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20163
20164    # Try again looking for our compiler
20165    if test -n "$ac_tool_prefix"; then
20166  for ac_prog in $COMPILER_CHECK_LIST
20167  do
20168    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20169set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20171$as_echo_n "checking for $ac_word... " >&6; }
20172if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20173  $as_echo_n "(cached) " >&6
20174else
20175  if test -n "$PROPER_COMPILER_CXX"; then
20176  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20177else
20178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20179for as_dir in $PATH
20180do
20181  IFS=$as_save_IFS
20182  test -z "$as_dir" && as_dir=.
20183    for ac_exec_ext in '' $ac_executable_extensions; do
20184  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20185    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20187    break 2
20188  fi
20189done
20190  done
20191IFS=$as_save_IFS
20192
20193fi
20194fi
20195PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20196if test -n "$PROPER_COMPILER_CXX"; then
20197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20198$as_echo "$PROPER_COMPILER_CXX" >&6; }
20199else
20200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20201$as_echo "no" >&6; }
20202fi
20203
20204
20205    test -n "$PROPER_COMPILER_CXX" && break
20206  done
20207fi
20208if test -z "$PROPER_COMPILER_CXX"; then
20209  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20210  for ac_prog in $COMPILER_CHECK_LIST
20211do
20212  # Extract the first word of "$ac_prog", so it can be a program name with args.
20213set dummy $ac_prog; ac_word=$2
20214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20215$as_echo_n "checking for $ac_word... " >&6; }
20216if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20217  $as_echo_n "(cached) " >&6
20218else
20219  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20220  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20221else
20222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20223for as_dir in $PATH
20224do
20225  IFS=$as_save_IFS
20226  test -z "$as_dir" && as_dir=.
20227    for ac_exec_ext in '' $ac_executable_extensions; do
20228  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20229    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20231    break 2
20232  fi
20233done
20234  done
20235IFS=$as_save_IFS
20236
20237fi
20238fi
20239ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20240if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20242$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20243else
20244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20245$as_echo "no" >&6; }
20246fi
20247
20248
20249  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20250done
20251
20252  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20253    PROPER_COMPILER_CXX=""
20254  else
20255    case $cross_compiling:$ac_tool_warned in
20256yes:)
20257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20259ac_tool_warned=yes ;;
20260esac
20261    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20262  fi
20263fi
20264
20265
20266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20267
20268  # First separate the path from the arguments. This will split at the first
20269  # space.
20270  complete="$PROPER_COMPILER_CXX"
20271  path="${complete%% *}"
20272  tmp="$complete EOL"
20273  arguments="${tmp#* }"
20274
20275  # Input might be given as Windows format, start by converting to
20276  # unix format.
20277  new_path=`$CYGPATH -u "$path"`
20278
20279  # Now try to locate executable using which
20280  new_path=`$WHICH "$new_path" 2> /dev/null`
20281  # bat and cmd files are not always considered executable in cygwin causing which
20282  # to not find them
20283  if test "x$new_path" = x \
20284           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20285           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20286    new_path=`$CYGPATH -u "$path"`
20287  fi
20288  if test "x$new_path" = x; then
20289    # Oops. Which didn't find the executable.
20290    # The splitting of arguments from the executable at a space might have been incorrect,
20291    # since paths with space are more likely in Windows. Give it another try with the whole
20292    # argument.
20293    path="$complete"
20294    arguments="EOL"
20295    new_path=`$CYGPATH -u "$path"`
20296    new_path=`$WHICH "$new_path" 2> /dev/null`
20297    # bat and cmd files are not always considered executable in cygwin causing which
20298    # to not find them
20299    if test "x$new_path" = x \
20300             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20301             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20302      new_path=`$CYGPATH -u "$path"`
20303    fi
20304    if test "x$new_path" = x; then
20305      # It's still not found. Now this is an unrecoverable error.
20306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20307$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20308      has_space=`$ECHO "$complete" | $GREP " "`
20309      if test "x$has_space" != x; then
20310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20312      fi
20313      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20314    fi
20315  fi
20316
20317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20320  # "foo.exe" is OK but "foo" is an error.
20321  #
20322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20323  # It is also a way to make sure we got the proper file name for the real test later on.
20324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20325  if test "x$test_shortpath" = x; then
20326    # Short path failed, file does not exist as specified.
20327    # Try adding .exe or .cmd
20328    if test -f "${new_path}.exe"; then
20329       input_to_shortpath="${new_path}.exe"
20330    elif test -f "${new_path}.cmd"; then
20331       input_to_shortpath="${new_path}.cmd"
20332    else
20333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20334$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20335      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20336$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20337      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20338    fi
20339  else
20340    input_to_shortpath="$new_path"
20341  fi
20342
20343  # Call helper function which possibly converts this using DOS-style short mode.
20344  # If so, the updated path is stored in $new_path.
20345  new_path="$input_to_shortpath"
20346
20347  input_path="$input_to_shortpath"
20348  # Check if we need to convert this using DOS-style short mode. If the path
20349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20350  # take no chances and rewrite it.
20351  # Note: m4 eats our [], so we need to use [ and ] instead.
20352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20353  if test "x$has_forbidden_chars" != x; then
20354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20358      # Going to short mode and back again did indeed matter. Since short mode is
20359      # case insensitive, let's make it lowercase to improve readability.
20360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20361      # Now convert it back to Unix-stile (cygpath)
20362      input_path=`$CYGPATH -u "$shortmode_path"`
20363      new_path="$input_path"
20364    fi
20365  fi
20366
20367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20368  if test "x$test_cygdrive_prefix" = x; then
20369    # As a simple fix, exclude /usr/bin since it's not a real path.
20370    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20372      # a path prefixed by /cygdrive for fixpath to work.
20373      new_path="$CYGWIN_ROOT_PATH$input_path"
20374    fi
20375  fi
20376
20377  # remove trailing .exe if any
20378  new_path="${new_path/%.exe/}"
20379
20380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20381
20382  # First separate the path from the arguments. This will split at the first
20383  # space.
20384  complete="$PROPER_COMPILER_CXX"
20385  path="${complete%% *}"
20386  tmp="$complete EOL"
20387  arguments="${tmp#* }"
20388
20389  # Input might be given as Windows format, start by converting to
20390  # unix format.
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  # Now try to locate executable using which
20404  new_path=`$WHICH "$new_path" 2> /dev/null`
20405
20406  if test "x$new_path" = x; then
20407    # Oops. Which didn't find the executable.
20408    # The splitting of arguments from the executable at a space might have been incorrect,
20409    # since paths with space are more likely in Windows. Give it another try with the whole
20410    # argument.
20411    path="$complete"
20412    arguments="EOL"
20413    new_path="$path"
20414
20415  windows_path="$new_path"
20416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20417    unix_path=`$CYGPATH -u "$windows_path"`
20418    new_path="$unix_path"
20419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20421    new_path="$unix_path"
20422  fi
20423
20424
20425    new_path=`$WHICH "$new_path" 2> /dev/null`
20426
20427    if test "x$new_path" = x; then
20428      # It's still not found. Now this is an unrecoverable error.
20429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20430$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20431      has_space=`$ECHO "$complete" | $GREP " "`
20432      if test "x$has_space" != x; then
20433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20435      fi
20436      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20437    fi
20438  fi
20439
20440  # Now new_path has a complete unix path to the binary
20441  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20442    # Keep paths in /bin as-is, but remove trailing .exe if any
20443    new_path="${new_path/%.exe/}"
20444    # Do not save /bin paths to all_fixpath_prefixes!
20445  else
20446    # Not in mixed or Windows style, start by that.
20447    new_path=`cmd //c echo $new_path`
20448
20449  input_path="$new_path"
20450  # Check if we need to convert this using DOS-style short mode. If the path
20451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20452  # take no chances and rewrite it.
20453  # Note: m4 eats our [], so we need to use [ and ] instead.
20454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20455  if test "x$has_forbidden_chars" != x; then
20456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20458  fi
20459
20460    # Output is in $new_path
20461
20462  windows_path="$new_path"
20463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20464    unix_path=`$CYGPATH -u "$windows_path"`
20465    new_path="$unix_path"
20466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20468    new_path="$unix_path"
20469  fi
20470
20471    # remove trailing .exe if any
20472    new_path="${new_path/%.exe/}"
20473
20474    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20475    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20476  fi
20477
20478  else
20479    # We're on a posix platform. Hooray! :)
20480    # First separate the path from the arguments. This will split at the first
20481    # space.
20482    complete="$PROPER_COMPILER_CXX"
20483    path="${complete%% *}"
20484    tmp="$complete EOL"
20485    arguments="${tmp#* }"
20486
20487    # Cannot rely on the command "which" here since it doesn't always work.
20488    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20489    if test -z "$is_absolute_path"; then
20490      # Path to executable is not absolute. Find it.
20491      IFS_save="$IFS"
20492      IFS=:
20493      for p in $PATH; do
20494        if test -f "$p/$path" && test -x "$p/$path"; then
20495          new_path="$p/$path"
20496          break
20497        fi
20498      done
20499      IFS="$IFS_save"
20500    else
20501      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20502$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20503      new_path="$path"
20504    fi
20505
20506    if test "x$new_path" = x; then
20507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20508$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20509        has_space=`$ECHO "$complete" | $GREP " "`
20510        if test "x$has_space" != x; then
20511          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20512$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20513        fi
20514        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20515      fi
20516  fi
20517
20518      # Now join together the path and the arguments once again
20519      if test "x$arguments" != xEOL; then
20520        new_complete="$new_path ${arguments% *}"
20521      else
20522        new_complete="$new_path"
20523      fi
20524
20525  if test "x$complete" != "x$new_complete"; then
20526      PROPER_COMPILER_CXX="$new_complete"
20527      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20528$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20529    fi
20530
20531    PATH="$RETRY_COMPILER_SAVED_PATH"
20532
20533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20534$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20535
20536    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20537        # Follow a chain of symbolic links. Use readlink
20538        # where it exists, else fall back to horribly
20539        # complicated shell code.
20540        if test "x$READLINK_TESTED" != yes; then
20541            # On MacOSX there is a readlink tool with a different
20542            # purpose than the GNU readlink tool. Check the found readlink.
20543            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20544            if test "x$ISGNU" = x; then
20545                 # A readlink that we do not know how to use.
20546                 # Are there other non-GNU readlinks out there?
20547                 READLINK_TESTED=yes
20548                 READLINK=
20549            fi
20550        fi
20551
20552        if test "x$READLINK" != x; then
20553            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20554        else
20555            # Save the current directory for restoring afterwards
20556            STARTDIR=$PWD
20557            COUNTER=0
20558            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20559            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20560            # Use the system pwd and not the shell builtin to resolve directory symlinks
20561            cd $sym_link_dir
20562            cd `$THEPWDCMD`
20563            sym_link_dir=`$THEPWDCMD`
20564            # Resolve file symlinks
20565            while test $COUNTER -lt 20; do
20566                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20567                if test "x$ISLINK" == x; then
20568                    # This is not a symbolic link! We are done!
20569                    break
20570                fi
20571                # Again resolve directory symlinks since the target of the just found
20572                # link could be in a different directory
20573                cd `$DIRNAME $ISLINK`
20574                sym_link_dir=`$THEPWDCMD`
20575                sym_link_file=`$BASENAME $ISLINK`
20576                let COUNTER=COUNTER+1
20577            done
20578            cd $STARTDIR
20579            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20580        fi
20581    fi
20582
20583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20584$as_echo "$PROPER_COMPILER_CXX" >&6; }
20585    CXX="$PROPER_COMPILER_CXX"
20586  else
20587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20588$as_echo "no, keeping CXX" >&6; }
20589    CXX="$TEST_COMPILER"
20590  fi
20591
20592  COMPILER=$CXX
20593  COMPILER_NAME=$COMPILER_NAME
20594
20595  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20596    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20597    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20598    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20599    if test $? -ne 0; then
20600      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20601
20602      { $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
20603$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20604      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20605$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20606      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20607    else
20608      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20609      COMPILER_VENDOR="Sun Studio"
20610    fi
20611  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20612    # First line typically looks something like:
20613    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20614    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20615    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20616    COMPILER_VENDOR="Microsoft CL.EXE"
20617    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20618    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20619      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20620        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20621      fi
20622    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20623      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20624        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20625      fi
20626    fi
20627  else
20628    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20629    # Check that this is likely to be GCC.
20630    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20631    if test $? -ne 0; then
20632      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20633$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20634      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20635$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20636      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20637    fi
20638
20639    # First line typically looks something like:
20640    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20641    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20642    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20643  fi
20644  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20645  CXX_VERSION="$COMPILER_VERSION"
20646  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20647  CXX_VENDOR="$COMPILER_VENDOR"
20648
20649  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20650$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20651
20652
20653# Now that we have resolved CXX ourself, let autoconf have its go at it
20654ac_ext=cpp
20655ac_cpp='$CXXCPP $CPPFLAGS'
20656ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20657ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20658ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20659if test -z "$CXX"; then
20660  if test -n "$CCC"; then
20661    CXX=$CCC
20662  else
20663    if test -n "$ac_tool_prefix"; then
20664  for ac_prog in $CXX
20665  do
20666    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20667set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20669$as_echo_n "checking for $ac_word... " >&6; }
20670if test "${ac_cv_prog_CXX+set}" = set; then :
20671  $as_echo_n "(cached) " >&6
20672else
20673  if test -n "$CXX"; then
20674  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20675else
20676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20677for as_dir in $PATH
20678do
20679  IFS=$as_save_IFS
20680  test -z "$as_dir" && as_dir=.
20681    for ac_exec_ext in '' $ac_executable_extensions; do
20682  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20683    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20685    break 2
20686  fi
20687done
20688  done
20689IFS=$as_save_IFS
20690
20691fi
20692fi
20693CXX=$ac_cv_prog_CXX
20694if test -n "$CXX"; then
20695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20696$as_echo "$CXX" >&6; }
20697else
20698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20699$as_echo "no" >&6; }
20700fi
20701
20702
20703    test -n "$CXX" && break
20704  done
20705fi
20706if test -z "$CXX"; then
20707  ac_ct_CXX=$CXX
20708  for ac_prog in $CXX
20709do
20710  # Extract the first word of "$ac_prog", so it can be a program name with args.
20711set dummy $ac_prog; ac_word=$2
20712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20713$as_echo_n "checking for $ac_word... " >&6; }
20714if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20715  $as_echo_n "(cached) " >&6
20716else
20717  if test -n "$ac_ct_CXX"; then
20718  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20719else
20720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20721for as_dir in $PATH
20722do
20723  IFS=$as_save_IFS
20724  test -z "$as_dir" && as_dir=.
20725    for ac_exec_ext in '' $ac_executable_extensions; do
20726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20727    ac_cv_prog_ac_ct_CXX="$ac_prog"
20728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20729    break 2
20730  fi
20731done
20732  done
20733IFS=$as_save_IFS
20734
20735fi
20736fi
20737ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20738if test -n "$ac_ct_CXX"; then
20739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20740$as_echo "$ac_ct_CXX" >&6; }
20741else
20742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20743$as_echo "no" >&6; }
20744fi
20745
20746
20747  test -n "$ac_ct_CXX" && break
20748done
20749
20750  if test "x$ac_ct_CXX" = x; then
20751    CXX="g++"
20752  else
20753    case $cross_compiling:$ac_tool_warned in
20754yes:)
20755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20757ac_tool_warned=yes ;;
20758esac
20759    CXX=$ac_ct_CXX
20760  fi
20761fi
20762
20763  fi
20764fi
20765# Provide some information about the compiler.
20766$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20767set X $ac_compile
20768ac_compiler=$2
20769for ac_option in --version -v -V -qversion; do
20770  { { ac_try="$ac_compiler $ac_option >&5"
20771case "(($ac_try" in
20772  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20773  *) ac_try_echo=$ac_try;;
20774esac
20775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20776$as_echo "$ac_try_echo"; } >&5
20777  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20778  ac_status=$?
20779  if test -s conftest.err; then
20780    sed '10a\
20781... rest of stderr output deleted ...
20782         10q' conftest.err >conftest.er1
20783    cat conftest.er1 >&5
20784  fi
20785  rm -f conftest.er1 conftest.err
20786  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20787  test $ac_status = 0; }
20788done
20789
20790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20791$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20792if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20793  $as_echo_n "(cached) " >&6
20794else
20795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20796/* end confdefs.h.  */
20797
20798int
20799main ()
20800{
20801#ifndef __GNUC__
20802       choke me
20803#endif
20804
20805  ;
20806  return 0;
20807}
20808_ACEOF
20809if ac_fn_cxx_try_compile "$LINENO"; then :
20810  ac_compiler_gnu=yes
20811else
20812  ac_compiler_gnu=no
20813fi
20814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20815ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20816
20817fi
20818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20819$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20820if test $ac_compiler_gnu = yes; then
20821  GXX=yes
20822else
20823  GXX=
20824fi
20825ac_test_CXXFLAGS=${CXXFLAGS+set}
20826ac_save_CXXFLAGS=$CXXFLAGS
20827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20828$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20829if test "${ac_cv_prog_cxx_g+set}" = set; then :
20830  $as_echo_n "(cached) " >&6
20831else
20832  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20833   ac_cxx_werror_flag=yes
20834   ac_cv_prog_cxx_g=no
20835   CXXFLAGS="-g"
20836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20837/* end confdefs.h.  */
20838
20839int
20840main ()
20841{
20842
20843  ;
20844  return 0;
20845}
20846_ACEOF
20847if ac_fn_cxx_try_compile "$LINENO"; then :
20848  ac_cv_prog_cxx_g=yes
20849else
20850  CXXFLAGS=""
20851      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20852/* end confdefs.h.  */
20853
20854int
20855main ()
20856{
20857
20858  ;
20859  return 0;
20860}
20861_ACEOF
20862if ac_fn_cxx_try_compile "$LINENO"; then :
20863
20864else
20865  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20866	 CXXFLAGS="-g"
20867	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20868/* end confdefs.h.  */
20869
20870int
20871main ()
20872{
20873
20874  ;
20875  return 0;
20876}
20877_ACEOF
20878if ac_fn_cxx_try_compile "$LINENO"; then :
20879  ac_cv_prog_cxx_g=yes
20880fi
20881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20882fi
20883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20884fi
20885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20886   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20887fi
20888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20889$as_echo "$ac_cv_prog_cxx_g" >&6; }
20890if test "$ac_test_CXXFLAGS" = set; then
20891  CXXFLAGS=$ac_save_CXXFLAGS
20892elif test $ac_cv_prog_cxx_g = yes; then
20893  if test "$GXX" = yes; then
20894    CXXFLAGS="-g -O2"
20895  else
20896    CXXFLAGS="-g"
20897  fi
20898else
20899  if test "$GXX" = yes; then
20900    CXXFLAGS="-O2"
20901  else
20902    CXXFLAGS=
20903  fi
20904fi
20905ac_ext=cpp
20906ac_cpp='$CXXCPP $CPPFLAGS'
20907ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20908ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20909ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20910
20911
20912### Locate other tools
20913
20914if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20915    ac_ext=m
20916ac_cpp='$OBJCPP $CPPFLAGS'
20917ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20918ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20919ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20920if test -n "$ac_tool_prefix"; then
20921  for ac_prog in gcc objcc objc cc CC
20922  do
20923    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20924set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20926$as_echo_n "checking for $ac_word... " >&6; }
20927if test "${ac_cv_prog_OBJC+set}" = set; then :
20928  $as_echo_n "(cached) " >&6
20929else
20930  if test -n "$OBJC"; then
20931  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20932else
20933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20934for as_dir in $PATH
20935do
20936  IFS=$as_save_IFS
20937  test -z "$as_dir" && as_dir=.
20938    for ac_exec_ext in '' $ac_executable_extensions; do
20939  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20940    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20942    break 2
20943  fi
20944done
20945  done
20946IFS=$as_save_IFS
20947
20948fi
20949fi
20950OBJC=$ac_cv_prog_OBJC
20951if test -n "$OBJC"; then
20952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20953$as_echo "$OBJC" >&6; }
20954else
20955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20956$as_echo "no" >&6; }
20957fi
20958
20959
20960    test -n "$OBJC" && break
20961  done
20962fi
20963if test -z "$OBJC"; then
20964  ac_ct_OBJC=$OBJC
20965  for ac_prog in gcc objcc objc cc CC
20966do
20967  # Extract the first word of "$ac_prog", so it can be a program name with args.
20968set dummy $ac_prog; ac_word=$2
20969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20970$as_echo_n "checking for $ac_word... " >&6; }
20971if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20972  $as_echo_n "(cached) " >&6
20973else
20974  if test -n "$ac_ct_OBJC"; then
20975  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20976else
20977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20978for as_dir in $PATH
20979do
20980  IFS=$as_save_IFS
20981  test -z "$as_dir" && as_dir=.
20982    for ac_exec_ext in '' $ac_executable_extensions; do
20983  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20984    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20986    break 2
20987  fi
20988done
20989  done
20990IFS=$as_save_IFS
20991
20992fi
20993fi
20994ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20995if test -n "$ac_ct_OBJC"; then
20996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20997$as_echo "$ac_ct_OBJC" >&6; }
20998else
20999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21000$as_echo "no" >&6; }
21001fi
21002
21003
21004  test -n "$ac_ct_OBJC" && break
21005done
21006
21007  if test "x$ac_ct_OBJC" = x; then
21008    OBJC="gcc"
21009  else
21010    case $cross_compiling:$ac_tool_warned in
21011yes:)
21012{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21013$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21014ac_tool_warned=yes ;;
21015esac
21016    OBJC=$ac_ct_OBJC
21017  fi
21018fi
21019
21020# Provide some information about the compiler.
21021$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21022set X $ac_compile
21023ac_compiler=$2
21024for ac_option in --version -v -V -qversion; do
21025  { { ac_try="$ac_compiler $ac_option >&5"
21026case "(($ac_try" in
21027  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21028  *) ac_try_echo=$ac_try;;
21029esac
21030eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21031$as_echo "$ac_try_echo"; } >&5
21032  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21033  ac_status=$?
21034  if test -s conftest.err; then
21035    sed '10a\
21036... rest of stderr output deleted ...
21037         10q' conftest.err >conftest.er1
21038    cat conftest.er1 >&5
21039  fi
21040  rm -f conftest.er1 conftest.err
21041  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21042  test $ac_status = 0; }
21043done
21044
21045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21046$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21047if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21048  $as_echo_n "(cached) " >&6
21049else
21050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21051/* end confdefs.h.  */
21052
21053int
21054main ()
21055{
21056#ifndef __GNUC__
21057       choke me
21058#endif
21059
21060  ;
21061  return 0;
21062}
21063_ACEOF
21064if ac_fn_objc_try_compile "$LINENO"; then :
21065  ac_compiler_gnu=yes
21066else
21067  ac_compiler_gnu=no
21068fi
21069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21070ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21071
21072fi
21073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21074$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21075if test $ac_compiler_gnu = yes; then
21076  GOBJC=yes
21077else
21078  GOBJC=
21079fi
21080ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21081ac_save_OBJCFLAGS=$OBJCFLAGS
21082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21083$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21084if test "${ac_cv_prog_objc_g+set}" = set; then :
21085  $as_echo_n "(cached) " >&6
21086else
21087  ac_save_objc_werror_flag=$ac_objc_werror_flag
21088   ac_objc_werror_flag=yes
21089   ac_cv_prog_objc_g=no
21090   OBJCFLAGS="-g"
21091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21092/* end confdefs.h.  */
21093
21094int
21095main ()
21096{
21097
21098  ;
21099  return 0;
21100}
21101_ACEOF
21102if ac_fn_objc_try_compile "$LINENO"; then :
21103  ac_cv_prog_objc_g=yes
21104else
21105  OBJCFLAGS=""
21106      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21107/* end confdefs.h.  */
21108
21109int
21110main ()
21111{
21112
21113  ;
21114  return 0;
21115}
21116_ACEOF
21117if ac_fn_objc_try_compile "$LINENO"; then :
21118
21119else
21120  ac_objc_werror_flag=$ac_save_objc_werror_flag
21121	 OBJCFLAGS="-g"
21122	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21123/* end confdefs.h.  */
21124
21125int
21126main ()
21127{
21128
21129  ;
21130  return 0;
21131}
21132_ACEOF
21133if ac_fn_objc_try_compile "$LINENO"; then :
21134  ac_cv_prog_objc_g=yes
21135fi
21136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21137fi
21138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21139fi
21140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21141   ac_objc_werror_flag=$ac_save_objc_werror_flag
21142fi
21143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21144$as_echo "$ac_cv_prog_objc_g" >&6; }
21145if test "$ac_test_OBJCFLAGS" = set; then
21146  OBJCFLAGS=$ac_save_OBJCFLAGS
21147elif test $ac_cv_prog_objc_g = yes; then
21148  if test "$GOBJC" = yes; then
21149    OBJCFLAGS="-g -O2"
21150  else
21151    OBJCFLAGS="-g"
21152  fi
21153else
21154  if test "$GOBJC" = yes; then
21155    OBJCFLAGS="-O2"
21156  else
21157    OBJCFLAGS=
21158  fi
21159fi
21160ac_ext=cpp
21161ac_cpp='$CXXCPP $CPPFLAGS'
21162ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21163ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21164ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21165
21166
21167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21168
21169  # First separate the path from the arguments. This will split at the first
21170  # space.
21171  complete="$OBJC"
21172  path="${complete%% *}"
21173  tmp="$complete EOL"
21174  arguments="${tmp#* }"
21175
21176  # Input might be given as Windows format, start by converting to
21177  # unix format.
21178  new_path=`$CYGPATH -u "$path"`
21179
21180  # Now try to locate executable using which
21181  new_path=`$WHICH "$new_path" 2> /dev/null`
21182  # bat and cmd files are not always considered executable in cygwin causing which
21183  # to not find them
21184  if test "x$new_path" = x \
21185           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21186           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21187    new_path=`$CYGPATH -u "$path"`
21188  fi
21189  if test "x$new_path" = x; then
21190    # Oops. Which didn't find the executable.
21191    # The splitting of arguments from the executable at a space might have been incorrect,
21192    # since paths with space are more likely in Windows. Give it another try with the whole
21193    # argument.
21194    path="$complete"
21195    arguments="EOL"
21196    new_path=`$CYGPATH -u "$path"`
21197    new_path=`$WHICH "$new_path" 2> /dev/null`
21198    # bat and cmd files are not always considered executable in cygwin causing which
21199    # to not find them
21200    if test "x$new_path" = x \
21201             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21202             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21203      new_path=`$CYGPATH -u "$path"`
21204    fi
21205    if test "x$new_path" = x; then
21206      # It's still not found. Now this is an unrecoverable error.
21207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21208$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21209      has_space=`$ECHO "$complete" | $GREP " "`
21210      if test "x$has_space" != x; then
21211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21213      fi
21214      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21215    fi
21216  fi
21217
21218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21221  # "foo.exe" is OK but "foo" is an error.
21222  #
21223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21224  # It is also a way to make sure we got the proper file name for the real test later on.
21225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21226  if test "x$test_shortpath" = x; then
21227    # Short path failed, file does not exist as specified.
21228    # Try adding .exe or .cmd
21229    if test -f "${new_path}.exe"; then
21230       input_to_shortpath="${new_path}.exe"
21231    elif test -f "${new_path}.cmd"; then
21232       input_to_shortpath="${new_path}.cmd"
21233    else
21234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21235$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21236      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21237$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21238      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21239    fi
21240  else
21241    input_to_shortpath="$new_path"
21242  fi
21243
21244  # Call helper function which possibly converts this using DOS-style short mode.
21245  # If so, the updated path is stored in $new_path.
21246  new_path="$input_to_shortpath"
21247
21248  input_path="$input_to_shortpath"
21249  # Check if we need to convert this using DOS-style short mode. If the path
21250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21251  # take no chances and rewrite it.
21252  # Note: m4 eats our [], so we need to use [ and ] instead.
21253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21254  if test "x$has_forbidden_chars" != x; then
21255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21259      # Going to short mode and back again did indeed matter. Since short mode is
21260      # case insensitive, let's make it lowercase to improve readability.
21261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21262      # Now convert it back to Unix-stile (cygpath)
21263      input_path=`$CYGPATH -u "$shortmode_path"`
21264      new_path="$input_path"
21265    fi
21266  fi
21267
21268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21269  if test "x$test_cygdrive_prefix" = x; then
21270    # As a simple fix, exclude /usr/bin since it's not a real path.
21271    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21273      # a path prefixed by /cygdrive for fixpath to work.
21274      new_path="$CYGWIN_ROOT_PATH$input_path"
21275    fi
21276  fi
21277
21278  # remove trailing .exe if any
21279  new_path="${new_path/%.exe/}"
21280
21281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21282
21283  # First separate the path from the arguments. This will split at the first
21284  # space.
21285  complete="$OBJC"
21286  path="${complete%% *}"
21287  tmp="$complete EOL"
21288  arguments="${tmp#* }"
21289
21290  # Input might be given as Windows format, start by converting to
21291  # unix format.
21292  new_path="$path"
21293
21294  windows_path="$new_path"
21295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21296    unix_path=`$CYGPATH -u "$windows_path"`
21297    new_path="$unix_path"
21298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21300    new_path="$unix_path"
21301  fi
21302
21303
21304  # Now try to locate executable using which
21305  new_path=`$WHICH "$new_path" 2> /dev/null`
21306
21307  if test "x$new_path" = x; then
21308    # Oops. Which didn't find the executable.
21309    # The splitting of arguments from the executable at a space might have been incorrect,
21310    # since paths with space are more likely in Windows. Give it another try with the whole
21311    # argument.
21312    path="$complete"
21313    arguments="EOL"
21314    new_path="$path"
21315
21316  windows_path="$new_path"
21317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21318    unix_path=`$CYGPATH -u "$windows_path"`
21319    new_path="$unix_path"
21320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21322    new_path="$unix_path"
21323  fi
21324
21325
21326    new_path=`$WHICH "$new_path" 2> /dev/null`
21327
21328    if test "x$new_path" = x; then
21329      # It's still not found. Now this is an unrecoverable error.
21330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21331$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21332      has_space=`$ECHO "$complete" | $GREP " "`
21333      if test "x$has_space" != x; then
21334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21336      fi
21337      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21338    fi
21339  fi
21340
21341  # Now new_path has a complete unix path to the binary
21342  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21343    # Keep paths in /bin as-is, but remove trailing .exe if any
21344    new_path="${new_path/%.exe/}"
21345    # Do not save /bin paths to all_fixpath_prefixes!
21346  else
21347    # Not in mixed or Windows style, start by that.
21348    new_path=`cmd //c echo $new_path`
21349
21350  input_path="$new_path"
21351  # Check if we need to convert this using DOS-style short mode. If the path
21352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21353  # take no chances and rewrite it.
21354  # Note: m4 eats our [], so we need to use [ and ] instead.
21355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21356  if test "x$has_forbidden_chars" != x; then
21357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21359  fi
21360
21361    # Output is in $new_path
21362
21363  windows_path="$new_path"
21364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21365    unix_path=`$CYGPATH -u "$windows_path"`
21366    new_path="$unix_path"
21367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21369    new_path="$unix_path"
21370  fi
21371
21372    # remove trailing .exe if any
21373    new_path="${new_path/%.exe/}"
21374
21375    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21376    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21377  fi
21378
21379  else
21380    # We're on a posix platform. Hooray! :)
21381    # First separate the path from the arguments. This will split at the first
21382    # space.
21383    complete="$OBJC"
21384    path="${complete%% *}"
21385    tmp="$complete EOL"
21386    arguments="${tmp#* }"
21387
21388    # Cannot rely on the command "which" here since it doesn't always work.
21389    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21390    if test -z "$is_absolute_path"; then
21391      # Path to executable is not absolute. Find it.
21392      IFS_save="$IFS"
21393      IFS=:
21394      for p in $PATH; do
21395        if test -f "$p/$path" && test -x "$p/$path"; then
21396          new_path="$p/$path"
21397          break
21398        fi
21399      done
21400      IFS="$IFS_save"
21401    else
21402      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21403$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21404      new_path="$path"
21405    fi
21406
21407    if test "x$new_path" = x; then
21408        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21409$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21410        has_space=`$ECHO "$complete" | $GREP " "`
21411        if test "x$has_space" != x; then
21412          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21413$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21414        fi
21415        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21416      fi
21417  fi
21418
21419      # Now join together the path and the arguments once again
21420      if test "x$arguments" != xEOL; then
21421        new_complete="$new_path ${arguments% *}"
21422      else
21423        new_complete="$new_path"
21424      fi
21425
21426  if test "x$complete" != "x$new_complete"; then
21427      OBJC="$new_complete"
21428      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21429$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21430    fi
21431
21432else
21433    OBJC=
21434fi
21435
21436# Restore the flags to the user specified values.
21437# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21438CFLAGS="$ORG_CFLAGS"
21439CXXFLAGS="$ORG_CXXFLAGS"
21440OBJCFLAGS="$ORG_OBJCFLAGS"
21441
21442LD="$CC"
21443LDEXE="$CC"
21444LDCXX="$CXX"
21445LDEXECXX="$CXX"
21446
21447# LDEXE is the linker to use, when creating executables.
21448
21449# Linking C++ libraries.
21450
21451# Linking C++ executables.
21452
21453
21454if test "x$OPENJDK_TARGET_OS" != xwindows; then
21455    if test -n "$ac_tool_prefix"; then
21456  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21457set dummy ${ac_tool_prefix}ar; ac_word=$2
21458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21459$as_echo_n "checking for $ac_word... " >&6; }
21460if test "${ac_cv_prog_AR+set}" = set; then :
21461  $as_echo_n "(cached) " >&6
21462else
21463  if test -n "$AR"; then
21464  ac_cv_prog_AR="$AR" # Let the user override the test.
21465else
21466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21467for as_dir in $PATH
21468do
21469  IFS=$as_save_IFS
21470  test -z "$as_dir" && as_dir=.
21471    for ac_exec_ext in '' $ac_executable_extensions; do
21472  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21473    ac_cv_prog_AR="${ac_tool_prefix}ar"
21474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21475    break 2
21476  fi
21477done
21478  done
21479IFS=$as_save_IFS
21480
21481fi
21482fi
21483AR=$ac_cv_prog_AR
21484if test -n "$AR"; then
21485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21486$as_echo "$AR" >&6; }
21487else
21488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21489$as_echo "no" >&6; }
21490fi
21491
21492
21493fi
21494if test -z "$ac_cv_prog_AR"; then
21495  ac_ct_AR=$AR
21496  # Extract the first word of "ar", so it can be a program name with args.
21497set dummy ar; ac_word=$2
21498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21499$as_echo_n "checking for $ac_word... " >&6; }
21500if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21501  $as_echo_n "(cached) " >&6
21502else
21503  if test -n "$ac_ct_AR"; then
21504  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21505else
21506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21507for as_dir in $PATH
21508do
21509  IFS=$as_save_IFS
21510  test -z "$as_dir" && as_dir=.
21511    for ac_exec_ext in '' $ac_executable_extensions; do
21512  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21513    ac_cv_prog_ac_ct_AR="ar"
21514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21515    break 2
21516  fi
21517done
21518  done
21519IFS=$as_save_IFS
21520
21521fi
21522fi
21523ac_ct_AR=$ac_cv_prog_ac_ct_AR
21524if test -n "$ac_ct_AR"; then
21525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21526$as_echo "$ac_ct_AR" >&6; }
21527else
21528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21529$as_echo "no" >&6; }
21530fi
21531
21532  if test "x$ac_ct_AR" = x; then
21533    AR=""
21534  else
21535    case $cross_compiling:$ac_tool_warned in
21536yes:)
21537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21539ac_tool_warned=yes ;;
21540esac
21541    AR=$ac_ct_AR
21542  fi
21543else
21544  AR="$ac_cv_prog_AR"
21545fi
21546
21547
21548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21549
21550  # First separate the path from the arguments. This will split at the first
21551  # space.
21552  complete="$AR"
21553  path="${complete%% *}"
21554  tmp="$complete EOL"
21555  arguments="${tmp#* }"
21556
21557  # Input might be given as Windows format, start by converting to
21558  # unix format.
21559  new_path=`$CYGPATH -u "$path"`
21560
21561  # Now try to locate executable using which
21562  new_path=`$WHICH "$new_path" 2> /dev/null`
21563  # bat and cmd files are not always considered executable in cygwin causing which
21564  # to not find them
21565  if test "x$new_path" = x \
21566           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21567           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21568    new_path=`$CYGPATH -u "$path"`
21569  fi
21570  if test "x$new_path" = x; then
21571    # Oops. Which didn't find the executable.
21572    # The splitting of arguments from the executable at a space might have been incorrect,
21573    # since paths with space are more likely in Windows. Give it another try with the whole
21574    # argument.
21575    path="$complete"
21576    arguments="EOL"
21577    new_path=`$CYGPATH -u "$path"`
21578    new_path=`$WHICH "$new_path" 2> /dev/null`
21579    # bat and cmd files are not always considered executable in cygwin causing which
21580    # to not find them
21581    if test "x$new_path" = x \
21582             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21583             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21584      new_path=`$CYGPATH -u "$path"`
21585    fi
21586    if test "x$new_path" = x; then
21587      # It's still not found. Now this is an unrecoverable error.
21588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21589$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21590      has_space=`$ECHO "$complete" | $GREP " "`
21591      if test "x$has_space" != x; then
21592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21594      fi
21595      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21596    fi
21597  fi
21598
21599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21602  # "foo.exe" is OK but "foo" is an error.
21603  #
21604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21605  # It is also a way to make sure we got the proper file name for the real test later on.
21606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21607  if test "x$test_shortpath" = x; then
21608    # Short path failed, file does not exist as specified.
21609    # Try adding .exe or .cmd
21610    if test -f "${new_path}.exe"; then
21611       input_to_shortpath="${new_path}.exe"
21612    elif test -f "${new_path}.cmd"; then
21613       input_to_shortpath="${new_path}.cmd"
21614    else
21615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21616$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21619      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21620    fi
21621  else
21622    input_to_shortpath="$new_path"
21623  fi
21624
21625  # Call helper function which possibly converts this using DOS-style short mode.
21626  # If so, the updated path is stored in $new_path.
21627  new_path="$input_to_shortpath"
21628
21629  input_path="$input_to_shortpath"
21630  # Check if we need to convert this using DOS-style short mode. If the path
21631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21632  # take no chances and rewrite it.
21633  # Note: m4 eats our [], so we need to use [ and ] instead.
21634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21635  if test "x$has_forbidden_chars" != x; then
21636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21640      # Going to short mode and back again did indeed matter. Since short mode is
21641      # case insensitive, let's make it lowercase to improve readability.
21642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21643      # Now convert it back to Unix-stile (cygpath)
21644      input_path=`$CYGPATH -u "$shortmode_path"`
21645      new_path="$input_path"
21646    fi
21647  fi
21648
21649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21650  if test "x$test_cygdrive_prefix" = x; then
21651    # As a simple fix, exclude /usr/bin since it's not a real path.
21652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21654      # a path prefixed by /cygdrive for fixpath to work.
21655      new_path="$CYGWIN_ROOT_PATH$input_path"
21656    fi
21657  fi
21658
21659  # remove trailing .exe if any
21660  new_path="${new_path/%.exe/}"
21661
21662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21663
21664  # First separate the path from the arguments. This will split at the first
21665  # space.
21666  complete="$AR"
21667  path="${complete%% *}"
21668  tmp="$complete EOL"
21669  arguments="${tmp#* }"
21670
21671  # Input might be given as Windows format, start by converting to
21672  # unix format.
21673  new_path="$path"
21674
21675  windows_path="$new_path"
21676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21677    unix_path=`$CYGPATH -u "$windows_path"`
21678    new_path="$unix_path"
21679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21681    new_path="$unix_path"
21682  fi
21683
21684
21685  # Now try to locate executable using which
21686  new_path=`$WHICH "$new_path" 2> /dev/null`
21687
21688  if test "x$new_path" = x; then
21689    # Oops. Which didn't find the executable.
21690    # The splitting of arguments from the executable at a space might have been incorrect,
21691    # since paths with space are more likely in Windows. Give it another try with the whole
21692    # argument.
21693    path="$complete"
21694    arguments="EOL"
21695    new_path="$path"
21696
21697  windows_path="$new_path"
21698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21699    unix_path=`$CYGPATH -u "$windows_path"`
21700    new_path="$unix_path"
21701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21703    new_path="$unix_path"
21704  fi
21705
21706
21707    new_path=`$WHICH "$new_path" 2> /dev/null`
21708
21709    if test "x$new_path" = x; then
21710      # It's still not found. Now this is an unrecoverable error.
21711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21712$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21713      has_space=`$ECHO "$complete" | $GREP " "`
21714      if test "x$has_space" != x; then
21715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21717      fi
21718      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21719    fi
21720  fi
21721
21722  # Now new_path has a complete unix path to the binary
21723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21724    # Keep paths in /bin as-is, but remove trailing .exe if any
21725    new_path="${new_path/%.exe/}"
21726    # Do not save /bin paths to all_fixpath_prefixes!
21727  else
21728    # Not in mixed or Windows style, start by that.
21729    new_path=`cmd //c echo $new_path`
21730
21731  input_path="$new_path"
21732  # Check if we need to convert this using DOS-style short mode. If the path
21733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21734  # take no chances and rewrite it.
21735  # Note: m4 eats our [], so we need to use [ and ] instead.
21736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21737  if test "x$has_forbidden_chars" != x; then
21738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21740  fi
21741
21742    # Output is in $new_path
21743
21744  windows_path="$new_path"
21745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21746    unix_path=`$CYGPATH -u "$windows_path"`
21747    new_path="$unix_path"
21748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21750    new_path="$unix_path"
21751  fi
21752
21753    # remove trailing .exe if any
21754    new_path="${new_path/%.exe/}"
21755
21756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21758  fi
21759
21760  else
21761    # We're on a posix platform. Hooray! :)
21762    # First separate the path from the arguments. This will split at the first
21763    # space.
21764    complete="$AR"
21765    path="${complete%% *}"
21766    tmp="$complete EOL"
21767    arguments="${tmp#* }"
21768
21769    # Cannot rely on the command "which" here since it doesn't always work.
21770    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21771    if test -z "$is_absolute_path"; then
21772      # Path to executable is not absolute. Find it.
21773      IFS_save="$IFS"
21774      IFS=:
21775      for p in $PATH; do
21776        if test -f "$p/$path" && test -x "$p/$path"; then
21777          new_path="$p/$path"
21778          break
21779        fi
21780      done
21781      IFS="$IFS_save"
21782    else
21783      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21784$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21785      new_path="$path"
21786    fi
21787
21788    if test "x$new_path" = x; then
21789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21790$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21791        has_space=`$ECHO "$complete" | $GREP " "`
21792        if test "x$has_space" != x; then
21793          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21795        fi
21796        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21797      fi
21798  fi
21799
21800      # Now join together the path and the arguments once again
21801      if test "x$arguments" != xEOL; then
21802        new_complete="$new_path ${arguments% *}"
21803      else
21804        new_complete="$new_path"
21805      fi
21806
21807  if test "x$complete" != "x$new_complete"; then
21808      AR="$new_complete"
21809      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21810$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21811    fi
21812
21813fi
21814if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21815    ARFLAGS="-r"
21816else
21817    ARFLAGS=""
21818fi
21819
21820
21821# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21822HOTSPOT_CXX="$CXX"
21823HOTSPOT_LD="$LD"
21824
21825
21826
21827COMPILER_NAME=gcc
21828COMPILER_TYPE=CC
21829if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21830
21831    # For now, assume that we are always compiling using cl.exe.
21832    CC_OUT_OPTION=-Fo
21833    EXE_OUT_OPTION=-out:
21834    LD_OUT_OPTION=-out:
21835    AR_OUT_OPTION=-out:
21836    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21837    # program for something completely different.
21838    # Extract the first word of "link", so it can be a program name with args.
21839set dummy link; ac_word=$2
21840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21841$as_echo_n "checking for $ac_word... " >&6; }
21842if test "${ac_cv_prog_WINLD+set}" = set; then :
21843  $as_echo_n "(cached) " >&6
21844else
21845  if test -n "$WINLD"; then
21846  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21847else
21848  ac_prog_rejected=no
21849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21850for as_dir in $PATH
21851do
21852  IFS=$as_save_IFS
21853  test -z "$as_dir" && as_dir=.
21854    for ac_exec_ext in '' $ac_executable_extensions; do
21855  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21856    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21857       ac_prog_rejected=yes
21858       continue
21859     fi
21860    ac_cv_prog_WINLD="link"
21861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21862    break 2
21863  fi
21864done
21865  done
21866IFS=$as_save_IFS
21867
21868if test $ac_prog_rejected = yes; then
21869  # We found a bogon in the path, so make sure we never use it.
21870  set dummy $ac_cv_prog_WINLD
21871  shift
21872  if test $# != 0; then
21873    # We chose a different compiler from the bogus one.
21874    # However, it has the same basename, so the bogon will be chosen
21875    # first if we set WINLD to just the basename; use the full file name.
21876    shift
21877    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21878  fi
21879fi
21880fi
21881fi
21882WINLD=$ac_cv_prog_WINLD
21883if test -n "$WINLD"; then
21884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21885$as_echo "$WINLD" >&6; }
21886else
21887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21888$as_echo "no" >&6; }
21889fi
21890
21891
21892    # Since we must ignore the first found link, WINLD will contain
21893    # the full path to the link.exe program.
21894
21895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21896
21897  # First separate the path from the arguments. This will split at the first
21898  # space.
21899  complete="$WINLD"
21900  path="${complete%% *}"
21901  tmp="$complete EOL"
21902  arguments="${tmp#* }"
21903
21904  # Input might be given as Windows format, start by converting to
21905  # unix format.
21906  new_path=`$CYGPATH -u "$path"`
21907
21908  # Now try to locate executable using which
21909  new_path=`$WHICH "$new_path" 2> /dev/null`
21910  # bat and cmd files are not always considered executable in cygwin causing which
21911  # to not find them
21912  if test "x$new_path" = x \
21913           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21914           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21915    new_path=`$CYGPATH -u "$path"`
21916  fi
21917  if test "x$new_path" = x; then
21918    # Oops. Which didn't find the executable.
21919    # The splitting of arguments from the executable at a space might have been incorrect,
21920    # since paths with space are more likely in Windows. Give it another try with the whole
21921    # argument.
21922    path="$complete"
21923    arguments="EOL"
21924    new_path=`$CYGPATH -u "$path"`
21925    new_path=`$WHICH "$new_path" 2> /dev/null`
21926    # bat and cmd files are not always considered executable in cygwin causing which
21927    # to not find them
21928    if test "x$new_path" = x \
21929             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21930             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21931      new_path=`$CYGPATH -u "$path"`
21932    fi
21933    if test "x$new_path" = x; then
21934      # It's still not found. Now this is an unrecoverable error.
21935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21936$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21937      has_space=`$ECHO "$complete" | $GREP " "`
21938      if test "x$has_space" != x; then
21939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21941      fi
21942      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21943    fi
21944  fi
21945
21946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21949  # "foo.exe" is OK but "foo" is an error.
21950  #
21951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21952  # It is also a way to make sure we got the proper file name for the real test later on.
21953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21954  if test "x$test_shortpath" = x; then
21955    # Short path failed, file does not exist as specified.
21956    # Try adding .exe or .cmd
21957    if test -f "${new_path}.exe"; then
21958       input_to_shortpath="${new_path}.exe"
21959    elif test -f "${new_path}.cmd"; then
21960       input_to_shortpath="${new_path}.cmd"
21961    else
21962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21963$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21964      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21965$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21966      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21967    fi
21968  else
21969    input_to_shortpath="$new_path"
21970  fi
21971
21972  # Call helper function which possibly converts this using DOS-style short mode.
21973  # If so, the updated path is stored in $new_path.
21974  new_path="$input_to_shortpath"
21975
21976  input_path="$input_to_shortpath"
21977  # Check if we need to convert this using DOS-style short mode. If the path
21978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21979  # take no chances and rewrite it.
21980  # Note: m4 eats our [], so we need to use [ and ] instead.
21981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21982  if test "x$has_forbidden_chars" != x; then
21983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21987      # Going to short mode and back again did indeed matter. Since short mode is
21988      # case insensitive, let's make it lowercase to improve readability.
21989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21990      # Now convert it back to Unix-stile (cygpath)
21991      input_path=`$CYGPATH -u "$shortmode_path"`
21992      new_path="$input_path"
21993    fi
21994  fi
21995
21996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21997  if test "x$test_cygdrive_prefix" = x; then
21998    # As a simple fix, exclude /usr/bin since it's not a real path.
21999    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22001      # a path prefixed by /cygdrive for fixpath to work.
22002      new_path="$CYGWIN_ROOT_PATH$input_path"
22003    fi
22004  fi
22005
22006  # remove trailing .exe if any
22007  new_path="${new_path/%.exe/}"
22008
22009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22010
22011  # First separate the path from the arguments. This will split at the first
22012  # space.
22013  complete="$WINLD"
22014  path="${complete%% *}"
22015  tmp="$complete EOL"
22016  arguments="${tmp#* }"
22017
22018  # Input might be given as Windows format, start by converting to
22019  # unix format.
22020  new_path="$path"
22021
22022  windows_path="$new_path"
22023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22024    unix_path=`$CYGPATH -u "$windows_path"`
22025    new_path="$unix_path"
22026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22028    new_path="$unix_path"
22029  fi
22030
22031
22032  # Now try to locate executable using which
22033  new_path=`$WHICH "$new_path" 2> /dev/null`
22034
22035  if test "x$new_path" = x; then
22036    # Oops. Which didn't find the executable.
22037    # The splitting of arguments from the executable at a space might have been incorrect,
22038    # since paths with space are more likely in Windows. Give it another try with the whole
22039    # argument.
22040    path="$complete"
22041    arguments="EOL"
22042    new_path="$path"
22043
22044  windows_path="$new_path"
22045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22046    unix_path=`$CYGPATH -u "$windows_path"`
22047    new_path="$unix_path"
22048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22050    new_path="$unix_path"
22051  fi
22052
22053
22054    new_path=`$WHICH "$new_path" 2> /dev/null`
22055
22056    if test "x$new_path" = x; then
22057      # It's still not found. Now this is an unrecoverable error.
22058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22059$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22060      has_space=`$ECHO "$complete" | $GREP " "`
22061      if test "x$has_space" != x; then
22062        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22063$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22064      fi
22065      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22066    fi
22067  fi
22068
22069  # Now new_path has a complete unix path to the binary
22070  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22071    # Keep paths in /bin as-is, but remove trailing .exe if any
22072    new_path="${new_path/%.exe/}"
22073    # Do not save /bin paths to all_fixpath_prefixes!
22074  else
22075    # Not in mixed or Windows style, start by that.
22076    new_path=`cmd //c echo $new_path`
22077
22078  input_path="$new_path"
22079  # Check if we need to convert this using DOS-style short mode. If the path
22080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22081  # take no chances and rewrite it.
22082  # Note: m4 eats our [], so we need to use [ and ] instead.
22083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22084  if test "x$has_forbidden_chars" != x; then
22085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22087  fi
22088
22089    # Output is in $new_path
22090
22091  windows_path="$new_path"
22092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22093    unix_path=`$CYGPATH -u "$windows_path"`
22094    new_path="$unix_path"
22095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22097    new_path="$unix_path"
22098  fi
22099
22100    # remove trailing .exe if any
22101    new_path="${new_path/%.exe/}"
22102
22103    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22104    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22105  fi
22106
22107  else
22108    # We're on a posix platform. Hooray! :)
22109    # First separate the path from the arguments. This will split at the first
22110    # space.
22111    complete="$WINLD"
22112    path="${complete%% *}"
22113    tmp="$complete EOL"
22114    arguments="${tmp#* }"
22115
22116    # Cannot rely on the command "which" here since it doesn't always work.
22117    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22118    if test -z "$is_absolute_path"; then
22119      # Path to executable is not absolute. Find it.
22120      IFS_save="$IFS"
22121      IFS=:
22122      for p in $PATH; do
22123        if test -f "$p/$path" && test -x "$p/$path"; then
22124          new_path="$p/$path"
22125          break
22126        fi
22127      done
22128      IFS="$IFS_save"
22129    else
22130      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22131$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22132      new_path="$path"
22133    fi
22134
22135    if test "x$new_path" = x; then
22136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22137$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22138        has_space=`$ECHO "$complete" | $GREP " "`
22139        if test "x$has_space" != x; then
22140          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22141$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22142        fi
22143        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22144      fi
22145  fi
22146
22147      # Now join together the path and the arguments once again
22148      if test "x$arguments" != xEOL; then
22149        new_complete="$new_path ${arguments% *}"
22150      else
22151        new_complete="$new_path"
22152      fi
22153
22154  if test "x$complete" != "x$new_complete"; then
22155      WINLD="$new_complete"
22156      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22157$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22158    fi
22159
22160    printf "Windows linker was found at $WINLD\n"
22161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22162$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22163    "$WINLD" --version > /dev/null
22164    if test $? -eq 0 ; then
22165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22166$as_echo "no" >&6; }
22167      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22168    else
22169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22170$as_echo "yes" >&6; }
22171    fi
22172    LD="$WINLD"
22173    LDEXE="$WINLD"
22174    LDCXX="$WINLD"
22175    LDEXECXX="$WINLD"
22176
22177    # Extract the first word of "mt", so it can be a program name with args.
22178set dummy mt; ac_word=$2
22179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22180$as_echo_n "checking for $ac_word... " >&6; }
22181if test "${ac_cv_prog_MT+set}" = set; then :
22182  $as_echo_n "(cached) " >&6
22183else
22184  if test -n "$MT"; then
22185  ac_cv_prog_MT="$MT" # Let the user override the test.
22186else
22187  ac_prog_rejected=no
22188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22189for as_dir in $PATH
22190do
22191  IFS=$as_save_IFS
22192  test -z "$as_dir" && as_dir=.
22193    for ac_exec_ext in '' $ac_executable_extensions; do
22194  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22195    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22196       ac_prog_rejected=yes
22197       continue
22198     fi
22199    ac_cv_prog_MT="mt"
22200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22201    break 2
22202  fi
22203done
22204  done
22205IFS=$as_save_IFS
22206
22207if test $ac_prog_rejected = yes; then
22208  # We found a bogon in the path, so make sure we never use it.
22209  set dummy $ac_cv_prog_MT
22210  shift
22211  if test $# != 0; then
22212    # We chose a different compiler from the bogus one.
22213    # However, it has the same basename, so the bogon will be chosen
22214    # first if we set MT to just the basename; use the full file name.
22215    shift
22216    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22217  fi
22218fi
22219fi
22220fi
22221MT=$ac_cv_prog_MT
22222if test -n "$MT"; then
22223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22224$as_echo "$MT" >&6; }
22225else
22226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22227$as_echo "no" >&6; }
22228fi
22229
22230
22231
22232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22233
22234  # First separate the path from the arguments. This will split at the first
22235  # space.
22236  complete="$MT"
22237  path="${complete%% *}"
22238  tmp="$complete EOL"
22239  arguments="${tmp#* }"
22240
22241  # Input might be given as Windows format, start by converting to
22242  # unix format.
22243  new_path=`$CYGPATH -u "$path"`
22244
22245  # Now try to locate executable using which
22246  new_path=`$WHICH "$new_path" 2> /dev/null`
22247  # bat and cmd files are not always considered executable in cygwin causing which
22248  # to not find them
22249  if test "x$new_path" = x \
22250           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22251           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22252    new_path=`$CYGPATH -u "$path"`
22253  fi
22254  if test "x$new_path" = x; then
22255    # Oops. Which didn't find the executable.
22256    # The splitting of arguments from the executable at a space might have been incorrect,
22257    # since paths with space are more likely in Windows. Give it another try with the whole
22258    # argument.
22259    path="$complete"
22260    arguments="EOL"
22261    new_path=`$CYGPATH -u "$path"`
22262    new_path=`$WHICH "$new_path" 2> /dev/null`
22263    # bat and cmd files are not always considered executable in cygwin causing which
22264    # to not find them
22265    if test "x$new_path" = x \
22266             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22267             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22268      new_path=`$CYGPATH -u "$path"`
22269    fi
22270    if test "x$new_path" = x; then
22271      # It's still not found. Now this is an unrecoverable error.
22272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22273$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22274      has_space=`$ECHO "$complete" | $GREP " "`
22275      if test "x$has_space" != x; then
22276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22278      fi
22279      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22280    fi
22281  fi
22282
22283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22286  # "foo.exe" is OK but "foo" is an error.
22287  #
22288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22289  # It is also a way to make sure we got the proper file name for the real test later on.
22290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22291  if test "x$test_shortpath" = x; then
22292    # Short path failed, file does not exist as specified.
22293    # Try adding .exe or .cmd
22294    if test -f "${new_path}.exe"; then
22295       input_to_shortpath="${new_path}.exe"
22296    elif test -f "${new_path}.cmd"; then
22297       input_to_shortpath="${new_path}.cmd"
22298    else
22299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22300$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22303      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22304    fi
22305  else
22306    input_to_shortpath="$new_path"
22307  fi
22308
22309  # Call helper function which possibly converts this using DOS-style short mode.
22310  # If so, the updated path is stored in $new_path.
22311  new_path="$input_to_shortpath"
22312
22313  input_path="$input_to_shortpath"
22314  # Check if we need to convert this using DOS-style short mode. If the path
22315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22316  # take no chances and rewrite it.
22317  # Note: m4 eats our [], so we need to use [ and ] instead.
22318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22319  if test "x$has_forbidden_chars" != x; then
22320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22324      # Going to short mode and back again did indeed matter. Since short mode is
22325      # case insensitive, let's make it lowercase to improve readability.
22326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22327      # Now convert it back to Unix-stile (cygpath)
22328      input_path=`$CYGPATH -u "$shortmode_path"`
22329      new_path="$input_path"
22330    fi
22331  fi
22332
22333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22334  if test "x$test_cygdrive_prefix" = x; then
22335    # As a simple fix, exclude /usr/bin since it's not a real path.
22336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22338      # a path prefixed by /cygdrive for fixpath to work.
22339      new_path="$CYGWIN_ROOT_PATH$input_path"
22340    fi
22341  fi
22342
22343  # remove trailing .exe if any
22344  new_path="${new_path/%.exe/}"
22345
22346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22347
22348  # First separate the path from the arguments. This will split at the first
22349  # space.
22350  complete="$MT"
22351  path="${complete%% *}"
22352  tmp="$complete EOL"
22353  arguments="${tmp#* }"
22354
22355  # Input might be given as Windows format, start by converting to
22356  # unix format.
22357  new_path="$path"
22358
22359  windows_path="$new_path"
22360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22361    unix_path=`$CYGPATH -u "$windows_path"`
22362    new_path="$unix_path"
22363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22365    new_path="$unix_path"
22366  fi
22367
22368
22369  # Now try to locate executable using which
22370  new_path=`$WHICH "$new_path" 2> /dev/null`
22371
22372  if test "x$new_path" = x; then
22373    # Oops. Which didn't find the executable.
22374    # The splitting of arguments from the executable at a space might have been incorrect,
22375    # since paths with space are more likely in Windows. Give it another try with the whole
22376    # argument.
22377    path="$complete"
22378    arguments="EOL"
22379    new_path="$path"
22380
22381  windows_path="$new_path"
22382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22383    unix_path=`$CYGPATH -u "$windows_path"`
22384    new_path="$unix_path"
22385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22387    new_path="$unix_path"
22388  fi
22389
22390
22391    new_path=`$WHICH "$new_path" 2> /dev/null`
22392
22393    if test "x$new_path" = x; then
22394      # It's still not found. Now this is an unrecoverable error.
22395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22396$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22397      has_space=`$ECHO "$complete" | $GREP " "`
22398      if test "x$has_space" != x; then
22399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22401      fi
22402      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22403    fi
22404  fi
22405
22406  # Now new_path has a complete unix path to the binary
22407  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22408    # Keep paths in /bin as-is, but remove trailing .exe if any
22409    new_path="${new_path/%.exe/}"
22410    # Do not save /bin paths to all_fixpath_prefixes!
22411  else
22412    # Not in mixed or Windows style, start by that.
22413    new_path=`cmd //c echo $new_path`
22414
22415  input_path="$new_path"
22416  # Check if we need to convert this using DOS-style short mode. If the path
22417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22418  # take no chances and rewrite it.
22419  # Note: m4 eats our [], so we need to use [ and ] instead.
22420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22421  if test "x$has_forbidden_chars" != x; then
22422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22424  fi
22425
22426    # Output is in $new_path
22427
22428  windows_path="$new_path"
22429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22430    unix_path=`$CYGPATH -u "$windows_path"`
22431    new_path="$unix_path"
22432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22434    new_path="$unix_path"
22435  fi
22436
22437    # remove trailing .exe if any
22438    new_path="${new_path/%.exe/}"
22439
22440    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22441    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22442  fi
22443
22444  else
22445    # We're on a posix platform. Hooray! :)
22446    # First separate the path from the arguments. This will split at the first
22447    # space.
22448    complete="$MT"
22449    path="${complete%% *}"
22450    tmp="$complete EOL"
22451    arguments="${tmp#* }"
22452
22453    # Cannot rely on the command "which" here since it doesn't always work.
22454    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22455    if test -z "$is_absolute_path"; then
22456      # Path to executable is not absolute. Find it.
22457      IFS_save="$IFS"
22458      IFS=:
22459      for p in $PATH; do
22460        if test -f "$p/$path" && test -x "$p/$path"; then
22461          new_path="$p/$path"
22462          break
22463        fi
22464      done
22465      IFS="$IFS_save"
22466    else
22467      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22468$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22469      new_path="$path"
22470    fi
22471
22472    if test "x$new_path" = x; then
22473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22474$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22475        has_space=`$ECHO "$complete" | $GREP " "`
22476        if test "x$has_space" != x; then
22477          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22479        fi
22480        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22481      fi
22482  fi
22483
22484      # Now join together the path and the arguments once again
22485      if test "x$arguments" != xEOL; then
22486        new_complete="$new_path ${arguments% *}"
22487      else
22488        new_complete="$new_path"
22489      fi
22490
22491  if test "x$complete" != "x$new_complete"; then
22492      MT="$new_complete"
22493      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22494$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22495    fi
22496
22497    # The resource compiler
22498    # Extract the first word of "rc", so it can be a program name with args.
22499set dummy rc; ac_word=$2
22500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22501$as_echo_n "checking for $ac_word... " >&6; }
22502if test "${ac_cv_prog_RC+set}" = set; then :
22503  $as_echo_n "(cached) " >&6
22504else
22505  if test -n "$RC"; then
22506  ac_cv_prog_RC="$RC" # Let the user override the test.
22507else
22508  ac_prog_rejected=no
22509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22510for as_dir in $PATH
22511do
22512  IFS=$as_save_IFS
22513  test -z "$as_dir" && as_dir=.
22514    for ac_exec_ext in '' $ac_executable_extensions; do
22515  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22516    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22517       ac_prog_rejected=yes
22518       continue
22519     fi
22520    ac_cv_prog_RC="rc"
22521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22522    break 2
22523  fi
22524done
22525  done
22526IFS=$as_save_IFS
22527
22528if test $ac_prog_rejected = yes; then
22529  # We found a bogon in the path, so make sure we never use it.
22530  set dummy $ac_cv_prog_RC
22531  shift
22532  if test $# != 0; then
22533    # We chose a different compiler from the bogus one.
22534    # However, it has the same basename, so the bogon will be chosen
22535    # first if we set RC to just the basename; use the full file name.
22536    shift
22537    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22538  fi
22539fi
22540fi
22541fi
22542RC=$ac_cv_prog_RC
22543if test -n "$RC"; then
22544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22545$as_echo "$RC" >&6; }
22546else
22547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22548$as_echo "no" >&6; }
22549fi
22550
22551
22552
22553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22554
22555  # First separate the path from the arguments. This will split at the first
22556  # space.
22557  complete="$RC"
22558  path="${complete%% *}"
22559  tmp="$complete EOL"
22560  arguments="${tmp#* }"
22561
22562  # Input might be given as Windows format, start by converting to
22563  # unix format.
22564  new_path=`$CYGPATH -u "$path"`
22565
22566  # Now try to locate executable using which
22567  new_path=`$WHICH "$new_path" 2> /dev/null`
22568  # bat and cmd files are not always considered executable in cygwin causing which
22569  # to not find them
22570  if test "x$new_path" = x \
22571           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22572           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22573    new_path=`$CYGPATH -u "$path"`
22574  fi
22575  if test "x$new_path" = x; then
22576    # Oops. Which didn't find the executable.
22577    # The splitting of arguments from the executable at a space might have been incorrect,
22578    # since paths with space are more likely in Windows. Give it another try with the whole
22579    # argument.
22580    path="$complete"
22581    arguments="EOL"
22582    new_path=`$CYGPATH -u "$path"`
22583    new_path=`$WHICH "$new_path" 2> /dev/null`
22584    # bat and cmd files are not always considered executable in cygwin causing which
22585    # to not find them
22586    if test "x$new_path" = x \
22587             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22588             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22589      new_path=`$CYGPATH -u "$path"`
22590    fi
22591    if test "x$new_path" = x; then
22592      # It's still not found. Now this is an unrecoverable error.
22593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22594$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22595      has_space=`$ECHO "$complete" | $GREP " "`
22596      if test "x$has_space" != x; then
22597        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22598$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22599      fi
22600      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22601    fi
22602  fi
22603
22604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22607  # "foo.exe" is OK but "foo" is an error.
22608  #
22609  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22610  # It is also a way to make sure we got the proper file name for the real test later on.
22611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22612  if test "x$test_shortpath" = x; then
22613    # Short path failed, file does not exist as specified.
22614    # Try adding .exe or .cmd
22615    if test -f "${new_path}.exe"; then
22616       input_to_shortpath="${new_path}.exe"
22617    elif test -f "${new_path}.cmd"; then
22618       input_to_shortpath="${new_path}.cmd"
22619    else
22620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22621$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22622      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22623$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22624      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22625    fi
22626  else
22627    input_to_shortpath="$new_path"
22628  fi
22629
22630  # Call helper function which possibly converts this using DOS-style short mode.
22631  # If so, the updated path is stored in $new_path.
22632  new_path="$input_to_shortpath"
22633
22634  input_path="$input_to_shortpath"
22635  # Check if we need to convert this using DOS-style short mode. If the path
22636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22637  # take no chances and rewrite it.
22638  # Note: m4 eats our [], so we need to use [ and ] instead.
22639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22640  if test "x$has_forbidden_chars" != x; then
22641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22645      # Going to short mode and back again did indeed matter. Since short mode is
22646      # case insensitive, let's make it lowercase to improve readability.
22647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22648      # Now convert it back to Unix-stile (cygpath)
22649      input_path=`$CYGPATH -u "$shortmode_path"`
22650      new_path="$input_path"
22651    fi
22652  fi
22653
22654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22655  if test "x$test_cygdrive_prefix" = x; then
22656    # As a simple fix, exclude /usr/bin since it's not a real path.
22657    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22659      # a path prefixed by /cygdrive for fixpath to work.
22660      new_path="$CYGWIN_ROOT_PATH$input_path"
22661    fi
22662  fi
22663
22664  # remove trailing .exe if any
22665  new_path="${new_path/%.exe/}"
22666
22667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22668
22669  # First separate the path from the arguments. This will split at the first
22670  # space.
22671  complete="$RC"
22672  path="${complete%% *}"
22673  tmp="$complete EOL"
22674  arguments="${tmp#* }"
22675
22676  # Input might be given as Windows format, start by converting to
22677  # unix format.
22678  new_path="$path"
22679
22680  windows_path="$new_path"
22681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22682    unix_path=`$CYGPATH -u "$windows_path"`
22683    new_path="$unix_path"
22684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22686    new_path="$unix_path"
22687  fi
22688
22689
22690  # Now try to locate executable using which
22691  new_path=`$WHICH "$new_path" 2> /dev/null`
22692
22693  if test "x$new_path" = x; then
22694    # Oops. Which didn't find the executable.
22695    # The splitting of arguments from the executable at a space might have been incorrect,
22696    # since paths with space are more likely in Windows. Give it another try with the whole
22697    # argument.
22698    path="$complete"
22699    arguments="EOL"
22700    new_path="$path"
22701
22702  windows_path="$new_path"
22703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22704    unix_path=`$CYGPATH -u "$windows_path"`
22705    new_path="$unix_path"
22706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22708    new_path="$unix_path"
22709  fi
22710
22711
22712    new_path=`$WHICH "$new_path" 2> /dev/null`
22713
22714    if test "x$new_path" = x; then
22715      # It's still not found. Now this is an unrecoverable error.
22716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22717$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22718      has_space=`$ECHO "$complete" | $GREP " "`
22719      if test "x$has_space" != x; then
22720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22722      fi
22723      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22724    fi
22725  fi
22726
22727  # Now new_path has a complete unix path to the binary
22728  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22729    # Keep paths in /bin as-is, but remove trailing .exe if any
22730    new_path="${new_path/%.exe/}"
22731    # Do not save /bin paths to all_fixpath_prefixes!
22732  else
22733    # Not in mixed or Windows style, start by that.
22734    new_path=`cmd //c echo $new_path`
22735
22736  input_path="$new_path"
22737  # Check if we need to convert this using DOS-style short mode. If the path
22738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22739  # take no chances and rewrite it.
22740  # Note: m4 eats our [], so we need to use [ and ] instead.
22741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22742  if test "x$has_forbidden_chars" != x; then
22743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22745  fi
22746
22747    # Output is in $new_path
22748
22749  windows_path="$new_path"
22750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22751    unix_path=`$CYGPATH -u "$windows_path"`
22752    new_path="$unix_path"
22753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22755    new_path="$unix_path"
22756  fi
22757
22758    # remove trailing .exe if any
22759    new_path="${new_path/%.exe/}"
22760
22761    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22762    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22763  fi
22764
22765  else
22766    # We're on a posix platform. Hooray! :)
22767    # First separate the path from the arguments. This will split at the first
22768    # space.
22769    complete="$RC"
22770    path="${complete%% *}"
22771    tmp="$complete EOL"
22772    arguments="${tmp#* }"
22773
22774    # Cannot rely on the command "which" here since it doesn't always work.
22775    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22776    if test -z "$is_absolute_path"; then
22777      # Path to executable is not absolute. Find it.
22778      IFS_save="$IFS"
22779      IFS=:
22780      for p in $PATH; do
22781        if test -f "$p/$path" && test -x "$p/$path"; then
22782          new_path="$p/$path"
22783          break
22784        fi
22785      done
22786      IFS="$IFS_save"
22787    else
22788      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22789$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22790      new_path="$path"
22791    fi
22792
22793    if test "x$new_path" = x; then
22794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22795$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22796        has_space=`$ECHO "$complete" | $GREP " "`
22797        if test "x$has_space" != x; then
22798          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22799$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22800        fi
22801        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22802      fi
22803  fi
22804
22805      # Now join together the path and the arguments once again
22806      if test "x$arguments" != xEOL; then
22807        new_complete="$new_path ${arguments% *}"
22808      else
22809        new_complete="$new_path"
22810      fi
22811
22812  if test "x$complete" != "x$new_complete"; then
22813      RC="$new_complete"
22814      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22815$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22816    fi
22817
22818
22819    # For hotspot, we need these in Windows mixed path,
22820    # so rewrite them all. Need added .exe suffix.
22821    HOTSPOT_CXX="$CXX.exe"
22822    HOTSPOT_LD="$LD.exe"
22823    HOTSPOT_MT="$MT.exe"
22824    HOTSPOT_RC="$RC.exe"
22825
22826  unix_path="$HOTSPOT_CXX"
22827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22828    windows_path=`$CYGPATH -m "$unix_path"`
22829    HOTSPOT_CXX="$windows_path"
22830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22831    windows_path=`cmd //c echo $unix_path`
22832    HOTSPOT_CXX="$windows_path"
22833  fi
22834
22835
22836  unix_path="$HOTSPOT_LD"
22837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22838    windows_path=`$CYGPATH -m "$unix_path"`
22839    HOTSPOT_LD="$windows_path"
22840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22841    windows_path=`cmd //c echo $unix_path`
22842    HOTSPOT_LD="$windows_path"
22843  fi
22844
22845
22846  unix_path="$HOTSPOT_MT"
22847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22848    windows_path=`$CYGPATH -m "$unix_path"`
22849    HOTSPOT_MT="$windows_path"
22850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22851    windows_path=`cmd //c echo $unix_path`
22852    HOTSPOT_MT="$windows_path"
22853  fi
22854
22855
22856  unix_path="$HOTSPOT_RC"
22857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22858    windows_path=`$CYGPATH -m "$unix_path"`
22859    HOTSPOT_RC="$windows_path"
22860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22861    windows_path=`cmd //c echo $unix_path`
22862    HOTSPOT_RC="$windows_path"
22863  fi
22864
22865
22866
22867
22868    RC_FLAGS="-nologo -l 0x409 -r"
22869    if test "x$VARIANT" = xOPT; then :
22870
22871        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22872
22873fi
22874    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22875    if test "x$JDK_UPDATE_VERSION" = x; then :
22876
22877        JDK_UPDATE_VERSION_NOTNULL=0
22878
22879fi
22880    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22881    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22882    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22883    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22884    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22885    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22886    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22887
22888    # lib.exe is used to create static libraries.
22889    # Extract the first word of "lib", so it can be a program name with args.
22890set dummy lib; ac_word=$2
22891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22892$as_echo_n "checking for $ac_word... " >&6; }
22893if test "${ac_cv_prog_WINAR+set}" = set; then :
22894  $as_echo_n "(cached) " >&6
22895else
22896  if test -n "$WINAR"; then
22897  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22898else
22899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22900for as_dir in $PATH
22901do
22902  IFS=$as_save_IFS
22903  test -z "$as_dir" && as_dir=.
22904    for ac_exec_ext in '' $ac_executable_extensions; do
22905  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22906    ac_cv_prog_WINAR="lib"
22907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22908    break 2
22909  fi
22910done
22911  done
22912IFS=$as_save_IFS
22913
22914fi
22915fi
22916WINAR=$ac_cv_prog_WINAR
22917if test -n "$WINAR"; then
22918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22919$as_echo "$WINAR" >&6; }
22920else
22921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22922$as_echo "no" >&6; }
22923fi
22924
22925
22926
22927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22928
22929  # First separate the path from the arguments. This will split at the first
22930  # space.
22931  complete="$WINAR"
22932  path="${complete%% *}"
22933  tmp="$complete EOL"
22934  arguments="${tmp#* }"
22935
22936  # Input might be given as Windows format, start by converting to
22937  # unix format.
22938  new_path=`$CYGPATH -u "$path"`
22939
22940  # Now try to locate executable using which
22941  new_path=`$WHICH "$new_path" 2> /dev/null`
22942  # bat and cmd files are not always considered executable in cygwin causing which
22943  # to not find them
22944  if test "x$new_path" = x \
22945           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22946           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22947    new_path=`$CYGPATH -u "$path"`
22948  fi
22949  if test "x$new_path" = x; then
22950    # Oops. Which didn't find the executable.
22951    # The splitting of arguments from the executable at a space might have been incorrect,
22952    # since paths with space are more likely in Windows. Give it another try with the whole
22953    # argument.
22954    path="$complete"
22955    arguments="EOL"
22956    new_path=`$CYGPATH -u "$path"`
22957    new_path=`$WHICH "$new_path" 2> /dev/null`
22958    # bat and cmd files are not always considered executable in cygwin causing which
22959    # to not find them
22960    if test "x$new_path" = x \
22961             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22962             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22963      new_path=`$CYGPATH -u "$path"`
22964    fi
22965    if test "x$new_path" = x; then
22966      # It's still not found. Now this is an unrecoverable error.
22967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22968$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22969      has_space=`$ECHO "$complete" | $GREP " "`
22970      if test "x$has_space" != x; then
22971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22973      fi
22974      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22975    fi
22976  fi
22977
22978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22981  # "foo.exe" is OK but "foo" is an error.
22982  #
22983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22984  # It is also a way to make sure we got the proper file name for the real test later on.
22985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22986  if test "x$test_shortpath" = x; then
22987    # Short path failed, file does not exist as specified.
22988    # Try adding .exe or .cmd
22989    if test -f "${new_path}.exe"; then
22990       input_to_shortpath="${new_path}.exe"
22991    elif test -f "${new_path}.cmd"; then
22992       input_to_shortpath="${new_path}.cmd"
22993    else
22994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22995$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22996      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22997$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22998      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22999    fi
23000  else
23001    input_to_shortpath="$new_path"
23002  fi
23003
23004  # Call helper function which possibly converts this using DOS-style short mode.
23005  # If so, the updated path is stored in $new_path.
23006  new_path="$input_to_shortpath"
23007
23008  input_path="$input_to_shortpath"
23009  # Check if we need to convert this using DOS-style short mode. If the path
23010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23011  # take no chances and rewrite it.
23012  # Note: m4 eats our [], so we need to use [ and ] instead.
23013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23014  if test "x$has_forbidden_chars" != x; then
23015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23019      # Going to short mode and back again did indeed matter. Since short mode is
23020      # case insensitive, let's make it lowercase to improve readability.
23021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23022      # Now convert it back to Unix-stile (cygpath)
23023      input_path=`$CYGPATH -u "$shortmode_path"`
23024      new_path="$input_path"
23025    fi
23026  fi
23027
23028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23029  if test "x$test_cygdrive_prefix" = x; then
23030    # As a simple fix, exclude /usr/bin since it's not a real path.
23031    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23033      # a path prefixed by /cygdrive for fixpath to work.
23034      new_path="$CYGWIN_ROOT_PATH$input_path"
23035    fi
23036  fi
23037
23038  # remove trailing .exe if any
23039  new_path="${new_path/%.exe/}"
23040
23041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23042
23043  # First separate the path from the arguments. This will split at the first
23044  # space.
23045  complete="$WINAR"
23046  path="${complete%% *}"
23047  tmp="$complete EOL"
23048  arguments="${tmp#* }"
23049
23050  # Input might be given as Windows format, start by converting to
23051  # unix format.
23052  new_path="$path"
23053
23054  windows_path="$new_path"
23055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23056    unix_path=`$CYGPATH -u "$windows_path"`
23057    new_path="$unix_path"
23058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23060    new_path="$unix_path"
23061  fi
23062
23063
23064  # Now try to locate executable using which
23065  new_path=`$WHICH "$new_path" 2> /dev/null`
23066
23067  if test "x$new_path" = x; then
23068    # Oops. Which didn't find the executable.
23069    # The splitting of arguments from the executable at a space might have been incorrect,
23070    # since paths with space are more likely in Windows. Give it another try with the whole
23071    # argument.
23072    path="$complete"
23073    arguments="EOL"
23074    new_path="$path"
23075
23076  windows_path="$new_path"
23077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23078    unix_path=`$CYGPATH -u "$windows_path"`
23079    new_path="$unix_path"
23080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23082    new_path="$unix_path"
23083  fi
23084
23085
23086    new_path=`$WHICH "$new_path" 2> /dev/null`
23087
23088    if test "x$new_path" = x; then
23089      # It's still not found. Now this is an unrecoverable error.
23090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23091$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23092      has_space=`$ECHO "$complete" | $GREP " "`
23093      if test "x$has_space" != x; then
23094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23096      fi
23097      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23098    fi
23099  fi
23100
23101  # Now new_path has a complete unix path to the binary
23102  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23103    # Keep paths in /bin as-is, but remove trailing .exe if any
23104    new_path="${new_path/%.exe/}"
23105    # Do not save /bin paths to all_fixpath_prefixes!
23106  else
23107    # Not in mixed or Windows style, start by that.
23108    new_path=`cmd //c echo $new_path`
23109
23110  input_path="$new_path"
23111  # Check if we need to convert this using DOS-style short mode. If the path
23112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23113  # take no chances and rewrite it.
23114  # Note: m4 eats our [], so we need to use [ and ] instead.
23115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23116  if test "x$has_forbidden_chars" != x; then
23117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23119  fi
23120
23121    # Output is in $new_path
23122
23123  windows_path="$new_path"
23124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23125    unix_path=`$CYGPATH -u "$windows_path"`
23126    new_path="$unix_path"
23127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23129    new_path="$unix_path"
23130  fi
23131
23132    # remove trailing .exe if any
23133    new_path="${new_path/%.exe/}"
23134
23135    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23136    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23137  fi
23138
23139  else
23140    # We're on a posix platform. Hooray! :)
23141    # First separate the path from the arguments. This will split at the first
23142    # space.
23143    complete="$WINAR"
23144    path="${complete%% *}"
23145    tmp="$complete EOL"
23146    arguments="${tmp#* }"
23147
23148    # Cannot rely on the command "which" here since it doesn't always work.
23149    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23150    if test -z "$is_absolute_path"; then
23151      # Path to executable is not absolute. Find it.
23152      IFS_save="$IFS"
23153      IFS=:
23154      for p in $PATH; do
23155        if test -f "$p/$path" && test -x "$p/$path"; then
23156          new_path="$p/$path"
23157          break
23158        fi
23159      done
23160      IFS="$IFS_save"
23161    else
23162      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23163$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23164      new_path="$path"
23165    fi
23166
23167    if test "x$new_path" = x; then
23168        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23169$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23170        has_space=`$ECHO "$complete" | $GREP " "`
23171        if test "x$has_space" != x; then
23172          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23173$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23174        fi
23175        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23176      fi
23177  fi
23178
23179      # Now join together the path and the arguments once again
23180      if test "x$arguments" != xEOL; then
23181        new_complete="$new_path ${arguments% *}"
23182      else
23183        new_complete="$new_path"
23184      fi
23185
23186  if test "x$complete" != "x$new_complete"; then
23187      WINAR="$new_complete"
23188      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23189$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23190    fi
23191
23192    AR="$WINAR"
23193    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23194
23195    # Extract the first word of "dumpbin", so it can be a program name with args.
23196set dummy dumpbin; ac_word=$2
23197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23198$as_echo_n "checking for $ac_word... " >&6; }
23199if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23200  $as_echo_n "(cached) " >&6
23201else
23202  if test -n "$DUMPBIN"; then
23203  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23204else
23205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23206for as_dir in $PATH
23207do
23208  IFS=$as_save_IFS
23209  test -z "$as_dir" && as_dir=.
23210    for ac_exec_ext in '' $ac_executable_extensions; do
23211  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23212    ac_cv_prog_DUMPBIN="dumpbin"
23213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23214    break 2
23215  fi
23216done
23217  done
23218IFS=$as_save_IFS
23219
23220fi
23221fi
23222DUMPBIN=$ac_cv_prog_DUMPBIN
23223if test -n "$DUMPBIN"; then
23224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23225$as_echo "$DUMPBIN" >&6; }
23226else
23227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23228$as_echo "no" >&6; }
23229fi
23230
23231
23232
23233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23234
23235  # First separate the path from the arguments. This will split at the first
23236  # space.
23237  complete="$DUMPBIN"
23238  path="${complete%% *}"
23239  tmp="$complete EOL"
23240  arguments="${tmp#* }"
23241
23242  # Input might be given as Windows format, start by converting to
23243  # unix format.
23244  new_path=`$CYGPATH -u "$path"`
23245
23246  # Now try to locate executable using which
23247  new_path=`$WHICH "$new_path" 2> /dev/null`
23248  # bat and cmd files are not always considered executable in cygwin causing which
23249  # to not find them
23250  if test "x$new_path" = x \
23251           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23252           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23253    new_path=`$CYGPATH -u "$path"`
23254  fi
23255  if test "x$new_path" = x; then
23256    # Oops. Which didn't find the executable.
23257    # The splitting of arguments from the executable at a space might have been incorrect,
23258    # since paths with space are more likely in Windows. Give it another try with the whole
23259    # argument.
23260    path="$complete"
23261    arguments="EOL"
23262    new_path=`$CYGPATH -u "$path"`
23263    new_path=`$WHICH "$new_path" 2> /dev/null`
23264    # bat and cmd files are not always considered executable in cygwin causing which
23265    # to not find them
23266    if test "x$new_path" = x \
23267             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23268             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23269      new_path=`$CYGPATH -u "$path"`
23270    fi
23271    if test "x$new_path" = x; then
23272      # It's still not found. Now this is an unrecoverable error.
23273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23274$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23275      has_space=`$ECHO "$complete" | $GREP " "`
23276      if test "x$has_space" != x; then
23277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23279      fi
23280      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23281    fi
23282  fi
23283
23284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23287  # "foo.exe" is OK but "foo" is an error.
23288  #
23289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23290  # It is also a way to make sure we got the proper file name for the real test later on.
23291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23292  if test "x$test_shortpath" = x; then
23293    # Short path failed, file does not exist as specified.
23294    # Try adding .exe or .cmd
23295    if test -f "${new_path}.exe"; then
23296       input_to_shortpath="${new_path}.exe"
23297    elif test -f "${new_path}.cmd"; then
23298       input_to_shortpath="${new_path}.cmd"
23299    else
23300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23301$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23304      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23305    fi
23306  else
23307    input_to_shortpath="$new_path"
23308  fi
23309
23310  # Call helper function which possibly converts this using DOS-style short mode.
23311  # If so, the updated path is stored in $new_path.
23312  new_path="$input_to_shortpath"
23313
23314  input_path="$input_to_shortpath"
23315  # Check if we need to convert this using DOS-style short mode. If the path
23316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23317  # take no chances and rewrite it.
23318  # Note: m4 eats our [], so we need to use [ and ] instead.
23319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23320  if test "x$has_forbidden_chars" != x; then
23321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23325      # Going to short mode and back again did indeed matter. Since short mode is
23326      # case insensitive, let's make it lowercase to improve readability.
23327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23328      # Now convert it back to Unix-stile (cygpath)
23329      input_path=`$CYGPATH -u "$shortmode_path"`
23330      new_path="$input_path"
23331    fi
23332  fi
23333
23334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23335  if test "x$test_cygdrive_prefix" = x; then
23336    # As a simple fix, exclude /usr/bin since it's not a real path.
23337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23339      # a path prefixed by /cygdrive for fixpath to work.
23340      new_path="$CYGWIN_ROOT_PATH$input_path"
23341    fi
23342  fi
23343
23344  # remove trailing .exe if any
23345  new_path="${new_path/%.exe/}"
23346
23347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23348
23349  # First separate the path from the arguments. This will split at the first
23350  # space.
23351  complete="$DUMPBIN"
23352  path="${complete%% *}"
23353  tmp="$complete EOL"
23354  arguments="${tmp#* }"
23355
23356  # Input might be given as Windows format, start by converting to
23357  # unix format.
23358  new_path="$path"
23359
23360  windows_path="$new_path"
23361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23362    unix_path=`$CYGPATH -u "$windows_path"`
23363    new_path="$unix_path"
23364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23366    new_path="$unix_path"
23367  fi
23368
23369
23370  # Now try to locate executable using which
23371  new_path=`$WHICH "$new_path" 2> /dev/null`
23372
23373  if test "x$new_path" = x; then
23374    # Oops. Which didn't find the executable.
23375    # The splitting of arguments from the executable at a space might have been incorrect,
23376    # since paths with space are more likely in Windows. Give it another try with the whole
23377    # argument.
23378    path="$complete"
23379    arguments="EOL"
23380    new_path="$path"
23381
23382  windows_path="$new_path"
23383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23384    unix_path=`$CYGPATH -u "$windows_path"`
23385    new_path="$unix_path"
23386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23388    new_path="$unix_path"
23389  fi
23390
23391
23392    new_path=`$WHICH "$new_path" 2> /dev/null`
23393
23394    if test "x$new_path" = x; then
23395      # It's still not found. Now this is an unrecoverable error.
23396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23397$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23398      has_space=`$ECHO "$complete" | $GREP " "`
23399      if test "x$has_space" != x; then
23400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23402      fi
23403      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23404    fi
23405  fi
23406
23407  # Now new_path has a complete unix path to the binary
23408  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23409    # Keep paths in /bin as-is, but remove trailing .exe if any
23410    new_path="${new_path/%.exe/}"
23411    # Do not save /bin paths to all_fixpath_prefixes!
23412  else
23413    # Not in mixed or Windows style, start by that.
23414    new_path=`cmd //c echo $new_path`
23415
23416  input_path="$new_path"
23417  # Check if we need to convert this using DOS-style short mode. If the path
23418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23419  # take no chances and rewrite it.
23420  # Note: m4 eats our [], so we need to use [ and ] instead.
23421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23422  if test "x$has_forbidden_chars" != x; then
23423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23425  fi
23426
23427    # Output is in $new_path
23428
23429  windows_path="$new_path"
23430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23431    unix_path=`$CYGPATH -u "$windows_path"`
23432    new_path="$unix_path"
23433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23435    new_path="$unix_path"
23436  fi
23437
23438    # remove trailing .exe if any
23439    new_path="${new_path/%.exe/}"
23440
23441    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23442    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23443  fi
23444
23445  else
23446    # We're on a posix platform. Hooray! :)
23447    # First separate the path from the arguments. This will split at the first
23448    # space.
23449    complete="$DUMPBIN"
23450    path="${complete%% *}"
23451    tmp="$complete EOL"
23452    arguments="${tmp#* }"
23453
23454    # Cannot rely on the command "which" here since it doesn't always work.
23455    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23456    if test -z "$is_absolute_path"; then
23457      # Path to executable is not absolute. Find it.
23458      IFS_save="$IFS"
23459      IFS=:
23460      for p in $PATH; do
23461        if test -f "$p/$path" && test -x "$p/$path"; then
23462          new_path="$p/$path"
23463          break
23464        fi
23465      done
23466      IFS="$IFS_save"
23467    else
23468      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23469$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23470      new_path="$path"
23471    fi
23472
23473    if test "x$new_path" = x; then
23474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23475$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23476        has_space=`$ECHO "$complete" | $GREP " "`
23477        if test "x$has_space" != x; then
23478          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23479$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23480        fi
23481        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23482      fi
23483  fi
23484
23485      # Now join together the path and the arguments once again
23486      if test "x$arguments" != xEOL; then
23487        new_complete="$new_path ${arguments% *}"
23488      else
23489        new_complete="$new_path"
23490      fi
23491
23492  if test "x$complete" != "x$new_complete"; then
23493      DUMPBIN="$new_complete"
23494      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23495$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23496    fi
23497
23498
23499    COMPILER_TYPE=CL
23500    CCXXFLAGS="$CCXXFLAGS -nologo"
23501
23502fi
23503
23504
23505
23506ac_ext=c
23507ac_cpp='$CPP $CPPFLAGS'
23508ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23509ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23510ac_compiler_gnu=$ac_cv_c_compiler_gnu
23511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23512$as_echo_n "checking how to run the C preprocessor... " >&6; }
23513# On Suns, sometimes $CPP names a directory.
23514if test -n "$CPP" && test -d "$CPP"; then
23515  CPP=
23516fi
23517if test -z "$CPP"; then
23518  if test "${ac_cv_prog_CPP+set}" = set; then :
23519  $as_echo_n "(cached) " >&6
23520else
23521      # Double quotes because CPP needs to be expanded
23522    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23523    do
23524      ac_preproc_ok=false
23525for ac_c_preproc_warn_flag in '' yes
23526do
23527  # Use a header file that comes with gcc, so configuring glibc
23528  # with a fresh cross-compiler works.
23529  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23530  # <limits.h> exists even on freestanding compilers.
23531  # On the NeXT, cc -E runs the code through the compiler's parser,
23532  # not just through cpp. "Syntax error" is here to catch this case.
23533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23534/* end confdefs.h.  */
23535#ifdef __STDC__
23536# include <limits.h>
23537#else
23538# include <assert.h>
23539#endif
23540		     Syntax error
23541_ACEOF
23542if ac_fn_c_try_cpp "$LINENO"; then :
23543
23544else
23545  # Broken: fails on valid input.
23546continue
23547fi
23548rm -f conftest.err conftest.i conftest.$ac_ext
23549
23550  # OK, works on sane cases.  Now check whether nonexistent headers
23551  # can be detected and how.
23552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23553/* end confdefs.h.  */
23554#include <ac_nonexistent.h>
23555_ACEOF
23556if ac_fn_c_try_cpp "$LINENO"; then :
23557  # Broken: success on invalid input.
23558continue
23559else
23560  # Passes both tests.
23561ac_preproc_ok=:
23562break
23563fi
23564rm -f conftest.err conftest.i conftest.$ac_ext
23565
23566done
23567# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23568rm -f conftest.i conftest.err conftest.$ac_ext
23569if $ac_preproc_ok; then :
23570  break
23571fi
23572
23573    done
23574    ac_cv_prog_CPP=$CPP
23575
23576fi
23577  CPP=$ac_cv_prog_CPP
23578else
23579  ac_cv_prog_CPP=$CPP
23580fi
23581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23582$as_echo "$CPP" >&6; }
23583ac_preproc_ok=false
23584for ac_c_preproc_warn_flag in '' yes
23585do
23586  # Use a header file that comes with gcc, so configuring glibc
23587  # with a fresh cross-compiler works.
23588  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23589  # <limits.h> exists even on freestanding compilers.
23590  # On the NeXT, cc -E runs the code through the compiler's parser,
23591  # not just through cpp. "Syntax error" is here to catch this case.
23592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23593/* end confdefs.h.  */
23594#ifdef __STDC__
23595# include <limits.h>
23596#else
23597# include <assert.h>
23598#endif
23599		     Syntax error
23600_ACEOF
23601if ac_fn_c_try_cpp "$LINENO"; then :
23602
23603else
23604  # Broken: fails on valid input.
23605continue
23606fi
23607rm -f conftest.err conftest.i conftest.$ac_ext
23608
23609  # OK, works on sane cases.  Now check whether nonexistent headers
23610  # can be detected and how.
23611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23612/* end confdefs.h.  */
23613#include <ac_nonexistent.h>
23614_ACEOF
23615if ac_fn_c_try_cpp "$LINENO"; then :
23616  # Broken: success on invalid input.
23617continue
23618else
23619  # Passes both tests.
23620ac_preproc_ok=:
23621break
23622fi
23623rm -f conftest.err conftest.i conftest.$ac_ext
23624
23625done
23626# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23627rm -f conftest.i conftest.err conftest.$ac_ext
23628if $ac_preproc_ok; then :
23629
23630else
23631  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23633as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23634See \`config.log' for more details" "$LINENO" 5 ; }
23635fi
23636
23637ac_ext=cpp
23638ac_cpp='$CXXCPP $CPPFLAGS'
23639ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23640ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23641ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23642
23643
23644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23645
23646  # First separate the path from the arguments. This will split at the first
23647  # space.
23648  complete="$CPP"
23649  path="${complete%% *}"
23650  tmp="$complete EOL"
23651  arguments="${tmp#* }"
23652
23653  # Input might be given as Windows format, start by converting to
23654  # unix format.
23655  new_path=`$CYGPATH -u "$path"`
23656
23657  # Now try to locate executable using which
23658  new_path=`$WHICH "$new_path" 2> /dev/null`
23659  # bat and cmd files are not always considered executable in cygwin causing which
23660  # to not find them
23661  if test "x$new_path" = x \
23662           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23663           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23664    new_path=`$CYGPATH -u "$path"`
23665  fi
23666  if test "x$new_path" = x; then
23667    # Oops. Which didn't find the executable.
23668    # The splitting of arguments from the executable at a space might have been incorrect,
23669    # since paths with space are more likely in Windows. Give it another try with the whole
23670    # argument.
23671    path="$complete"
23672    arguments="EOL"
23673    new_path=`$CYGPATH -u "$path"`
23674    new_path=`$WHICH "$new_path" 2> /dev/null`
23675    # bat and cmd files are not always considered executable in cygwin causing which
23676    # to not find them
23677    if test "x$new_path" = x \
23678             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23679             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23680      new_path=`$CYGPATH -u "$path"`
23681    fi
23682    if test "x$new_path" = x; then
23683      # It's still not found. Now this is an unrecoverable error.
23684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23685$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23686      has_space=`$ECHO "$complete" | $GREP " "`
23687      if test "x$has_space" != x; then
23688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23690      fi
23691      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23692    fi
23693  fi
23694
23695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23698  # "foo.exe" is OK but "foo" is an error.
23699  #
23700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23701  # It is also a way to make sure we got the proper file name for the real test later on.
23702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23703  if test "x$test_shortpath" = x; then
23704    # Short path failed, file does not exist as specified.
23705    # Try adding .exe or .cmd
23706    if test -f "${new_path}.exe"; then
23707       input_to_shortpath="${new_path}.exe"
23708    elif test -f "${new_path}.cmd"; then
23709       input_to_shortpath="${new_path}.cmd"
23710    else
23711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23712$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23713      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23714$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23715      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23716    fi
23717  else
23718    input_to_shortpath="$new_path"
23719  fi
23720
23721  # Call helper function which possibly converts this using DOS-style short mode.
23722  # If so, the updated path is stored in $new_path.
23723  new_path="$input_to_shortpath"
23724
23725  input_path="$input_to_shortpath"
23726  # Check if we need to convert this using DOS-style short mode. If the path
23727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23728  # take no chances and rewrite it.
23729  # Note: m4 eats our [], so we need to use [ and ] instead.
23730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23731  if test "x$has_forbidden_chars" != x; then
23732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23736      # Going to short mode and back again did indeed matter. Since short mode is
23737      # case insensitive, let's make it lowercase to improve readability.
23738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23739      # Now convert it back to Unix-stile (cygpath)
23740      input_path=`$CYGPATH -u "$shortmode_path"`
23741      new_path="$input_path"
23742    fi
23743  fi
23744
23745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23746  if test "x$test_cygdrive_prefix" = x; then
23747    # As a simple fix, exclude /usr/bin since it's not a real path.
23748    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23750      # a path prefixed by /cygdrive for fixpath to work.
23751      new_path="$CYGWIN_ROOT_PATH$input_path"
23752    fi
23753  fi
23754
23755  # remove trailing .exe if any
23756  new_path="${new_path/%.exe/}"
23757
23758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23759
23760  # First separate the path from the arguments. This will split at the first
23761  # space.
23762  complete="$CPP"
23763  path="${complete%% *}"
23764  tmp="$complete EOL"
23765  arguments="${tmp#* }"
23766
23767  # Input might be given as Windows format, start by converting to
23768  # unix format.
23769  new_path="$path"
23770
23771  windows_path="$new_path"
23772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23773    unix_path=`$CYGPATH -u "$windows_path"`
23774    new_path="$unix_path"
23775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23777    new_path="$unix_path"
23778  fi
23779
23780
23781  # Now try to locate executable using which
23782  new_path=`$WHICH "$new_path" 2> /dev/null`
23783
23784  if test "x$new_path" = x; then
23785    # Oops. Which didn't find the executable.
23786    # The splitting of arguments from the executable at a space might have been incorrect,
23787    # since paths with space are more likely in Windows. Give it another try with the whole
23788    # argument.
23789    path="$complete"
23790    arguments="EOL"
23791    new_path="$path"
23792
23793  windows_path="$new_path"
23794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23795    unix_path=`$CYGPATH -u "$windows_path"`
23796    new_path="$unix_path"
23797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23799    new_path="$unix_path"
23800  fi
23801
23802
23803    new_path=`$WHICH "$new_path" 2> /dev/null`
23804
23805    if test "x$new_path" = x; then
23806      # It's still not found. Now this is an unrecoverable error.
23807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23808$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23809      has_space=`$ECHO "$complete" | $GREP " "`
23810      if test "x$has_space" != x; then
23811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23813      fi
23814      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23815    fi
23816  fi
23817
23818  # Now new_path has a complete unix path to the binary
23819  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23820    # Keep paths in /bin as-is, but remove trailing .exe if any
23821    new_path="${new_path/%.exe/}"
23822    # Do not save /bin paths to all_fixpath_prefixes!
23823  else
23824    # Not in mixed or Windows style, start by that.
23825    new_path=`cmd //c echo $new_path`
23826
23827  input_path="$new_path"
23828  # Check if we need to convert this using DOS-style short mode. If the path
23829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23830  # take no chances and rewrite it.
23831  # Note: m4 eats our [], so we need to use [ and ] instead.
23832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23833  if test "x$has_forbidden_chars" != x; then
23834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23836  fi
23837
23838    # Output is in $new_path
23839
23840  windows_path="$new_path"
23841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23842    unix_path=`$CYGPATH -u "$windows_path"`
23843    new_path="$unix_path"
23844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23846    new_path="$unix_path"
23847  fi
23848
23849    # remove trailing .exe if any
23850    new_path="${new_path/%.exe/}"
23851
23852    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23853    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23854  fi
23855
23856  else
23857    # We're on a posix platform. Hooray! :)
23858    # First separate the path from the arguments. This will split at the first
23859    # space.
23860    complete="$CPP"
23861    path="${complete%% *}"
23862    tmp="$complete EOL"
23863    arguments="${tmp#* }"
23864
23865    # Cannot rely on the command "which" here since it doesn't always work.
23866    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23867    if test -z "$is_absolute_path"; then
23868      # Path to executable is not absolute. Find it.
23869      IFS_save="$IFS"
23870      IFS=:
23871      for p in $PATH; do
23872        if test -f "$p/$path" && test -x "$p/$path"; then
23873          new_path="$p/$path"
23874          break
23875        fi
23876      done
23877      IFS="$IFS_save"
23878    else
23879      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23880$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23881      new_path="$path"
23882    fi
23883
23884    if test "x$new_path" = x; then
23885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23886$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23887        has_space=`$ECHO "$complete" | $GREP " "`
23888        if test "x$has_space" != x; then
23889          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23890$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23891        fi
23892        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23893      fi
23894  fi
23895
23896      # Now join together the path and the arguments once again
23897      if test "x$arguments" != xEOL; then
23898        new_complete="$new_path ${arguments% *}"
23899      else
23900        new_complete="$new_path"
23901      fi
23902
23903  if test "x$complete" != "x$new_complete"; then
23904      CPP="$new_complete"
23905      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23906$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23907    fi
23908
23909
23910ac_ext=cpp
23911ac_cpp='$CXXCPP $CPPFLAGS'
23912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23916$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23917if test -z "$CXXCPP"; then
23918  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23919  $as_echo_n "(cached) " >&6
23920else
23921      # Double quotes because CXXCPP needs to be expanded
23922    for CXXCPP in "$CXX -E" "/lib/cpp"
23923    do
23924      ac_preproc_ok=false
23925for ac_cxx_preproc_warn_flag in '' yes
23926do
23927  # Use a header file that comes with gcc, so configuring glibc
23928  # with a fresh cross-compiler works.
23929  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23930  # <limits.h> exists even on freestanding compilers.
23931  # On the NeXT, cc -E runs the code through the compiler's parser,
23932  # not just through cpp. "Syntax error" is here to catch this case.
23933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23934/* end confdefs.h.  */
23935#ifdef __STDC__
23936# include <limits.h>
23937#else
23938# include <assert.h>
23939#endif
23940		     Syntax error
23941_ACEOF
23942if ac_fn_cxx_try_cpp "$LINENO"; then :
23943
23944else
23945  # Broken: fails on valid input.
23946continue
23947fi
23948rm -f conftest.err conftest.i conftest.$ac_ext
23949
23950  # OK, works on sane cases.  Now check whether nonexistent headers
23951  # can be detected and how.
23952  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23953/* end confdefs.h.  */
23954#include <ac_nonexistent.h>
23955_ACEOF
23956if ac_fn_cxx_try_cpp "$LINENO"; then :
23957  # Broken: success on invalid input.
23958continue
23959else
23960  # Passes both tests.
23961ac_preproc_ok=:
23962break
23963fi
23964rm -f conftest.err conftest.i conftest.$ac_ext
23965
23966done
23967# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23968rm -f conftest.i conftest.err conftest.$ac_ext
23969if $ac_preproc_ok; then :
23970  break
23971fi
23972
23973    done
23974    ac_cv_prog_CXXCPP=$CXXCPP
23975
23976fi
23977  CXXCPP=$ac_cv_prog_CXXCPP
23978else
23979  ac_cv_prog_CXXCPP=$CXXCPP
23980fi
23981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23982$as_echo "$CXXCPP" >&6; }
23983ac_preproc_ok=false
23984for ac_cxx_preproc_warn_flag in '' yes
23985do
23986  # Use a header file that comes with gcc, so configuring glibc
23987  # with a fresh cross-compiler works.
23988  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23989  # <limits.h> exists even on freestanding compilers.
23990  # On the NeXT, cc -E runs the code through the compiler's parser,
23991  # not just through cpp. "Syntax error" is here to catch this case.
23992  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23993/* end confdefs.h.  */
23994#ifdef __STDC__
23995# include <limits.h>
23996#else
23997# include <assert.h>
23998#endif
23999		     Syntax error
24000_ACEOF
24001if ac_fn_cxx_try_cpp "$LINENO"; then :
24002
24003else
24004  # Broken: fails on valid input.
24005continue
24006fi
24007rm -f conftest.err conftest.i conftest.$ac_ext
24008
24009  # OK, works on sane cases.  Now check whether nonexistent headers
24010  # can be detected and how.
24011  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24012/* end confdefs.h.  */
24013#include <ac_nonexistent.h>
24014_ACEOF
24015if ac_fn_cxx_try_cpp "$LINENO"; then :
24016  # Broken: success on invalid input.
24017continue
24018else
24019  # Passes both tests.
24020ac_preproc_ok=:
24021break
24022fi
24023rm -f conftest.err conftest.i conftest.$ac_ext
24024
24025done
24026# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24027rm -f conftest.i conftest.err conftest.$ac_ext
24028if $ac_preproc_ok; then :
24029
24030else
24031  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24032$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24033as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24034See \`config.log' for more details" "$LINENO" 5 ; }
24035fi
24036
24037ac_ext=cpp
24038ac_cpp='$CXXCPP $CPPFLAGS'
24039ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24040ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24041ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24042
24043
24044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24045
24046  # First separate the path from the arguments. This will split at the first
24047  # space.
24048  complete="$CXXCPP"
24049  path="${complete%% *}"
24050  tmp="$complete EOL"
24051  arguments="${tmp#* }"
24052
24053  # Input might be given as Windows format, start by converting to
24054  # unix format.
24055  new_path=`$CYGPATH -u "$path"`
24056
24057  # Now try to locate executable using which
24058  new_path=`$WHICH "$new_path" 2> /dev/null`
24059  # bat and cmd files are not always considered executable in cygwin causing which
24060  # to not find them
24061  if test "x$new_path" = x \
24062           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24063           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24064    new_path=`$CYGPATH -u "$path"`
24065  fi
24066  if test "x$new_path" = x; then
24067    # Oops. Which didn't find the executable.
24068    # The splitting of arguments from the executable at a space might have been incorrect,
24069    # since paths with space are more likely in Windows. Give it another try with the whole
24070    # argument.
24071    path="$complete"
24072    arguments="EOL"
24073    new_path=`$CYGPATH -u "$path"`
24074    new_path=`$WHICH "$new_path" 2> /dev/null`
24075    # bat and cmd files are not always considered executable in cygwin causing which
24076    # to not find them
24077    if test "x$new_path" = x \
24078             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24079             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24080      new_path=`$CYGPATH -u "$path"`
24081    fi
24082    if test "x$new_path" = x; then
24083      # It's still not found. Now this is an unrecoverable error.
24084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24085$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24086      has_space=`$ECHO "$complete" | $GREP " "`
24087      if test "x$has_space" != x; then
24088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24090      fi
24091      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24092    fi
24093  fi
24094
24095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24098  # "foo.exe" is OK but "foo" is an error.
24099  #
24100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24101  # It is also a way to make sure we got the proper file name for the real test later on.
24102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24103  if test "x$test_shortpath" = x; then
24104    # Short path failed, file does not exist as specified.
24105    # Try adding .exe or .cmd
24106    if test -f "${new_path}.exe"; then
24107       input_to_shortpath="${new_path}.exe"
24108    elif test -f "${new_path}.cmd"; then
24109       input_to_shortpath="${new_path}.cmd"
24110    else
24111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24112$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24113      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24114$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24115      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24116    fi
24117  else
24118    input_to_shortpath="$new_path"
24119  fi
24120
24121  # Call helper function which possibly converts this using DOS-style short mode.
24122  # If so, the updated path is stored in $new_path.
24123  new_path="$input_to_shortpath"
24124
24125  input_path="$input_to_shortpath"
24126  # Check if we need to convert this using DOS-style short mode. If the path
24127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24128  # take no chances and rewrite it.
24129  # Note: m4 eats our [], so we need to use [ and ] instead.
24130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24131  if test "x$has_forbidden_chars" != x; then
24132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24136      # Going to short mode and back again did indeed matter. Since short mode is
24137      # case insensitive, let's make it lowercase to improve readability.
24138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24139      # Now convert it back to Unix-stile (cygpath)
24140      input_path=`$CYGPATH -u "$shortmode_path"`
24141      new_path="$input_path"
24142    fi
24143  fi
24144
24145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24146  if test "x$test_cygdrive_prefix" = x; then
24147    # As a simple fix, exclude /usr/bin since it's not a real path.
24148    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24150      # a path prefixed by /cygdrive for fixpath to work.
24151      new_path="$CYGWIN_ROOT_PATH$input_path"
24152    fi
24153  fi
24154
24155  # remove trailing .exe if any
24156  new_path="${new_path/%.exe/}"
24157
24158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24159
24160  # First separate the path from the arguments. This will split at the first
24161  # space.
24162  complete="$CXXCPP"
24163  path="${complete%% *}"
24164  tmp="$complete EOL"
24165  arguments="${tmp#* }"
24166
24167  # Input might be given as Windows format, start by converting to
24168  # unix format.
24169  new_path="$path"
24170
24171  windows_path="$new_path"
24172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24173    unix_path=`$CYGPATH -u "$windows_path"`
24174    new_path="$unix_path"
24175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24177    new_path="$unix_path"
24178  fi
24179
24180
24181  # Now try to locate executable using which
24182  new_path=`$WHICH "$new_path" 2> /dev/null`
24183
24184  if test "x$new_path" = x; then
24185    # Oops. Which didn't find the executable.
24186    # The splitting of arguments from the executable at a space might have been incorrect,
24187    # since paths with space are more likely in Windows. Give it another try with the whole
24188    # argument.
24189    path="$complete"
24190    arguments="EOL"
24191    new_path="$path"
24192
24193  windows_path="$new_path"
24194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24195    unix_path=`$CYGPATH -u "$windows_path"`
24196    new_path="$unix_path"
24197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24199    new_path="$unix_path"
24200  fi
24201
24202
24203    new_path=`$WHICH "$new_path" 2> /dev/null`
24204
24205    if test "x$new_path" = x; then
24206      # It's still not found. Now this is an unrecoverable error.
24207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24208$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24209      has_space=`$ECHO "$complete" | $GREP " "`
24210      if test "x$has_space" != x; then
24211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24213      fi
24214      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24215    fi
24216  fi
24217
24218  # Now new_path has a complete unix path to the binary
24219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24220    # Keep paths in /bin as-is, but remove trailing .exe if any
24221    new_path="${new_path/%.exe/}"
24222    # Do not save /bin paths to all_fixpath_prefixes!
24223  else
24224    # Not in mixed or Windows style, start by that.
24225    new_path=`cmd //c echo $new_path`
24226
24227  input_path="$new_path"
24228  # Check if we need to convert this using DOS-style short mode. If the path
24229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24230  # take no chances and rewrite it.
24231  # Note: m4 eats our [], so we need to use [ and ] instead.
24232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24233  if test "x$has_forbidden_chars" != x; then
24234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24236  fi
24237
24238    # Output is in $new_path
24239
24240  windows_path="$new_path"
24241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24242    unix_path=`$CYGPATH -u "$windows_path"`
24243    new_path="$unix_path"
24244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24246    new_path="$unix_path"
24247  fi
24248
24249    # remove trailing .exe if any
24250    new_path="${new_path/%.exe/}"
24251
24252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24254  fi
24255
24256  else
24257    # We're on a posix platform. Hooray! :)
24258    # First separate the path from the arguments. This will split at the first
24259    # space.
24260    complete="$CXXCPP"
24261    path="${complete%% *}"
24262    tmp="$complete EOL"
24263    arguments="${tmp#* }"
24264
24265    # Cannot rely on the command "which" here since it doesn't always work.
24266    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24267    if test -z "$is_absolute_path"; then
24268      # Path to executable is not absolute. Find it.
24269      IFS_save="$IFS"
24270      IFS=:
24271      for p in $PATH; do
24272        if test -f "$p/$path" && test -x "$p/$path"; then
24273          new_path="$p/$path"
24274          break
24275        fi
24276      done
24277      IFS="$IFS_save"
24278    else
24279      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24280$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24281      new_path="$path"
24282    fi
24283
24284    if test "x$new_path" = x; then
24285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24286$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24287        has_space=`$ECHO "$complete" | $GREP " "`
24288        if test "x$has_space" != x; then
24289          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24290$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24291        fi
24292        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24293      fi
24294  fi
24295
24296      # Now join together the path and the arguments once again
24297      if test "x$arguments" != xEOL; then
24298        new_complete="$new_path ${arguments% *}"
24299      else
24300        new_complete="$new_path"
24301      fi
24302
24303  if test "x$complete" != "x$new_complete"; then
24304      CXXCPP="$new_complete"
24305      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24306$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24307    fi
24308
24309
24310if test "x$COMPILE_TYPE" != "xcross"; then
24311    # If we are not cross compiling, use the same compilers for
24312    # building the build platform executables. The cross-compilation
24313    # case needed to be done earlier, but this can only be done after
24314    # the native tools have been localized.
24315    BUILD_CC="$CC"
24316    BUILD_CXX="$CXX"
24317    BUILD_LD="$LD"
24318fi
24319
24320# for solaris we really need solaris tools, and not gnu equivalent
24321#   these seems to normally reside in /usr/ccs/bin so add that to path before
24322#   starting to probe
24323#
24324#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24325#         so that it can be overriden --with-tools-dir
24326if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24327    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24328fi
24329
24330# Find the right assembler.
24331if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24332    # Extract the first word of "as", so it can be a program name with args.
24333set dummy as; ac_word=$2
24334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24335$as_echo_n "checking for $ac_word... " >&6; }
24336if test "${ac_cv_path_AS+set}" = set; then :
24337  $as_echo_n "(cached) " >&6
24338else
24339  case $AS in
24340  [\\/]* | ?:[\\/]*)
24341  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24342  ;;
24343  *)
24344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24345for as_dir in $PATH
24346do
24347  IFS=$as_save_IFS
24348  test -z "$as_dir" && as_dir=.
24349    for ac_exec_ext in '' $ac_executable_extensions; do
24350  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24351    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24353    break 2
24354  fi
24355done
24356  done
24357IFS=$as_save_IFS
24358
24359  ;;
24360esac
24361fi
24362AS=$ac_cv_path_AS
24363if test -n "$AS"; then
24364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24365$as_echo "$AS" >&6; }
24366else
24367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24368$as_echo "no" >&6; }
24369fi
24370
24371
24372
24373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24374
24375  # First separate the path from the arguments. This will split at the first
24376  # space.
24377  complete="$AS"
24378  path="${complete%% *}"
24379  tmp="$complete EOL"
24380  arguments="${tmp#* }"
24381
24382  # Input might be given as Windows format, start by converting to
24383  # unix format.
24384  new_path=`$CYGPATH -u "$path"`
24385
24386  # Now try to locate executable using which
24387  new_path=`$WHICH "$new_path" 2> /dev/null`
24388  # bat and cmd files are not always considered executable in cygwin causing which
24389  # to not find them
24390  if test "x$new_path" = x \
24391           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24392           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24393    new_path=`$CYGPATH -u "$path"`
24394  fi
24395  if test "x$new_path" = x; then
24396    # Oops. Which didn't find the executable.
24397    # The splitting of arguments from the executable at a space might have been incorrect,
24398    # since paths with space are more likely in Windows. Give it another try with the whole
24399    # argument.
24400    path="$complete"
24401    arguments="EOL"
24402    new_path=`$CYGPATH -u "$path"`
24403    new_path=`$WHICH "$new_path" 2> /dev/null`
24404    # bat and cmd files are not always considered executable in cygwin causing which
24405    # to not find them
24406    if test "x$new_path" = x \
24407             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24408             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24409      new_path=`$CYGPATH -u "$path"`
24410    fi
24411    if test "x$new_path" = x; then
24412      # It's still not found. Now this is an unrecoverable error.
24413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24414$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24415      has_space=`$ECHO "$complete" | $GREP " "`
24416      if test "x$has_space" != x; then
24417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24419      fi
24420      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24421    fi
24422  fi
24423
24424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24427  # "foo.exe" is OK but "foo" is an error.
24428  #
24429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24430  # It is also a way to make sure we got the proper file name for the real test later on.
24431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24432  if test "x$test_shortpath" = x; then
24433    # Short path failed, file does not exist as specified.
24434    # Try adding .exe or .cmd
24435    if test -f "${new_path}.exe"; then
24436       input_to_shortpath="${new_path}.exe"
24437    elif test -f "${new_path}.cmd"; then
24438       input_to_shortpath="${new_path}.cmd"
24439    else
24440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24441$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24442      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24443$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24444      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24445    fi
24446  else
24447    input_to_shortpath="$new_path"
24448  fi
24449
24450  # Call helper function which possibly converts this using DOS-style short mode.
24451  # If so, the updated path is stored in $new_path.
24452  new_path="$input_to_shortpath"
24453
24454  input_path="$input_to_shortpath"
24455  # Check if we need to convert this using DOS-style short mode. If the path
24456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24457  # take no chances and rewrite it.
24458  # Note: m4 eats our [], so we need to use [ and ] instead.
24459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24460  if test "x$has_forbidden_chars" != x; then
24461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24465      # Going to short mode and back again did indeed matter. Since short mode is
24466      # case insensitive, let's make it lowercase to improve readability.
24467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24468      # Now convert it back to Unix-stile (cygpath)
24469      input_path=`$CYGPATH -u "$shortmode_path"`
24470      new_path="$input_path"
24471    fi
24472  fi
24473
24474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24475  if test "x$test_cygdrive_prefix" = x; then
24476    # As a simple fix, exclude /usr/bin since it's not a real path.
24477    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24479      # a path prefixed by /cygdrive for fixpath to work.
24480      new_path="$CYGWIN_ROOT_PATH$input_path"
24481    fi
24482  fi
24483
24484  # remove trailing .exe if any
24485  new_path="${new_path/%.exe/}"
24486
24487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24488
24489  # First separate the path from the arguments. This will split at the first
24490  # space.
24491  complete="$AS"
24492  path="${complete%% *}"
24493  tmp="$complete EOL"
24494  arguments="${tmp#* }"
24495
24496  # Input might be given as Windows format, start by converting to
24497  # unix format.
24498  new_path="$path"
24499
24500  windows_path="$new_path"
24501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24502    unix_path=`$CYGPATH -u "$windows_path"`
24503    new_path="$unix_path"
24504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24506    new_path="$unix_path"
24507  fi
24508
24509
24510  # Now try to locate executable using which
24511  new_path=`$WHICH "$new_path" 2> /dev/null`
24512
24513  if test "x$new_path" = x; then
24514    # Oops. Which didn't find the executable.
24515    # The splitting of arguments from the executable at a space might have been incorrect,
24516    # since paths with space are more likely in Windows. Give it another try with the whole
24517    # argument.
24518    path="$complete"
24519    arguments="EOL"
24520    new_path="$path"
24521
24522  windows_path="$new_path"
24523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24524    unix_path=`$CYGPATH -u "$windows_path"`
24525    new_path="$unix_path"
24526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24528    new_path="$unix_path"
24529  fi
24530
24531
24532    new_path=`$WHICH "$new_path" 2> /dev/null`
24533
24534    if test "x$new_path" = x; then
24535      # It's still not found. Now this is an unrecoverable error.
24536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24537$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24538      has_space=`$ECHO "$complete" | $GREP " "`
24539      if test "x$has_space" != x; then
24540        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24541$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24542      fi
24543      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24544    fi
24545  fi
24546
24547  # Now new_path has a complete unix path to the binary
24548  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24549    # Keep paths in /bin as-is, but remove trailing .exe if any
24550    new_path="${new_path/%.exe/}"
24551    # Do not save /bin paths to all_fixpath_prefixes!
24552  else
24553    # Not in mixed or Windows style, start by that.
24554    new_path=`cmd //c echo $new_path`
24555
24556  input_path="$new_path"
24557  # Check if we need to convert this using DOS-style short mode. If the path
24558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24559  # take no chances and rewrite it.
24560  # Note: m4 eats our [], so we need to use [ and ] instead.
24561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24562  if test "x$has_forbidden_chars" != x; then
24563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24565  fi
24566
24567    # Output is in $new_path
24568
24569  windows_path="$new_path"
24570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24571    unix_path=`$CYGPATH -u "$windows_path"`
24572    new_path="$unix_path"
24573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24575    new_path="$unix_path"
24576  fi
24577
24578    # remove trailing .exe if any
24579    new_path="${new_path/%.exe/}"
24580
24581    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24582    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24583  fi
24584
24585  else
24586    # We're on a posix platform. Hooray! :)
24587    # First separate the path from the arguments. This will split at the first
24588    # space.
24589    complete="$AS"
24590    path="${complete%% *}"
24591    tmp="$complete EOL"
24592    arguments="${tmp#* }"
24593
24594    # Cannot rely on the command "which" here since it doesn't always work.
24595    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24596    if test -z "$is_absolute_path"; then
24597      # Path to executable is not absolute. Find it.
24598      IFS_save="$IFS"
24599      IFS=:
24600      for p in $PATH; do
24601        if test -f "$p/$path" && test -x "$p/$path"; then
24602          new_path="$p/$path"
24603          break
24604        fi
24605      done
24606      IFS="$IFS_save"
24607    else
24608      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24609$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24610      new_path="$path"
24611    fi
24612
24613    if test "x$new_path" = x; then
24614        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24615$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24616        has_space=`$ECHO "$complete" | $GREP " "`
24617        if test "x$has_space" != x; then
24618          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24619$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24620        fi
24621        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24622      fi
24623  fi
24624
24625      # Now join together the path and the arguments once again
24626      if test "x$arguments" != xEOL; then
24627        new_complete="$new_path ${arguments% *}"
24628      else
24629        new_complete="$new_path"
24630      fi
24631
24632  if test "x$complete" != "x$new_complete"; then
24633      AS="$new_complete"
24634      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24635$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24636    fi
24637
24638else
24639    AS="$CC -c"
24640fi
24641
24642
24643if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24644    for ac_prog in gnm nm
24645do
24646  # Extract the first word of "$ac_prog", so it can be a program name with args.
24647set dummy $ac_prog; ac_word=$2
24648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24649$as_echo_n "checking for $ac_word... " >&6; }
24650if test "${ac_cv_path_NM+set}" = set; then :
24651  $as_echo_n "(cached) " >&6
24652else
24653  case $NM in
24654  [\\/]* | ?:[\\/]*)
24655  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24656  ;;
24657  *)
24658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24659for as_dir in $PATH
24660do
24661  IFS=$as_save_IFS
24662  test -z "$as_dir" && as_dir=.
24663    for ac_exec_ext in '' $ac_executable_extensions; do
24664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24665    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24667    break 2
24668  fi
24669done
24670  done
24671IFS=$as_save_IFS
24672
24673  ;;
24674esac
24675fi
24676NM=$ac_cv_path_NM
24677if test -n "$NM"; then
24678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24679$as_echo "$NM" >&6; }
24680else
24681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24682$as_echo "no" >&6; }
24683fi
24684
24685
24686  test -n "$NM" && break
24687done
24688
24689
24690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24691
24692  # First separate the path from the arguments. This will split at the first
24693  # space.
24694  complete="$NM"
24695  path="${complete%% *}"
24696  tmp="$complete EOL"
24697  arguments="${tmp#* }"
24698
24699  # Input might be given as Windows format, start by converting to
24700  # unix format.
24701  new_path=`$CYGPATH -u "$path"`
24702
24703  # Now try to locate executable using which
24704  new_path=`$WHICH "$new_path" 2> /dev/null`
24705  # bat and cmd files are not always considered executable in cygwin causing which
24706  # to not find them
24707  if test "x$new_path" = x \
24708           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24709           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24710    new_path=`$CYGPATH -u "$path"`
24711  fi
24712  if test "x$new_path" = x; then
24713    # Oops. Which didn't find the executable.
24714    # The splitting of arguments from the executable at a space might have been incorrect,
24715    # since paths with space are more likely in Windows. Give it another try with the whole
24716    # argument.
24717    path="$complete"
24718    arguments="EOL"
24719    new_path=`$CYGPATH -u "$path"`
24720    new_path=`$WHICH "$new_path" 2> /dev/null`
24721    # bat and cmd files are not always considered executable in cygwin causing which
24722    # to not find them
24723    if test "x$new_path" = x \
24724             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24725             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24726      new_path=`$CYGPATH -u "$path"`
24727    fi
24728    if test "x$new_path" = x; then
24729      # It's still not found. Now this is an unrecoverable error.
24730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24731$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24732      has_space=`$ECHO "$complete" | $GREP " "`
24733      if test "x$has_space" != x; then
24734        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24735$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24736      fi
24737      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24738    fi
24739  fi
24740
24741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24744  # "foo.exe" is OK but "foo" is an error.
24745  #
24746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24747  # It is also a way to make sure we got the proper file name for the real test later on.
24748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24749  if test "x$test_shortpath" = x; then
24750    # Short path failed, file does not exist as specified.
24751    # Try adding .exe or .cmd
24752    if test -f "${new_path}.exe"; then
24753       input_to_shortpath="${new_path}.exe"
24754    elif test -f "${new_path}.cmd"; then
24755       input_to_shortpath="${new_path}.cmd"
24756    else
24757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24758$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24759      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24760$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24761      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24762    fi
24763  else
24764    input_to_shortpath="$new_path"
24765  fi
24766
24767  # Call helper function which possibly converts this using DOS-style short mode.
24768  # If so, the updated path is stored in $new_path.
24769  new_path="$input_to_shortpath"
24770
24771  input_path="$input_to_shortpath"
24772  # Check if we need to convert this using DOS-style short mode. If the path
24773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24774  # take no chances and rewrite it.
24775  # Note: m4 eats our [], so we need to use [ and ] instead.
24776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24777  if test "x$has_forbidden_chars" != x; then
24778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24782      # Going to short mode and back again did indeed matter. Since short mode is
24783      # case insensitive, let's make it lowercase to improve readability.
24784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24785      # Now convert it back to Unix-stile (cygpath)
24786      input_path=`$CYGPATH -u "$shortmode_path"`
24787      new_path="$input_path"
24788    fi
24789  fi
24790
24791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24792  if test "x$test_cygdrive_prefix" = x; then
24793    # As a simple fix, exclude /usr/bin since it's not a real path.
24794    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24796      # a path prefixed by /cygdrive for fixpath to work.
24797      new_path="$CYGWIN_ROOT_PATH$input_path"
24798    fi
24799  fi
24800
24801  # remove trailing .exe if any
24802  new_path="${new_path/%.exe/}"
24803
24804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24805
24806  # First separate the path from the arguments. This will split at the first
24807  # space.
24808  complete="$NM"
24809  path="${complete%% *}"
24810  tmp="$complete EOL"
24811  arguments="${tmp#* }"
24812
24813  # Input might be given as Windows format, start by converting to
24814  # unix format.
24815  new_path="$path"
24816
24817  windows_path="$new_path"
24818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24819    unix_path=`$CYGPATH -u "$windows_path"`
24820    new_path="$unix_path"
24821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24823    new_path="$unix_path"
24824  fi
24825
24826
24827  # Now try to locate executable using which
24828  new_path=`$WHICH "$new_path" 2> /dev/null`
24829
24830  if test "x$new_path" = x; then
24831    # Oops. Which didn't find the executable.
24832    # The splitting of arguments from the executable at a space might have been incorrect,
24833    # since paths with space are more likely in Windows. Give it another try with the whole
24834    # argument.
24835    path="$complete"
24836    arguments="EOL"
24837    new_path="$path"
24838
24839  windows_path="$new_path"
24840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24841    unix_path=`$CYGPATH -u "$windows_path"`
24842    new_path="$unix_path"
24843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24845    new_path="$unix_path"
24846  fi
24847
24848
24849    new_path=`$WHICH "$new_path" 2> /dev/null`
24850
24851    if test "x$new_path" = x; then
24852      # It's still not found. Now this is an unrecoverable error.
24853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24854$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24855      has_space=`$ECHO "$complete" | $GREP " "`
24856      if test "x$has_space" != x; then
24857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24859      fi
24860      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24861    fi
24862  fi
24863
24864  # Now new_path has a complete unix path to the binary
24865  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24866    # Keep paths in /bin as-is, but remove trailing .exe if any
24867    new_path="${new_path/%.exe/}"
24868    # Do not save /bin paths to all_fixpath_prefixes!
24869  else
24870    # Not in mixed or Windows style, start by that.
24871    new_path=`cmd //c echo $new_path`
24872
24873  input_path="$new_path"
24874  # Check if we need to convert this using DOS-style short mode. If the path
24875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24876  # take no chances and rewrite it.
24877  # Note: m4 eats our [], so we need to use [ and ] instead.
24878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24879  if test "x$has_forbidden_chars" != x; then
24880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24882  fi
24883
24884    # Output is in $new_path
24885
24886  windows_path="$new_path"
24887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24888    unix_path=`$CYGPATH -u "$windows_path"`
24889    new_path="$unix_path"
24890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24892    new_path="$unix_path"
24893  fi
24894
24895    # remove trailing .exe if any
24896    new_path="${new_path/%.exe/}"
24897
24898    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24899    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24900  fi
24901
24902  else
24903    # We're on a posix platform. Hooray! :)
24904    # First separate the path from the arguments. This will split at the first
24905    # space.
24906    complete="$NM"
24907    path="${complete%% *}"
24908    tmp="$complete EOL"
24909    arguments="${tmp#* }"
24910
24911    # Cannot rely on the command "which" here since it doesn't always work.
24912    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24913    if test -z "$is_absolute_path"; then
24914      # Path to executable is not absolute. Find it.
24915      IFS_save="$IFS"
24916      IFS=:
24917      for p in $PATH; do
24918        if test -f "$p/$path" && test -x "$p/$path"; then
24919          new_path="$p/$path"
24920          break
24921        fi
24922      done
24923      IFS="$IFS_save"
24924    else
24925      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24926$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24927      new_path="$path"
24928    fi
24929
24930    if test "x$new_path" = x; then
24931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24932$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24933        has_space=`$ECHO "$complete" | $GREP " "`
24934        if test "x$has_space" != x; then
24935          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24937        fi
24938        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24939      fi
24940  fi
24941
24942      # Now join together the path and the arguments once again
24943      if test "x$arguments" != xEOL; then
24944        new_complete="$new_path ${arguments% *}"
24945      else
24946        new_complete="$new_path"
24947      fi
24948
24949  if test "x$complete" != "x$new_complete"; then
24950      NM="$new_complete"
24951      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24952$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24953    fi
24954
24955    # Extract the first word of "strip", so it can be a program name with args.
24956set dummy strip; ac_word=$2
24957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24958$as_echo_n "checking for $ac_word... " >&6; }
24959if test "${ac_cv_path_STRIP+set}" = set; then :
24960  $as_echo_n "(cached) " >&6
24961else
24962  case $STRIP in
24963  [\\/]* | ?:[\\/]*)
24964  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24965  ;;
24966  *)
24967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24968for as_dir in $PATH
24969do
24970  IFS=$as_save_IFS
24971  test -z "$as_dir" && as_dir=.
24972    for ac_exec_ext in '' $ac_executable_extensions; do
24973  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24974    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24976    break 2
24977  fi
24978done
24979  done
24980IFS=$as_save_IFS
24981
24982  ;;
24983esac
24984fi
24985STRIP=$ac_cv_path_STRIP
24986if test -n "$STRIP"; then
24987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24988$as_echo "$STRIP" >&6; }
24989else
24990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24991$as_echo "no" >&6; }
24992fi
24993
24994
24995
24996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24997
24998  # First separate the path from the arguments. This will split at the first
24999  # space.
25000  complete="$STRIP"
25001  path="${complete%% *}"
25002  tmp="$complete EOL"
25003  arguments="${tmp#* }"
25004
25005  # Input might be given as Windows format, start by converting to
25006  # unix format.
25007  new_path=`$CYGPATH -u "$path"`
25008
25009  # Now try to locate executable using which
25010  new_path=`$WHICH "$new_path" 2> /dev/null`
25011  # bat and cmd files are not always considered executable in cygwin causing which
25012  # to not find them
25013  if test "x$new_path" = x \
25014           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25015           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25016    new_path=`$CYGPATH -u "$path"`
25017  fi
25018  if test "x$new_path" = x; then
25019    # Oops. Which didn't find the executable.
25020    # The splitting of arguments from the executable at a space might have been incorrect,
25021    # since paths with space are more likely in Windows. Give it another try with the whole
25022    # argument.
25023    path="$complete"
25024    arguments="EOL"
25025    new_path=`$CYGPATH -u "$path"`
25026    new_path=`$WHICH "$new_path" 2> /dev/null`
25027    # bat and cmd files are not always considered executable in cygwin causing which
25028    # to not find them
25029    if test "x$new_path" = x \
25030             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25031             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25032      new_path=`$CYGPATH -u "$path"`
25033    fi
25034    if test "x$new_path" = x; then
25035      # It's still not found. Now this is an unrecoverable error.
25036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25037$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25038      has_space=`$ECHO "$complete" | $GREP " "`
25039      if test "x$has_space" != x; then
25040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25042      fi
25043      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25044    fi
25045  fi
25046
25047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25050  # "foo.exe" is OK but "foo" is an error.
25051  #
25052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25053  # It is also a way to make sure we got the proper file name for the real test later on.
25054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25055  if test "x$test_shortpath" = x; then
25056    # Short path failed, file does not exist as specified.
25057    # Try adding .exe or .cmd
25058    if test -f "${new_path}.exe"; then
25059       input_to_shortpath="${new_path}.exe"
25060    elif test -f "${new_path}.cmd"; then
25061       input_to_shortpath="${new_path}.cmd"
25062    else
25063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25064$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25067      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25068    fi
25069  else
25070    input_to_shortpath="$new_path"
25071  fi
25072
25073  # Call helper function which possibly converts this using DOS-style short mode.
25074  # If so, the updated path is stored in $new_path.
25075  new_path="$input_to_shortpath"
25076
25077  input_path="$input_to_shortpath"
25078  # Check if we need to convert this using DOS-style short mode. If the path
25079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25080  # take no chances and rewrite it.
25081  # Note: m4 eats our [], so we need to use [ and ] instead.
25082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25083  if test "x$has_forbidden_chars" != x; then
25084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25088      # Going to short mode and back again did indeed matter. Since short mode is
25089      # case insensitive, let's make it lowercase to improve readability.
25090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25091      # Now convert it back to Unix-stile (cygpath)
25092      input_path=`$CYGPATH -u "$shortmode_path"`
25093      new_path="$input_path"
25094    fi
25095  fi
25096
25097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25098  if test "x$test_cygdrive_prefix" = x; then
25099    # As a simple fix, exclude /usr/bin since it's not a real path.
25100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25102      # a path prefixed by /cygdrive for fixpath to work.
25103      new_path="$CYGWIN_ROOT_PATH$input_path"
25104    fi
25105  fi
25106
25107  # remove trailing .exe if any
25108  new_path="${new_path/%.exe/}"
25109
25110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25111
25112  # First separate the path from the arguments. This will split at the first
25113  # space.
25114  complete="$STRIP"
25115  path="${complete%% *}"
25116  tmp="$complete EOL"
25117  arguments="${tmp#* }"
25118
25119  # Input might be given as Windows format, start by converting to
25120  # unix format.
25121  new_path="$path"
25122
25123  windows_path="$new_path"
25124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25125    unix_path=`$CYGPATH -u "$windows_path"`
25126    new_path="$unix_path"
25127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25129    new_path="$unix_path"
25130  fi
25131
25132
25133  # Now try to locate executable using which
25134  new_path=`$WHICH "$new_path" 2> /dev/null`
25135
25136  if test "x$new_path" = x; then
25137    # Oops. Which didn't find the executable.
25138    # The splitting of arguments from the executable at a space might have been incorrect,
25139    # since paths with space are more likely in Windows. Give it another try with the whole
25140    # argument.
25141    path="$complete"
25142    arguments="EOL"
25143    new_path="$path"
25144
25145  windows_path="$new_path"
25146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25147    unix_path=`$CYGPATH -u "$windows_path"`
25148    new_path="$unix_path"
25149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25151    new_path="$unix_path"
25152  fi
25153
25154
25155    new_path=`$WHICH "$new_path" 2> /dev/null`
25156
25157    if test "x$new_path" = x; then
25158      # It's still not found. Now this is an unrecoverable error.
25159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25160$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25161      has_space=`$ECHO "$complete" | $GREP " "`
25162      if test "x$has_space" != x; then
25163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25165      fi
25166      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25167    fi
25168  fi
25169
25170  # Now new_path has a complete unix path to the binary
25171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25172    # Keep paths in /bin as-is, but remove trailing .exe if any
25173    new_path="${new_path/%.exe/}"
25174    # Do not save /bin paths to all_fixpath_prefixes!
25175  else
25176    # Not in mixed or Windows style, start by that.
25177    new_path=`cmd //c echo $new_path`
25178
25179  input_path="$new_path"
25180  # Check if we need to convert this using DOS-style short mode. If the path
25181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25182  # take no chances and rewrite it.
25183  # Note: m4 eats our [], so we need to use [ and ] instead.
25184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25185  if test "x$has_forbidden_chars" != x; then
25186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25188  fi
25189
25190    # Output is in $new_path
25191
25192  windows_path="$new_path"
25193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25194    unix_path=`$CYGPATH -u "$windows_path"`
25195    new_path="$unix_path"
25196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25198    new_path="$unix_path"
25199  fi
25200
25201    # remove trailing .exe if any
25202    new_path="${new_path/%.exe/}"
25203
25204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25206  fi
25207
25208  else
25209    # We're on a posix platform. Hooray! :)
25210    # First separate the path from the arguments. This will split at the first
25211    # space.
25212    complete="$STRIP"
25213    path="${complete%% *}"
25214    tmp="$complete EOL"
25215    arguments="${tmp#* }"
25216
25217    # Cannot rely on the command "which" here since it doesn't always work.
25218    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25219    if test -z "$is_absolute_path"; then
25220      # Path to executable is not absolute. Find it.
25221      IFS_save="$IFS"
25222      IFS=:
25223      for p in $PATH; do
25224        if test -f "$p/$path" && test -x "$p/$path"; then
25225          new_path="$p/$path"
25226          break
25227        fi
25228      done
25229      IFS="$IFS_save"
25230    else
25231      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25232$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25233      new_path="$path"
25234    fi
25235
25236    if test "x$new_path" = x; then
25237        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25238$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25239        has_space=`$ECHO "$complete" | $GREP " "`
25240        if test "x$has_space" != x; then
25241          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25242$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25243        fi
25244        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25245      fi
25246  fi
25247
25248      # Now join together the path and the arguments once again
25249      if test "x$arguments" != xEOL; then
25250        new_complete="$new_path ${arguments% *}"
25251      else
25252        new_complete="$new_path"
25253      fi
25254
25255  if test "x$complete" != "x$new_complete"; then
25256      STRIP="$new_complete"
25257      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25258$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25259    fi
25260
25261    # Extract the first word of "mcs", so it can be a program name with args.
25262set dummy mcs; ac_word=$2
25263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25264$as_echo_n "checking for $ac_word... " >&6; }
25265if test "${ac_cv_path_MCS+set}" = set; then :
25266  $as_echo_n "(cached) " >&6
25267else
25268  case $MCS in
25269  [\\/]* | ?:[\\/]*)
25270  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25271  ;;
25272  *)
25273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25274for as_dir in $PATH
25275do
25276  IFS=$as_save_IFS
25277  test -z "$as_dir" && as_dir=.
25278    for ac_exec_ext in '' $ac_executable_extensions; do
25279  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25280    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25282    break 2
25283  fi
25284done
25285  done
25286IFS=$as_save_IFS
25287
25288  ;;
25289esac
25290fi
25291MCS=$ac_cv_path_MCS
25292if test -n "$MCS"; then
25293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25294$as_echo "$MCS" >&6; }
25295else
25296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25297$as_echo "no" >&6; }
25298fi
25299
25300
25301
25302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25303
25304  # First separate the path from the arguments. This will split at the first
25305  # space.
25306  complete="$MCS"
25307  path="${complete%% *}"
25308  tmp="$complete EOL"
25309  arguments="${tmp#* }"
25310
25311  # Input might be given as Windows format, start by converting to
25312  # unix format.
25313  new_path=`$CYGPATH -u "$path"`
25314
25315  # Now try to locate executable using which
25316  new_path=`$WHICH "$new_path" 2> /dev/null`
25317  # bat and cmd files are not always considered executable in cygwin causing which
25318  # to not find them
25319  if test "x$new_path" = x \
25320           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25321           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25322    new_path=`$CYGPATH -u "$path"`
25323  fi
25324  if test "x$new_path" = x; then
25325    # Oops. Which didn't find the executable.
25326    # The splitting of arguments from the executable at a space might have been incorrect,
25327    # since paths with space are more likely in Windows. Give it another try with the whole
25328    # argument.
25329    path="$complete"
25330    arguments="EOL"
25331    new_path=`$CYGPATH -u "$path"`
25332    new_path=`$WHICH "$new_path" 2> /dev/null`
25333    # bat and cmd files are not always considered executable in cygwin causing which
25334    # to not find them
25335    if test "x$new_path" = x \
25336             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25337             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25338      new_path=`$CYGPATH -u "$path"`
25339    fi
25340    if test "x$new_path" = x; then
25341      # It's still not found. Now this is an unrecoverable error.
25342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25343$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25344      has_space=`$ECHO "$complete" | $GREP " "`
25345      if test "x$has_space" != x; then
25346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25348      fi
25349      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25350    fi
25351  fi
25352
25353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25356  # "foo.exe" is OK but "foo" is an error.
25357  #
25358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25359  # It is also a way to make sure we got the proper file name for the real test later on.
25360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25361  if test "x$test_shortpath" = x; then
25362    # Short path failed, file does not exist as specified.
25363    # Try adding .exe or .cmd
25364    if test -f "${new_path}.exe"; then
25365       input_to_shortpath="${new_path}.exe"
25366    elif test -f "${new_path}.cmd"; then
25367       input_to_shortpath="${new_path}.cmd"
25368    else
25369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25370$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25373      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25374    fi
25375  else
25376    input_to_shortpath="$new_path"
25377  fi
25378
25379  # Call helper function which possibly converts this using DOS-style short mode.
25380  # If so, the updated path is stored in $new_path.
25381  new_path="$input_to_shortpath"
25382
25383  input_path="$input_to_shortpath"
25384  # Check if we need to convert this using DOS-style short mode. If the path
25385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25386  # take no chances and rewrite it.
25387  # Note: m4 eats our [], so we need to use [ and ] instead.
25388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25389  if test "x$has_forbidden_chars" != x; then
25390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25394      # Going to short mode and back again did indeed matter. Since short mode is
25395      # case insensitive, let's make it lowercase to improve readability.
25396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25397      # Now convert it back to Unix-stile (cygpath)
25398      input_path=`$CYGPATH -u "$shortmode_path"`
25399      new_path="$input_path"
25400    fi
25401  fi
25402
25403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25404  if test "x$test_cygdrive_prefix" = x; then
25405    # As a simple fix, exclude /usr/bin since it's not a real path.
25406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25408      # a path prefixed by /cygdrive for fixpath to work.
25409      new_path="$CYGWIN_ROOT_PATH$input_path"
25410    fi
25411  fi
25412
25413  # remove trailing .exe if any
25414  new_path="${new_path/%.exe/}"
25415
25416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25417
25418  # First separate the path from the arguments. This will split at the first
25419  # space.
25420  complete="$MCS"
25421  path="${complete%% *}"
25422  tmp="$complete EOL"
25423  arguments="${tmp#* }"
25424
25425  # Input might be given as Windows format, start by converting to
25426  # unix format.
25427  new_path="$path"
25428
25429  windows_path="$new_path"
25430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25431    unix_path=`$CYGPATH -u "$windows_path"`
25432    new_path="$unix_path"
25433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25435    new_path="$unix_path"
25436  fi
25437
25438
25439  # Now try to locate executable using which
25440  new_path=`$WHICH "$new_path" 2> /dev/null`
25441
25442  if test "x$new_path" = x; then
25443    # Oops. Which didn't find the executable.
25444    # The splitting of arguments from the executable at a space might have been incorrect,
25445    # since paths with space are more likely in Windows. Give it another try with the whole
25446    # argument.
25447    path="$complete"
25448    arguments="EOL"
25449    new_path="$path"
25450
25451  windows_path="$new_path"
25452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25453    unix_path=`$CYGPATH -u "$windows_path"`
25454    new_path="$unix_path"
25455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25457    new_path="$unix_path"
25458  fi
25459
25460
25461    new_path=`$WHICH "$new_path" 2> /dev/null`
25462
25463    if test "x$new_path" = x; then
25464      # It's still not found. Now this is an unrecoverable error.
25465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25466$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25467      has_space=`$ECHO "$complete" | $GREP " "`
25468      if test "x$has_space" != x; then
25469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25471      fi
25472      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25473    fi
25474  fi
25475
25476  # Now new_path has a complete unix path to the binary
25477  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25478    # Keep paths in /bin as-is, but remove trailing .exe if any
25479    new_path="${new_path/%.exe/}"
25480    # Do not save /bin paths to all_fixpath_prefixes!
25481  else
25482    # Not in mixed or Windows style, start by that.
25483    new_path=`cmd //c echo $new_path`
25484
25485  input_path="$new_path"
25486  # Check if we need to convert this using DOS-style short mode. If the path
25487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25488  # take no chances and rewrite it.
25489  # Note: m4 eats our [], so we need to use [ and ] instead.
25490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25491  if test "x$has_forbidden_chars" != x; then
25492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25494  fi
25495
25496    # Output is in $new_path
25497
25498  windows_path="$new_path"
25499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25500    unix_path=`$CYGPATH -u "$windows_path"`
25501    new_path="$unix_path"
25502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25504    new_path="$unix_path"
25505  fi
25506
25507    # remove trailing .exe if any
25508    new_path="${new_path/%.exe/}"
25509
25510    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25511    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25512  fi
25513
25514  else
25515    # We're on a posix platform. Hooray! :)
25516    # First separate the path from the arguments. This will split at the first
25517    # space.
25518    complete="$MCS"
25519    path="${complete%% *}"
25520    tmp="$complete EOL"
25521    arguments="${tmp#* }"
25522
25523    # Cannot rely on the command "which" here since it doesn't always work.
25524    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25525    if test -z "$is_absolute_path"; then
25526      # Path to executable is not absolute. Find it.
25527      IFS_save="$IFS"
25528      IFS=:
25529      for p in $PATH; do
25530        if test -f "$p/$path" && test -x "$p/$path"; then
25531          new_path="$p/$path"
25532          break
25533        fi
25534      done
25535      IFS="$IFS_save"
25536    else
25537      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25538$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25539      new_path="$path"
25540    fi
25541
25542    if test "x$new_path" = x; then
25543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25544$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25545        has_space=`$ECHO "$complete" | $GREP " "`
25546        if test "x$has_space" != x; then
25547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25549        fi
25550        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25551      fi
25552  fi
25553
25554      # Now join together the path and the arguments once again
25555      if test "x$arguments" != xEOL; then
25556        new_complete="$new_path ${arguments% *}"
25557      else
25558        new_complete="$new_path"
25559      fi
25560
25561  if test "x$complete" != "x$new_complete"; then
25562      MCS="$new_complete"
25563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25564$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25565    fi
25566
25567elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25568    if test -n "$ac_tool_prefix"; then
25569  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25570set dummy ${ac_tool_prefix}nm; ac_word=$2
25571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25572$as_echo_n "checking for $ac_word... " >&6; }
25573if test "${ac_cv_prog_NM+set}" = set; then :
25574  $as_echo_n "(cached) " >&6
25575else
25576  if test -n "$NM"; then
25577  ac_cv_prog_NM="$NM" # Let the user override the test.
25578else
25579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25580for as_dir in $PATH
25581do
25582  IFS=$as_save_IFS
25583  test -z "$as_dir" && as_dir=.
25584    for ac_exec_ext in '' $ac_executable_extensions; do
25585  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25586    ac_cv_prog_NM="${ac_tool_prefix}nm"
25587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25588    break 2
25589  fi
25590done
25591  done
25592IFS=$as_save_IFS
25593
25594fi
25595fi
25596NM=$ac_cv_prog_NM
25597if test -n "$NM"; then
25598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25599$as_echo "$NM" >&6; }
25600else
25601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25602$as_echo "no" >&6; }
25603fi
25604
25605
25606fi
25607if test -z "$ac_cv_prog_NM"; then
25608  ac_ct_NM=$NM
25609  # Extract the first word of "nm", so it can be a program name with args.
25610set dummy nm; ac_word=$2
25611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25612$as_echo_n "checking for $ac_word... " >&6; }
25613if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25614  $as_echo_n "(cached) " >&6
25615else
25616  if test -n "$ac_ct_NM"; then
25617  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25618else
25619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25620for as_dir in $PATH
25621do
25622  IFS=$as_save_IFS
25623  test -z "$as_dir" && as_dir=.
25624    for ac_exec_ext in '' $ac_executable_extensions; do
25625  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25626    ac_cv_prog_ac_ct_NM="nm"
25627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25628    break 2
25629  fi
25630done
25631  done
25632IFS=$as_save_IFS
25633
25634fi
25635fi
25636ac_ct_NM=$ac_cv_prog_ac_ct_NM
25637if test -n "$ac_ct_NM"; then
25638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25639$as_echo "$ac_ct_NM" >&6; }
25640else
25641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25642$as_echo "no" >&6; }
25643fi
25644
25645  if test "x$ac_ct_NM" = x; then
25646    NM=""
25647  else
25648    case $cross_compiling:$ac_tool_warned in
25649yes:)
25650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25652ac_tool_warned=yes ;;
25653esac
25654    NM=$ac_ct_NM
25655  fi
25656else
25657  NM="$ac_cv_prog_NM"
25658fi
25659
25660
25661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25662
25663  # First separate the path from the arguments. This will split at the first
25664  # space.
25665  complete="$NM"
25666  path="${complete%% *}"
25667  tmp="$complete EOL"
25668  arguments="${tmp#* }"
25669
25670  # Input might be given as Windows format, start by converting to
25671  # unix format.
25672  new_path=`$CYGPATH -u "$path"`
25673
25674  # Now try to locate executable using which
25675  new_path=`$WHICH "$new_path" 2> /dev/null`
25676  # bat and cmd files are not always considered executable in cygwin causing which
25677  # to not find them
25678  if test "x$new_path" = x \
25679           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25680           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25681    new_path=`$CYGPATH -u "$path"`
25682  fi
25683  if test "x$new_path" = x; then
25684    # Oops. Which didn't find the executable.
25685    # The splitting of arguments from the executable at a space might have been incorrect,
25686    # since paths with space are more likely in Windows. Give it another try with the whole
25687    # argument.
25688    path="$complete"
25689    arguments="EOL"
25690    new_path=`$CYGPATH -u "$path"`
25691    new_path=`$WHICH "$new_path" 2> /dev/null`
25692    # bat and cmd files are not always considered executable in cygwin causing which
25693    # to not find them
25694    if test "x$new_path" = x \
25695             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25696             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25697      new_path=`$CYGPATH -u "$path"`
25698    fi
25699    if test "x$new_path" = x; then
25700      # It's still not found. Now this is an unrecoverable error.
25701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25702$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25703      has_space=`$ECHO "$complete" | $GREP " "`
25704      if test "x$has_space" != x; then
25705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25707      fi
25708      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25709    fi
25710  fi
25711
25712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25715  # "foo.exe" is OK but "foo" is an error.
25716  #
25717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25718  # It is also a way to make sure we got the proper file name for the real test later on.
25719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25720  if test "x$test_shortpath" = x; then
25721    # Short path failed, file does not exist as specified.
25722    # Try adding .exe or .cmd
25723    if test -f "${new_path}.exe"; then
25724       input_to_shortpath="${new_path}.exe"
25725    elif test -f "${new_path}.cmd"; then
25726       input_to_shortpath="${new_path}.cmd"
25727    else
25728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25729$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25730      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25731$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25732      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25733    fi
25734  else
25735    input_to_shortpath="$new_path"
25736  fi
25737
25738  # Call helper function which possibly converts this using DOS-style short mode.
25739  # If so, the updated path is stored in $new_path.
25740  new_path="$input_to_shortpath"
25741
25742  input_path="$input_to_shortpath"
25743  # Check if we need to convert this using DOS-style short mode. If the path
25744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25745  # take no chances and rewrite it.
25746  # Note: m4 eats our [], so we need to use [ and ] instead.
25747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25748  if test "x$has_forbidden_chars" != x; then
25749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25753      # Going to short mode and back again did indeed matter. Since short mode is
25754      # case insensitive, let's make it lowercase to improve readability.
25755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25756      # Now convert it back to Unix-stile (cygpath)
25757      input_path=`$CYGPATH -u "$shortmode_path"`
25758      new_path="$input_path"
25759    fi
25760  fi
25761
25762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25763  if test "x$test_cygdrive_prefix" = x; then
25764    # As a simple fix, exclude /usr/bin since it's not a real path.
25765    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25767      # a path prefixed by /cygdrive for fixpath to work.
25768      new_path="$CYGWIN_ROOT_PATH$input_path"
25769    fi
25770  fi
25771
25772  # remove trailing .exe if any
25773  new_path="${new_path/%.exe/}"
25774
25775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25776
25777  # First separate the path from the arguments. This will split at the first
25778  # space.
25779  complete="$NM"
25780  path="${complete%% *}"
25781  tmp="$complete EOL"
25782  arguments="${tmp#* }"
25783
25784  # Input might be given as Windows format, start by converting to
25785  # unix format.
25786  new_path="$path"
25787
25788  windows_path="$new_path"
25789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25790    unix_path=`$CYGPATH -u "$windows_path"`
25791    new_path="$unix_path"
25792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25794    new_path="$unix_path"
25795  fi
25796
25797
25798  # Now try to locate executable using which
25799  new_path=`$WHICH "$new_path" 2> /dev/null`
25800
25801  if test "x$new_path" = x; then
25802    # Oops. Which didn't find the executable.
25803    # The splitting of arguments from the executable at a space might have been incorrect,
25804    # since paths with space are more likely in Windows. Give it another try with the whole
25805    # argument.
25806    path="$complete"
25807    arguments="EOL"
25808    new_path="$path"
25809
25810  windows_path="$new_path"
25811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25812    unix_path=`$CYGPATH -u "$windows_path"`
25813    new_path="$unix_path"
25814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25816    new_path="$unix_path"
25817  fi
25818
25819
25820    new_path=`$WHICH "$new_path" 2> /dev/null`
25821
25822    if test "x$new_path" = x; then
25823      # It's still not found. Now this is an unrecoverable error.
25824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25825$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25826      has_space=`$ECHO "$complete" | $GREP " "`
25827      if test "x$has_space" != x; then
25828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25830      fi
25831      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25832    fi
25833  fi
25834
25835  # Now new_path has a complete unix path to the binary
25836  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25837    # Keep paths in /bin as-is, but remove trailing .exe if any
25838    new_path="${new_path/%.exe/}"
25839    # Do not save /bin paths to all_fixpath_prefixes!
25840  else
25841    # Not in mixed or Windows style, start by that.
25842    new_path=`cmd //c echo $new_path`
25843
25844  input_path="$new_path"
25845  # Check if we need to convert this using DOS-style short mode. If the path
25846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25847  # take no chances and rewrite it.
25848  # Note: m4 eats our [], so we need to use [ and ] instead.
25849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25850  if test "x$has_forbidden_chars" != x; then
25851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25853  fi
25854
25855    # Output is in $new_path
25856
25857  windows_path="$new_path"
25858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25859    unix_path=`$CYGPATH -u "$windows_path"`
25860    new_path="$unix_path"
25861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25863    new_path="$unix_path"
25864  fi
25865
25866    # remove trailing .exe if any
25867    new_path="${new_path/%.exe/}"
25868
25869    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25870    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25871  fi
25872
25873  else
25874    # We're on a posix platform. Hooray! :)
25875    # First separate the path from the arguments. This will split at the first
25876    # space.
25877    complete="$NM"
25878    path="${complete%% *}"
25879    tmp="$complete EOL"
25880    arguments="${tmp#* }"
25881
25882    # Cannot rely on the command "which" here since it doesn't always work.
25883    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25884    if test -z "$is_absolute_path"; then
25885      # Path to executable is not absolute. Find it.
25886      IFS_save="$IFS"
25887      IFS=:
25888      for p in $PATH; do
25889        if test -f "$p/$path" && test -x "$p/$path"; then
25890          new_path="$p/$path"
25891          break
25892        fi
25893      done
25894      IFS="$IFS_save"
25895    else
25896      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25897$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25898      new_path="$path"
25899    fi
25900
25901    if test "x$new_path" = x; then
25902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25903$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25904        has_space=`$ECHO "$complete" | $GREP " "`
25905        if test "x$has_space" != x; then
25906          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25907$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25908        fi
25909        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25910      fi
25911  fi
25912
25913      # Now join together the path and the arguments once again
25914      if test "x$arguments" != xEOL; then
25915        new_complete="$new_path ${arguments% *}"
25916      else
25917        new_complete="$new_path"
25918      fi
25919
25920  if test "x$complete" != "x$new_complete"; then
25921      NM="$new_complete"
25922      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25923$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25924    fi
25925
25926    if test -n "$ac_tool_prefix"; then
25927  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25928set dummy ${ac_tool_prefix}strip; ac_word=$2
25929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25930$as_echo_n "checking for $ac_word... " >&6; }
25931if test "${ac_cv_prog_STRIP+set}" = set; then :
25932  $as_echo_n "(cached) " >&6
25933else
25934  if test -n "$STRIP"; then
25935  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25936else
25937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25938for as_dir in $PATH
25939do
25940  IFS=$as_save_IFS
25941  test -z "$as_dir" && as_dir=.
25942    for ac_exec_ext in '' $ac_executable_extensions; do
25943  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25944    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25946    break 2
25947  fi
25948done
25949  done
25950IFS=$as_save_IFS
25951
25952fi
25953fi
25954STRIP=$ac_cv_prog_STRIP
25955if test -n "$STRIP"; then
25956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25957$as_echo "$STRIP" >&6; }
25958else
25959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25960$as_echo "no" >&6; }
25961fi
25962
25963
25964fi
25965if test -z "$ac_cv_prog_STRIP"; then
25966  ac_ct_STRIP=$STRIP
25967  # Extract the first word of "strip", so it can be a program name with args.
25968set dummy strip; ac_word=$2
25969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25970$as_echo_n "checking for $ac_word... " >&6; }
25971if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25972  $as_echo_n "(cached) " >&6
25973else
25974  if test -n "$ac_ct_STRIP"; then
25975  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25976else
25977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25978for as_dir in $PATH
25979do
25980  IFS=$as_save_IFS
25981  test -z "$as_dir" && as_dir=.
25982    for ac_exec_ext in '' $ac_executable_extensions; do
25983  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25984    ac_cv_prog_ac_ct_STRIP="strip"
25985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25986    break 2
25987  fi
25988done
25989  done
25990IFS=$as_save_IFS
25991
25992fi
25993fi
25994ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25995if test -n "$ac_ct_STRIP"; then
25996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25997$as_echo "$ac_ct_STRIP" >&6; }
25998else
25999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26000$as_echo "no" >&6; }
26001fi
26002
26003  if test "x$ac_ct_STRIP" = x; then
26004    STRIP=""
26005  else
26006    case $cross_compiling:$ac_tool_warned in
26007yes:)
26008{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26009$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26010ac_tool_warned=yes ;;
26011esac
26012    STRIP=$ac_ct_STRIP
26013  fi
26014else
26015  STRIP="$ac_cv_prog_STRIP"
26016fi
26017
26018
26019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26020
26021  # First separate the path from the arguments. This will split at the first
26022  # space.
26023  complete="$STRIP"
26024  path="${complete%% *}"
26025  tmp="$complete EOL"
26026  arguments="${tmp#* }"
26027
26028  # Input might be given as Windows format, start by converting to
26029  # unix format.
26030  new_path=`$CYGPATH -u "$path"`
26031
26032  # Now try to locate executable using which
26033  new_path=`$WHICH "$new_path" 2> /dev/null`
26034  # bat and cmd files are not always considered executable in cygwin causing which
26035  # to not find them
26036  if test "x$new_path" = x \
26037           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26038           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26039    new_path=`$CYGPATH -u "$path"`
26040  fi
26041  if test "x$new_path" = x; then
26042    # Oops. Which didn't find the executable.
26043    # The splitting of arguments from the executable at a space might have been incorrect,
26044    # since paths with space are more likely in Windows. Give it another try with the whole
26045    # argument.
26046    path="$complete"
26047    arguments="EOL"
26048    new_path=`$CYGPATH -u "$path"`
26049    new_path=`$WHICH "$new_path" 2> /dev/null`
26050    # bat and cmd files are not always considered executable in cygwin causing which
26051    # to not find them
26052    if test "x$new_path" = x \
26053             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26054             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26055      new_path=`$CYGPATH -u "$path"`
26056    fi
26057    if test "x$new_path" = x; then
26058      # It's still not found. Now this is an unrecoverable error.
26059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26060$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26061      has_space=`$ECHO "$complete" | $GREP " "`
26062      if test "x$has_space" != x; then
26063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26065      fi
26066      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26067    fi
26068  fi
26069
26070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26073  # "foo.exe" is OK but "foo" is an error.
26074  #
26075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26076  # It is also a way to make sure we got the proper file name for the real test later on.
26077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26078  if test "x$test_shortpath" = x; then
26079    # Short path failed, file does not exist as specified.
26080    # Try adding .exe or .cmd
26081    if test -f "${new_path}.exe"; then
26082       input_to_shortpath="${new_path}.exe"
26083    elif test -f "${new_path}.cmd"; then
26084       input_to_shortpath="${new_path}.cmd"
26085    else
26086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26087$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26090      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26091    fi
26092  else
26093    input_to_shortpath="$new_path"
26094  fi
26095
26096  # Call helper function which possibly converts this using DOS-style short mode.
26097  # If so, the updated path is stored in $new_path.
26098  new_path="$input_to_shortpath"
26099
26100  input_path="$input_to_shortpath"
26101  # Check if we need to convert this using DOS-style short mode. If the path
26102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26103  # take no chances and rewrite it.
26104  # Note: m4 eats our [], so we need to use [ and ] instead.
26105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26106  if test "x$has_forbidden_chars" != x; then
26107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26111      # Going to short mode and back again did indeed matter. Since short mode is
26112      # case insensitive, let's make it lowercase to improve readability.
26113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26114      # Now convert it back to Unix-stile (cygpath)
26115      input_path=`$CYGPATH -u "$shortmode_path"`
26116      new_path="$input_path"
26117    fi
26118  fi
26119
26120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26121  if test "x$test_cygdrive_prefix" = x; then
26122    # As a simple fix, exclude /usr/bin since it's not a real path.
26123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26125      # a path prefixed by /cygdrive for fixpath to work.
26126      new_path="$CYGWIN_ROOT_PATH$input_path"
26127    fi
26128  fi
26129
26130  # remove trailing .exe if any
26131  new_path="${new_path/%.exe/}"
26132
26133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26134
26135  # First separate the path from the arguments. This will split at the first
26136  # space.
26137  complete="$STRIP"
26138  path="${complete%% *}"
26139  tmp="$complete EOL"
26140  arguments="${tmp#* }"
26141
26142  # Input might be given as Windows format, start by converting to
26143  # unix format.
26144  new_path="$path"
26145
26146  windows_path="$new_path"
26147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26148    unix_path=`$CYGPATH -u "$windows_path"`
26149    new_path="$unix_path"
26150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26152    new_path="$unix_path"
26153  fi
26154
26155
26156  # Now try to locate executable using which
26157  new_path=`$WHICH "$new_path" 2> /dev/null`
26158
26159  if test "x$new_path" = x; then
26160    # Oops. Which didn't find the executable.
26161    # The splitting of arguments from the executable at a space might have been incorrect,
26162    # since paths with space are more likely in Windows. Give it another try with the whole
26163    # argument.
26164    path="$complete"
26165    arguments="EOL"
26166    new_path="$path"
26167
26168  windows_path="$new_path"
26169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26170    unix_path=`$CYGPATH -u "$windows_path"`
26171    new_path="$unix_path"
26172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26174    new_path="$unix_path"
26175  fi
26176
26177
26178    new_path=`$WHICH "$new_path" 2> /dev/null`
26179
26180    if test "x$new_path" = x; then
26181      # It's still not found. Now this is an unrecoverable error.
26182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26183$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26184      has_space=`$ECHO "$complete" | $GREP " "`
26185      if test "x$has_space" != x; then
26186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26188      fi
26189      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26190    fi
26191  fi
26192
26193  # Now new_path has a complete unix path to the binary
26194  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26195    # Keep paths in /bin as-is, but remove trailing .exe if any
26196    new_path="${new_path/%.exe/}"
26197    # Do not save /bin paths to all_fixpath_prefixes!
26198  else
26199    # Not in mixed or Windows style, start by that.
26200    new_path=`cmd //c echo $new_path`
26201
26202  input_path="$new_path"
26203  # Check if we need to convert this using DOS-style short mode. If the path
26204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26205  # take no chances and rewrite it.
26206  # Note: m4 eats our [], so we need to use [ and ] instead.
26207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26208  if test "x$has_forbidden_chars" != x; then
26209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26211  fi
26212
26213    # Output is in $new_path
26214
26215  windows_path="$new_path"
26216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26217    unix_path=`$CYGPATH -u "$windows_path"`
26218    new_path="$unix_path"
26219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26221    new_path="$unix_path"
26222  fi
26223
26224    # remove trailing .exe if any
26225    new_path="${new_path/%.exe/}"
26226
26227    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26228    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26229  fi
26230
26231  else
26232    # We're on a posix platform. Hooray! :)
26233    # First separate the path from the arguments. This will split at the first
26234    # space.
26235    complete="$STRIP"
26236    path="${complete%% *}"
26237    tmp="$complete EOL"
26238    arguments="${tmp#* }"
26239
26240    # Cannot rely on the command "which" here since it doesn't always work.
26241    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26242    if test -z "$is_absolute_path"; then
26243      # Path to executable is not absolute. Find it.
26244      IFS_save="$IFS"
26245      IFS=:
26246      for p in $PATH; do
26247        if test -f "$p/$path" && test -x "$p/$path"; then
26248          new_path="$p/$path"
26249          break
26250        fi
26251      done
26252      IFS="$IFS_save"
26253    else
26254      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26255$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26256      new_path="$path"
26257    fi
26258
26259    if test "x$new_path" = x; then
26260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26261$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26262        has_space=`$ECHO "$complete" | $GREP " "`
26263        if test "x$has_space" != x; then
26264          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26265$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26266        fi
26267        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26268      fi
26269  fi
26270
26271      # Now join together the path and the arguments once again
26272      if test "x$arguments" != xEOL; then
26273        new_complete="$new_path ${arguments% *}"
26274      else
26275        new_complete="$new_path"
26276      fi
26277
26278  if test "x$complete" != "x$new_complete"; then
26279      STRIP="$new_complete"
26280      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26281$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26282    fi
26283
26284fi
26285
26286# objcopy is used for moving debug symbols to separate files when
26287# full debug symbols are enabled.
26288if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26289    if test -n "$ac_tool_prefix"; then
26290  for ac_prog in gobjcopy objcopy
26291  do
26292    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26293set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26295$as_echo_n "checking for $ac_word... " >&6; }
26296if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26297  $as_echo_n "(cached) " >&6
26298else
26299  if test -n "$OBJCOPY"; then
26300  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26301else
26302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26303for as_dir in $PATH
26304do
26305  IFS=$as_save_IFS
26306  test -z "$as_dir" && as_dir=.
26307    for ac_exec_ext in '' $ac_executable_extensions; do
26308  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26309    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26311    break 2
26312  fi
26313done
26314  done
26315IFS=$as_save_IFS
26316
26317fi
26318fi
26319OBJCOPY=$ac_cv_prog_OBJCOPY
26320if test -n "$OBJCOPY"; then
26321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26322$as_echo "$OBJCOPY" >&6; }
26323else
26324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26325$as_echo "no" >&6; }
26326fi
26327
26328
26329    test -n "$OBJCOPY" && break
26330  done
26331fi
26332if test -z "$OBJCOPY"; then
26333  ac_ct_OBJCOPY=$OBJCOPY
26334  for ac_prog in gobjcopy objcopy
26335do
26336  # Extract the first word of "$ac_prog", so it can be a program name with args.
26337set dummy $ac_prog; ac_word=$2
26338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26339$as_echo_n "checking for $ac_word... " >&6; }
26340if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26341  $as_echo_n "(cached) " >&6
26342else
26343  if test -n "$ac_ct_OBJCOPY"; then
26344  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26345else
26346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26347for as_dir in $PATH
26348do
26349  IFS=$as_save_IFS
26350  test -z "$as_dir" && as_dir=.
26351    for ac_exec_ext in '' $ac_executable_extensions; do
26352  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26353    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26355    break 2
26356  fi
26357done
26358  done
26359IFS=$as_save_IFS
26360
26361fi
26362fi
26363ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26364if test -n "$ac_ct_OBJCOPY"; then
26365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26366$as_echo "$ac_ct_OBJCOPY" >&6; }
26367else
26368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26369$as_echo "no" >&6; }
26370fi
26371
26372
26373  test -n "$ac_ct_OBJCOPY" && break
26374done
26375
26376  if test "x$ac_ct_OBJCOPY" = x; then
26377    OBJCOPY=""
26378  else
26379    case $cross_compiling:$ac_tool_warned in
26380yes:)
26381{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26382$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26383ac_tool_warned=yes ;;
26384esac
26385    OBJCOPY=$ac_ct_OBJCOPY
26386  fi
26387fi
26388
26389    # Only call fixup if objcopy was found.
26390    if test -n "$OBJCOPY"; then
26391
26392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26393
26394  # First separate the path from the arguments. This will split at the first
26395  # space.
26396  complete="$OBJCOPY"
26397  path="${complete%% *}"
26398  tmp="$complete EOL"
26399  arguments="${tmp#* }"
26400
26401  # Input might be given as Windows format, start by converting to
26402  # unix format.
26403  new_path=`$CYGPATH -u "$path"`
26404
26405  # Now try to locate executable using which
26406  new_path=`$WHICH "$new_path" 2> /dev/null`
26407  # bat and cmd files are not always considered executable in cygwin causing which
26408  # to not find them
26409  if test "x$new_path" = x \
26410           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26411           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26412    new_path=`$CYGPATH -u "$path"`
26413  fi
26414  if test "x$new_path" = x; then
26415    # Oops. Which didn't find the executable.
26416    # The splitting of arguments from the executable at a space might have been incorrect,
26417    # since paths with space are more likely in Windows. Give it another try with the whole
26418    # argument.
26419    path="$complete"
26420    arguments="EOL"
26421    new_path=`$CYGPATH -u "$path"`
26422    new_path=`$WHICH "$new_path" 2> /dev/null`
26423    # bat and cmd files are not always considered executable in cygwin causing which
26424    # to not find them
26425    if test "x$new_path" = x \
26426             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26427             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26428      new_path=`$CYGPATH -u "$path"`
26429    fi
26430    if test "x$new_path" = x; then
26431      # It's still not found. Now this is an unrecoverable error.
26432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26433$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26434      has_space=`$ECHO "$complete" | $GREP " "`
26435      if test "x$has_space" != x; then
26436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26438      fi
26439      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26440    fi
26441  fi
26442
26443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26446  # "foo.exe" is OK but "foo" is an error.
26447  #
26448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26449  # It is also a way to make sure we got the proper file name for the real test later on.
26450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26451  if test "x$test_shortpath" = x; then
26452    # Short path failed, file does not exist as specified.
26453    # Try adding .exe or .cmd
26454    if test -f "${new_path}.exe"; then
26455       input_to_shortpath="${new_path}.exe"
26456    elif test -f "${new_path}.cmd"; then
26457       input_to_shortpath="${new_path}.cmd"
26458    else
26459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26460$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26461      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26462$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26463      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26464    fi
26465  else
26466    input_to_shortpath="$new_path"
26467  fi
26468
26469  # Call helper function which possibly converts this using DOS-style short mode.
26470  # If so, the updated path is stored in $new_path.
26471  new_path="$input_to_shortpath"
26472
26473  input_path="$input_to_shortpath"
26474  # Check if we need to convert this using DOS-style short mode. If the path
26475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26476  # take no chances and rewrite it.
26477  # Note: m4 eats our [], so we need to use [ and ] instead.
26478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26479  if test "x$has_forbidden_chars" != x; then
26480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26484      # Going to short mode and back again did indeed matter. Since short mode is
26485      # case insensitive, let's make it lowercase to improve readability.
26486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26487      # Now convert it back to Unix-stile (cygpath)
26488      input_path=`$CYGPATH -u "$shortmode_path"`
26489      new_path="$input_path"
26490    fi
26491  fi
26492
26493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26494  if test "x$test_cygdrive_prefix" = x; then
26495    # As a simple fix, exclude /usr/bin since it's not a real path.
26496    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26498      # a path prefixed by /cygdrive for fixpath to work.
26499      new_path="$CYGWIN_ROOT_PATH$input_path"
26500    fi
26501  fi
26502
26503  # remove trailing .exe if any
26504  new_path="${new_path/%.exe/}"
26505
26506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26507
26508  # First separate the path from the arguments. This will split at the first
26509  # space.
26510  complete="$OBJCOPY"
26511  path="${complete%% *}"
26512  tmp="$complete EOL"
26513  arguments="${tmp#* }"
26514
26515  # Input might be given as Windows format, start by converting to
26516  # unix format.
26517  new_path="$path"
26518
26519  windows_path="$new_path"
26520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26521    unix_path=`$CYGPATH -u "$windows_path"`
26522    new_path="$unix_path"
26523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26525    new_path="$unix_path"
26526  fi
26527
26528
26529  # Now try to locate executable using which
26530  new_path=`$WHICH "$new_path" 2> /dev/null`
26531
26532  if test "x$new_path" = x; then
26533    # Oops. Which didn't find the executable.
26534    # The splitting of arguments from the executable at a space might have been incorrect,
26535    # since paths with space are more likely in Windows. Give it another try with the whole
26536    # argument.
26537    path="$complete"
26538    arguments="EOL"
26539    new_path="$path"
26540
26541  windows_path="$new_path"
26542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26543    unix_path=`$CYGPATH -u "$windows_path"`
26544    new_path="$unix_path"
26545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26547    new_path="$unix_path"
26548  fi
26549
26550
26551    new_path=`$WHICH "$new_path" 2> /dev/null`
26552
26553    if test "x$new_path" = x; then
26554      # It's still not found. Now this is an unrecoverable error.
26555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26556$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26557      has_space=`$ECHO "$complete" | $GREP " "`
26558      if test "x$has_space" != x; then
26559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26561      fi
26562      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26563    fi
26564  fi
26565
26566  # Now new_path has a complete unix path to the binary
26567  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26568    # Keep paths in /bin as-is, but remove trailing .exe if any
26569    new_path="${new_path/%.exe/}"
26570    # Do not save /bin paths to all_fixpath_prefixes!
26571  else
26572    # Not in mixed or Windows style, start by that.
26573    new_path=`cmd //c echo $new_path`
26574
26575  input_path="$new_path"
26576  # Check if we need to convert this using DOS-style short mode. If the path
26577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26578  # take no chances and rewrite it.
26579  # Note: m4 eats our [], so we need to use [ and ] instead.
26580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26581  if test "x$has_forbidden_chars" != x; then
26582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26584  fi
26585
26586    # Output is in $new_path
26587
26588  windows_path="$new_path"
26589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590    unix_path=`$CYGPATH -u "$windows_path"`
26591    new_path="$unix_path"
26592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26594    new_path="$unix_path"
26595  fi
26596
26597    # remove trailing .exe if any
26598    new_path="${new_path/%.exe/}"
26599
26600    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26601    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26602  fi
26603
26604  else
26605    # We're on a posix platform. Hooray! :)
26606    # First separate the path from the arguments. This will split at the first
26607    # space.
26608    complete="$OBJCOPY"
26609    path="${complete%% *}"
26610    tmp="$complete EOL"
26611    arguments="${tmp#* }"
26612
26613    # Cannot rely on the command "which" here since it doesn't always work.
26614    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26615    if test -z "$is_absolute_path"; then
26616      # Path to executable is not absolute. Find it.
26617      IFS_save="$IFS"
26618      IFS=:
26619      for p in $PATH; do
26620        if test -f "$p/$path" && test -x "$p/$path"; then
26621          new_path="$p/$path"
26622          break
26623        fi
26624      done
26625      IFS="$IFS_save"
26626    else
26627      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26628$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26629      new_path="$path"
26630    fi
26631
26632    if test "x$new_path" = x; then
26633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26634$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26635        has_space=`$ECHO "$complete" | $GREP " "`
26636        if test "x$has_space" != x; then
26637          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26638$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26639        fi
26640        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26641      fi
26642  fi
26643
26644      # Now join together the path and the arguments once again
26645      if test "x$arguments" != xEOL; then
26646        new_complete="$new_path ${arguments% *}"
26647      else
26648        new_complete="$new_path"
26649      fi
26650
26651  if test "x$complete" != "x$new_complete"; then
26652      OBJCOPY="$new_complete"
26653      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26654$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26655    fi
26656
26657    fi
26658fi
26659
26660if test -n "$ac_tool_prefix"; then
26661  for ac_prog in gobjdump objdump
26662  do
26663    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26664set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26666$as_echo_n "checking for $ac_word... " >&6; }
26667if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26668  $as_echo_n "(cached) " >&6
26669else
26670  if test -n "$OBJDUMP"; then
26671  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26672else
26673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26674for as_dir in $PATH
26675do
26676  IFS=$as_save_IFS
26677  test -z "$as_dir" && as_dir=.
26678    for ac_exec_ext in '' $ac_executable_extensions; do
26679  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26680    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26682    break 2
26683  fi
26684done
26685  done
26686IFS=$as_save_IFS
26687
26688fi
26689fi
26690OBJDUMP=$ac_cv_prog_OBJDUMP
26691if test -n "$OBJDUMP"; then
26692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26693$as_echo "$OBJDUMP" >&6; }
26694else
26695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26696$as_echo "no" >&6; }
26697fi
26698
26699
26700    test -n "$OBJDUMP" && break
26701  done
26702fi
26703if test -z "$OBJDUMP"; then
26704  ac_ct_OBJDUMP=$OBJDUMP
26705  for ac_prog in gobjdump objdump
26706do
26707  # Extract the first word of "$ac_prog", so it can be a program name with args.
26708set dummy $ac_prog; ac_word=$2
26709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26710$as_echo_n "checking for $ac_word... " >&6; }
26711if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26712  $as_echo_n "(cached) " >&6
26713else
26714  if test -n "$ac_ct_OBJDUMP"; then
26715  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26716else
26717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26718for as_dir in $PATH
26719do
26720  IFS=$as_save_IFS
26721  test -z "$as_dir" && as_dir=.
26722    for ac_exec_ext in '' $ac_executable_extensions; do
26723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26724    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26726    break 2
26727  fi
26728done
26729  done
26730IFS=$as_save_IFS
26731
26732fi
26733fi
26734ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26735if test -n "$ac_ct_OBJDUMP"; then
26736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26737$as_echo "$ac_ct_OBJDUMP" >&6; }
26738else
26739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26740$as_echo "no" >&6; }
26741fi
26742
26743
26744  test -n "$ac_ct_OBJDUMP" && break
26745done
26746
26747  if test "x$ac_ct_OBJDUMP" = x; then
26748    OBJDUMP=""
26749  else
26750    case $cross_compiling:$ac_tool_warned in
26751yes:)
26752{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26753$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26754ac_tool_warned=yes ;;
26755esac
26756    OBJDUMP=$ac_ct_OBJDUMP
26757  fi
26758fi
26759
26760if test "x$OBJDUMP" != x; then
26761  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26762
26763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26764
26765  # First separate the path from the arguments. This will split at the first
26766  # space.
26767  complete="$OBJDUMP"
26768  path="${complete%% *}"
26769  tmp="$complete EOL"
26770  arguments="${tmp#* }"
26771
26772  # Input might be given as Windows format, start by converting to
26773  # unix format.
26774  new_path=`$CYGPATH -u "$path"`
26775
26776  # Now try to locate executable using which
26777  new_path=`$WHICH "$new_path" 2> /dev/null`
26778  # bat and cmd files are not always considered executable in cygwin causing which
26779  # to not find them
26780  if test "x$new_path" = x \
26781           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26782           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26783    new_path=`$CYGPATH -u "$path"`
26784  fi
26785  if test "x$new_path" = x; then
26786    # Oops. Which didn't find the executable.
26787    # The splitting of arguments from the executable at a space might have been incorrect,
26788    # since paths with space are more likely in Windows. Give it another try with the whole
26789    # argument.
26790    path="$complete"
26791    arguments="EOL"
26792    new_path=`$CYGPATH -u "$path"`
26793    new_path=`$WHICH "$new_path" 2> /dev/null`
26794    # bat and cmd files are not always considered executable in cygwin causing which
26795    # to not find them
26796    if test "x$new_path" = x \
26797             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26798             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26799      new_path=`$CYGPATH -u "$path"`
26800    fi
26801    if test "x$new_path" = x; then
26802      # It's still not found. Now this is an unrecoverable error.
26803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26804$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26805      has_space=`$ECHO "$complete" | $GREP " "`
26806      if test "x$has_space" != x; then
26807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26809      fi
26810      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26811    fi
26812  fi
26813
26814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26817  # "foo.exe" is OK but "foo" is an error.
26818  #
26819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26820  # It is also a way to make sure we got the proper file name for the real test later on.
26821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26822  if test "x$test_shortpath" = x; then
26823    # Short path failed, file does not exist as specified.
26824    # Try adding .exe or .cmd
26825    if test -f "${new_path}.exe"; then
26826       input_to_shortpath="${new_path}.exe"
26827    elif test -f "${new_path}.cmd"; then
26828       input_to_shortpath="${new_path}.cmd"
26829    else
26830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26831$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26832      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26833$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26834      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26835    fi
26836  else
26837    input_to_shortpath="$new_path"
26838  fi
26839
26840  # Call helper function which possibly converts this using DOS-style short mode.
26841  # If so, the updated path is stored in $new_path.
26842  new_path="$input_to_shortpath"
26843
26844  input_path="$input_to_shortpath"
26845  # Check if we need to convert this using DOS-style short mode. If the path
26846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26847  # take no chances and rewrite it.
26848  # Note: m4 eats our [], so we need to use [ and ] instead.
26849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26850  if test "x$has_forbidden_chars" != x; then
26851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26855      # Going to short mode and back again did indeed matter. Since short mode is
26856      # case insensitive, let's make it lowercase to improve readability.
26857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26858      # Now convert it back to Unix-stile (cygpath)
26859      input_path=`$CYGPATH -u "$shortmode_path"`
26860      new_path="$input_path"
26861    fi
26862  fi
26863
26864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26865  if test "x$test_cygdrive_prefix" = x; then
26866    # As a simple fix, exclude /usr/bin since it's not a real path.
26867    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26869      # a path prefixed by /cygdrive for fixpath to work.
26870      new_path="$CYGWIN_ROOT_PATH$input_path"
26871    fi
26872  fi
26873
26874  # remove trailing .exe if any
26875  new_path="${new_path/%.exe/}"
26876
26877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26878
26879  # First separate the path from the arguments. This will split at the first
26880  # space.
26881  complete="$OBJDUMP"
26882  path="${complete%% *}"
26883  tmp="$complete EOL"
26884  arguments="${tmp#* }"
26885
26886  # Input might be given as Windows format, start by converting to
26887  # unix format.
26888  new_path="$path"
26889
26890  windows_path="$new_path"
26891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26892    unix_path=`$CYGPATH -u "$windows_path"`
26893    new_path="$unix_path"
26894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26896    new_path="$unix_path"
26897  fi
26898
26899
26900  # Now try to locate executable using which
26901  new_path=`$WHICH "$new_path" 2> /dev/null`
26902
26903  if test "x$new_path" = x; then
26904    # Oops. Which didn't find the executable.
26905    # The splitting of arguments from the executable at a space might have been incorrect,
26906    # since paths with space are more likely in Windows. Give it another try with the whole
26907    # argument.
26908    path="$complete"
26909    arguments="EOL"
26910    new_path="$path"
26911
26912  windows_path="$new_path"
26913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26914    unix_path=`$CYGPATH -u "$windows_path"`
26915    new_path="$unix_path"
26916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26918    new_path="$unix_path"
26919  fi
26920
26921
26922    new_path=`$WHICH "$new_path" 2> /dev/null`
26923
26924    if test "x$new_path" = x; then
26925      # It's still not found. Now this is an unrecoverable error.
26926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26927$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26928      has_space=`$ECHO "$complete" | $GREP " "`
26929      if test "x$has_space" != x; then
26930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26932      fi
26933      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26934    fi
26935  fi
26936
26937  # Now new_path has a complete unix path to the binary
26938  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26939    # Keep paths in /bin as-is, but remove trailing .exe if any
26940    new_path="${new_path/%.exe/}"
26941    # Do not save /bin paths to all_fixpath_prefixes!
26942  else
26943    # Not in mixed or Windows style, start by that.
26944    new_path=`cmd //c echo $new_path`
26945
26946  input_path="$new_path"
26947  # Check if we need to convert this using DOS-style short mode. If the path
26948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26949  # take no chances and rewrite it.
26950  # Note: m4 eats our [], so we need to use [ and ] instead.
26951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26952  if test "x$has_forbidden_chars" != x; then
26953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26955  fi
26956
26957    # Output is in $new_path
26958
26959  windows_path="$new_path"
26960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26961    unix_path=`$CYGPATH -u "$windows_path"`
26962    new_path="$unix_path"
26963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26965    new_path="$unix_path"
26966  fi
26967
26968    # remove trailing .exe if any
26969    new_path="${new_path/%.exe/}"
26970
26971    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26972    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26973  fi
26974
26975  else
26976    # We're on a posix platform. Hooray! :)
26977    # First separate the path from the arguments. This will split at the first
26978    # space.
26979    complete="$OBJDUMP"
26980    path="${complete%% *}"
26981    tmp="$complete EOL"
26982    arguments="${tmp#* }"
26983
26984    # Cannot rely on the command "which" here since it doesn't always work.
26985    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26986    if test -z "$is_absolute_path"; then
26987      # Path to executable is not absolute. Find it.
26988      IFS_save="$IFS"
26989      IFS=:
26990      for p in $PATH; do
26991        if test -f "$p/$path" && test -x "$p/$path"; then
26992          new_path="$p/$path"
26993          break
26994        fi
26995      done
26996      IFS="$IFS_save"
26997    else
26998      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26999$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27000      new_path="$path"
27001    fi
27002
27003    if test "x$new_path" = x; then
27004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27005$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27006        has_space=`$ECHO "$complete" | $GREP " "`
27007        if test "x$has_space" != x; then
27008          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27009$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27010        fi
27011        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27012      fi
27013  fi
27014
27015      # Now join together the path and the arguments once again
27016      if test "x$arguments" != xEOL; then
27017        new_complete="$new_path ${arguments% *}"
27018      else
27019        new_complete="$new_path"
27020      fi
27021
27022  if test "x$complete" != "x$new_complete"; then
27023      OBJDUMP="$new_complete"
27024      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27025$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27026    fi
27027
27028fi
27029
27030if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27031   # Extract the first word of "lipo", so it can be a program name with args.
27032set dummy lipo; ac_word=$2
27033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27034$as_echo_n "checking for $ac_word... " >&6; }
27035if test "${ac_cv_path_LIPO+set}" = set; then :
27036  $as_echo_n "(cached) " >&6
27037else
27038  case $LIPO in
27039  [\\/]* | ?:[\\/]*)
27040  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27041  ;;
27042  *)
27043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27044for as_dir in $PATH
27045do
27046  IFS=$as_save_IFS
27047  test -z "$as_dir" && as_dir=.
27048    for ac_exec_ext in '' $ac_executable_extensions; do
27049  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27050    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27052    break 2
27053  fi
27054done
27055  done
27056IFS=$as_save_IFS
27057
27058  ;;
27059esac
27060fi
27061LIPO=$ac_cv_path_LIPO
27062if test -n "$LIPO"; then
27063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27064$as_echo "$LIPO" >&6; }
27065else
27066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27067$as_echo "no" >&6; }
27068fi
27069
27070
27071
27072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27073
27074  # First separate the path from the arguments. This will split at the first
27075  # space.
27076  complete="$LIPO"
27077  path="${complete%% *}"
27078  tmp="$complete EOL"
27079  arguments="${tmp#* }"
27080
27081  # Input might be given as Windows format, start by converting to
27082  # unix format.
27083  new_path=`$CYGPATH -u "$path"`
27084
27085  # Now try to locate executable using which
27086  new_path=`$WHICH "$new_path" 2> /dev/null`
27087  # bat and cmd files are not always considered executable in cygwin causing which
27088  # to not find them
27089  if test "x$new_path" = x \
27090           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27091           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27092    new_path=`$CYGPATH -u "$path"`
27093  fi
27094  if test "x$new_path" = x; then
27095    # Oops. Which didn't find the executable.
27096    # The splitting of arguments from the executable at a space might have been incorrect,
27097    # since paths with space are more likely in Windows. Give it another try with the whole
27098    # argument.
27099    path="$complete"
27100    arguments="EOL"
27101    new_path=`$CYGPATH -u "$path"`
27102    new_path=`$WHICH "$new_path" 2> /dev/null`
27103    # bat and cmd files are not always considered executable in cygwin causing which
27104    # to not find them
27105    if test "x$new_path" = x \
27106             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27107             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27108      new_path=`$CYGPATH -u "$path"`
27109    fi
27110    if test "x$new_path" = x; then
27111      # It's still not found. Now this is an unrecoverable error.
27112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27113$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27114      has_space=`$ECHO "$complete" | $GREP " "`
27115      if test "x$has_space" != x; then
27116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27118      fi
27119      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27120    fi
27121  fi
27122
27123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27126  # "foo.exe" is OK but "foo" is an error.
27127  #
27128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27129  # It is also a way to make sure we got the proper file name for the real test later on.
27130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27131  if test "x$test_shortpath" = x; then
27132    # Short path failed, file does not exist as specified.
27133    # Try adding .exe or .cmd
27134    if test -f "${new_path}.exe"; then
27135       input_to_shortpath="${new_path}.exe"
27136    elif test -f "${new_path}.cmd"; then
27137       input_to_shortpath="${new_path}.cmd"
27138    else
27139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27140$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27141      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27142$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27143      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27144    fi
27145  else
27146    input_to_shortpath="$new_path"
27147  fi
27148
27149  # Call helper function which possibly converts this using DOS-style short mode.
27150  # If so, the updated path is stored in $new_path.
27151  new_path="$input_to_shortpath"
27152
27153  input_path="$input_to_shortpath"
27154  # Check if we need to convert this using DOS-style short mode. If the path
27155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27156  # take no chances and rewrite it.
27157  # Note: m4 eats our [], so we need to use [ and ] instead.
27158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27159  if test "x$has_forbidden_chars" != x; then
27160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27164      # Going to short mode and back again did indeed matter. Since short mode is
27165      # case insensitive, let's make it lowercase to improve readability.
27166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27167      # Now convert it back to Unix-stile (cygpath)
27168      input_path=`$CYGPATH -u "$shortmode_path"`
27169      new_path="$input_path"
27170    fi
27171  fi
27172
27173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27174  if test "x$test_cygdrive_prefix" = x; then
27175    # As a simple fix, exclude /usr/bin since it's not a real path.
27176    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27178      # a path prefixed by /cygdrive for fixpath to work.
27179      new_path="$CYGWIN_ROOT_PATH$input_path"
27180    fi
27181  fi
27182
27183  # remove trailing .exe if any
27184  new_path="${new_path/%.exe/}"
27185
27186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27187
27188  # First separate the path from the arguments. This will split at the first
27189  # space.
27190  complete="$LIPO"
27191  path="${complete%% *}"
27192  tmp="$complete EOL"
27193  arguments="${tmp#* }"
27194
27195  # Input might be given as Windows format, start by converting to
27196  # unix format.
27197  new_path="$path"
27198
27199  windows_path="$new_path"
27200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27201    unix_path=`$CYGPATH -u "$windows_path"`
27202    new_path="$unix_path"
27203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27205    new_path="$unix_path"
27206  fi
27207
27208
27209  # Now try to locate executable using which
27210  new_path=`$WHICH "$new_path" 2> /dev/null`
27211
27212  if test "x$new_path" = x; then
27213    # Oops. Which didn't find the executable.
27214    # The splitting of arguments from the executable at a space might have been incorrect,
27215    # since paths with space are more likely in Windows. Give it another try with the whole
27216    # argument.
27217    path="$complete"
27218    arguments="EOL"
27219    new_path="$path"
27220
27221  windows_path="$new_path"
27222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27223    unix_path=`$CYGPATH -u "$windows_path"`
27224    new_path="$unix_path"
27225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27227    new_path="$unix_path"
27228  fi
27229
27230
27231    new_path=`$WHICH "$new_path" 2> /dev/null`
27232
27233    if test "x$new_path" = x; then
27234      # It's still not found. Now this is an unrecoverable error.
27235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27236$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27237      has_space=`$ECHO "$complete" | $GREP " "`
27238      if test "x$has_space" != x; then
27239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27241      fi
27242      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27243    fi
27244  fi
27245
27246  # Now new_path has a complete unix path to the binary
27247  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27248    # Keep paths in /bin as-is, but remove trailing .exe if any
27249    new_path="${new_path/%.exe/}"
27250    # Do not save /bin paths to all_fixpath_prefixes!
27251  else
27252    # Not in mixed or Windows style, start by that.
27253    new_path=`cmd //c echo $new_path`
27254
27255  input_path="$new_path"
27256  # Check if we need to convert this using DOS-style short mode. If the path
27257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27258  # take no chances and rewrite it.
27259  # Note: m4 eats our [], so we need to use [ and ] instead.
27260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27261  if test "x$has_forbidden_chars" != x; then
27262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27264  fi
27265
27266    # Output is in $new_path
27267
27268  windows_path="$new_path"
27269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27270    unix_path=`$CYGPATH -u "$windows_path"`
27271    new_path="$unix_path"
27272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27274    new_path="$unix_path"
27275  fi
27276
27277    # remove trailing .exe if any
27278    new_path="${new_path/%.exe/}"
27279
27280    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27281    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27282  fi
27283
27284  else
27285    # We're on a posix platform. Hooray! :)
27286    # First separate the path from the arguments. This will split at the first
27287    # space.
27288    complete="$LIPO"
27289    path="${complete%% *}"
27290    tmp="$complete EOL"
27291    arguments="${tmp#* }"
27292
27293    # Cannot rely on the command "which" here since it doesn't always work.
27294    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27295    if test -z "$is_absolute_path"; then
27296      # Path to executable is not absolute. Find it.
27297      IFS_save="$IFS"
27298      IFS=:
27299      for p in $PATH; do
27300        if test -f "$p/$path" && test -x "$p/$path"; then
27301          new_path="$p/$path"
27302          break
27303        fi
27304      done
27305      IFS="$IFS_save"
27306    else
27307      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27308$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27309      new_path="$path"
27310    fi
27311
27312    if test "x$new_path" = x; then
27313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27314$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27315        has_space=`$ECHO "$complete" | $GREP " "`
27316        if test "x$has_space" != x; then
27317          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27318$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27319        fi
27320        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27321      fi
27322  fi
27323
27324      # Now join together the path and the arguments once again
27325      if test "x$arguments" != xEOL; then
27326        new_complete="$new_path ${arguments% *}"
27327      else
27328        new_complete="$new_path"
27329      fi
27330
27331  if test "x$complete" != "x$new_complete"; then
27332      LIPO="$new_complete"
27333      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27334$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27335    fi
27336
27337fi
27338
27339# Restore old path without tools dir
27340PATH="$OLD_PATH"
27341
27342
27343# FIXME: Currently we must test this after paths but before flags. Fix!
27344
27345# And we can test some aspects on the target using configure macros.
27346
27347
27348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27349$as_echo_n "checking for ANSI C header files... " >&6; }
27350if test "${ac_cv_header_stdc+set}" = set; then :
27351  $as_echo_n "(cached) " >&6
27352else
27353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27354/* end confdefs.h.  */
27355#include <stdlib.h>
27356#include <stdarg.h>
27357#include <string.h>
27358#include <float.h>
27359
27360int
27361main ()
27362{
27363
27364  ;
27365  return 0;
27366}
27367_ACEOF
27368if ac_fn_cxx_try_compile "$LINENO"; then :
27369  ac_cv_header_stdc=yes
27370else
27371  ac_cv_header_stdc=no
27372fi
27373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27374
27375if test $ac_cv_header_stdc = yes; then
27376  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27378/* end confdefs.h.  */
27379#include <string.h>
27380
27381_ACEOF
27382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27383  $EGREP "memchr" >/dev/null 2>&1; then :
27384
27385else
27386  ac_cv_header_stdc=no
27387fi
27388rm -f conftest*
27389
27390fi
27391
27392if test $ac_cv_header_stdc = yes; then
27393  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27395/* end confdefs.h.  */
27396#include <stdlib.h>
27397
27398_ACEOF
27399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27400  $EGREP "free" >/dev/null 2>&1; then :
27401
27402else
27403  ac_cv_header_stdc=no
27404fi
27405rm -f conftest*
27406
27407fi
27408
27409if test $ac_cv_header_stdc = yes; then
27410  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27411  if test "$cross_compiling" = yes; then :
27412  :
27413else
27414  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27415/* end confdefs.h.  */
27416#include <ctype.h>
27417#include <stdlib.h>
27418#if ((' ' & 0x0FF) == 0x020)
27419# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27420# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27421#else
27422# define ISLOWER(c) \
27423		   (('a' <= (c) && (c) <= 'i') \
27424		     || ('j' <= (c) && (c) <= 'r') \
27425		     || ('s' <= (c) && (c) <= 'z'))
27426# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27427#endif
27428
27429#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27430int
27431main ()
27432{
27433  int i;
27434  for (i = 0; i < 256; i++)
27435    if (XOR (islower (i), ISLOWER (i))
27436	|| toupper (i) != TOUPPER (i))
27437      return 2;
27438  return 0;
27439}
27440_ACEOF
27441if ac_fn_cxx_try_run "$LINENO"; then :
27442
27443else
27444  ac_cv_header_stdc=no
27445fi
27446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27447  conftest.$ac_objext conftest.beam conftest.$ac_ext
27448fi
27449
27450fi
27451fi
27452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27453$as_echo "$ac_cv_header_stdc" >&6; }
27454if test $ac_cv_header_stdc = yes; then
27455
27456$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27457
27458fi
27459
27460# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27461for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27462		  inttypes.h stdint.h unistd.h
27463do :
27464  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27465ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27466"
27467if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27468  cat >>confdefs.h <<_ACEOF
27469#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27470_ACEOF
27471
27472fi
27473
27474done
27475
27476
27477
27478###############################################################################
27479#
27480# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27481# (The JVM can use 32 or 64 bit Java pointers but that decision
27482# is made at runtime.)
27483#
27484if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27485  # Always specify -m flags on Solaris
27486
27487  # keep track of c/cxx flags that we added outselves...
27488  #   to prevent emitting warning...
27489  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27490  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27491  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27492
27493  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27494  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27495  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27496
27497  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27498  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27499  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27500
27501elif test "x$COMPILE_TYPE" = xreduced; then
27502  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27503    # Specify -m if running reduced on other Posix platforms
27504
27505  # keep track of c/cxx flags that we added outselves...
27506  #   to prevent emitting warning...
27507  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27508  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27509  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27510
27511  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27512  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27513  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27514
27515  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27516  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27517  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27518
27519  fi
27520fi
27521
27522# Make compilation sanity check
27523for ac_header in stdio.h
27524do :
27525  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27526if test "x$ac_cv_header_stdio_h" = x""yes; then :
27527  cat >>confdefs.h <<_ACEOF
27528#define HAVE_STDIO_H 1
27529_ACEOF
27530
27531else
27532
27533  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27534$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27535  if test "x$COMPILE_TYPE" = xreduced; then
27536    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27537$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27538  elif test "x$COMPILE_TYPE" = xcross; then
27539    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27540$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27541  fi
27542  as_fn_error $? "Cannot continue." "$LINENO" 5
27543
27544fi
27545
27546done
27547
27548
27549# The cast to long int works around a bug in the HP C Compiler
27550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27552# This bug is HP SR number 8606223364.
27553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27554$as_echo_n "checking size of int *... " >&6; }
27555if test "${ac_cv_sizeof_int_p+set}" = set; then :
27556  $as_echo_n "(cached) " >&6
27557else
27558  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27559
27560else
27561  if test "$ac_cv_type_int_p" = yes; then
27562     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27564as_fn_error 77 "cannot compute sizeof (int *)
27565See \`config.log' for more details" "$LINENO" 5 ; }
27566   else
27567     ac_cv_sizeof_int_p=0
27568   fi
27569fi
27570
27571fi
27572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27573$as_echo "$ac_cv_sizeof_int_p" >&6; }
27574
27575
27576
27577cat >>confdefs.h <<_ACEOF
27578#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27579_ACEOF
27580
27581
27582
27583if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27584  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27585  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27586fi
27587
27588if test "x$SIZEOF_INT_P" = x; then
27589    # The test failed, lets stick to the assumed value.
27590    { $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
27591$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27592else
27593    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27594
27595    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27596        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
27597    fi
27598fi
27599
27600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27601$as_echo_n "checking for target address size... " >&6; }
27602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27603$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27604
27605
27606###############################################################################
27607#
27608# Is the target little of big endian?
27609#
27610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27611$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27612if test "${ac_cv_c_bigendian+set}" = set; then :
27613  $as_echo_n "(cached) " >&6
27614else
27615  ac_cv_c_bigendian=unknown
27616    # See if we're dealing with a universal compiler.
27617    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27618/* end confdefs.h.  */
27619#ifndef __APPLE_CC__
27620	       not a universal capable compiler
27621	     #endif
27622	     typedef int dummy;
27623
27624_ACEOF
27625if ac_fn_cxx_try_compile "$LINENO"; then :
27626
27627	# Check for potential -arch flags.  It is not universal unless
27628	# there are at least two -arch flags with different values.
27629	ac_arch=
27630	ac_prev=
27631	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27632	 if test -n "$ac_prev"; then
27633	   case $ac_word in
27634	     i?86 | x86_64 | ppc | ppc64)
27635	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27636		 ac_arch=$ac_word
27637	       else
27638		 ac_cv_c_bigendian=universal
27639		 break
27640	       fi
27641	       ;;
27642	   esac
27643	   ac_prev=
27644	 elif test "x$ac_word" = "x-arch"; then
27645	   ac_prev=arch
27646	 fi
27647       done
27648fi
27649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27650    if test $ac_cv_c_bigendian = unknown; then
27651      # See if sys/param.h defines the BYTE_ORDER macro.
27652      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27653/* end confdefs.h.  */
27654#include <sys/types.h>
27655	     #include <sys/param.h>
27656
27657int
27658main ()
27659{
27660#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27661		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27662		     && LITTLE_ENDIAN)
27663	      bogus endian macros
27664	     #endif
27665
27666  ;
27667  return 0;
27668}
27669_ACEOF
27670if ac_fn_cxx_try_compile "$LINENO"; then :
27671  # It does; now see whether it defined to BIG_ENDIAN or not.
27672	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27673/* end confdefs.h.  */
27674#include <sys/types.h>
27675		#include <sys/param.h>
27676
27677int
27678main ()
27679{
27680#if BYTE_ORDER != BIG_ENDIAN
27681		 not big endian
27682		#endif
27683
27684  ;
27685  return 0;
27686}
27687_ACEOF
27688if ac_fn_cxx_try_compile "$LINENO"; then :
27689  ac_cv_c_bigendian=yes
27690else
27691  ac_cv_c_bigendian=no
27692fi
27693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27694fi
27695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27696    fi
27697    if test $ac_cv_c_bigendian = unknown; then
27698      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27699      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27700/* end confdefs.h.  */
27701#include <limits.h>
27702
27703int
27704main ()
27705{
27706#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27707	      bogus endian macros
27708	     #endif
27709
27710  ;
27711  return 0;
27712}
27713_ACEOF
27714if ac_fn_cxx_try_compile "$LINENO"; then :
27715  # It does; now see whether it defined to _BIG_ENDIAN or not.
27716	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27717/* end confdefs.h.  */
27718#include <limits.h>
27719
27720int
27721main ()
27722{
27723#ifndef _BIG_ENDIAN
27724		 not big endian
27725		#endif
27726
27727  ;
27728  return 0;
27729}
27730_ACEOF
27731if ac_fn_cxx_try_compile "$LINENO"; then :
27732  ac_cv_c_bigendian=yes
27733else
27734  ac_cv_c_bigendian=no
27735fi
27736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27737fi
27738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27739    fi
27740    if test $ac_cv_c_bigendian = unknown; then
27741      # Compile a test program.
27742      if test "$cross_compiling" = yes; then :
27743  # Try to guess by grepping values from an object file.
27744	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27745/* end confdefs.h.  */
27746short int ascii_mm[] =
27747		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27748		short int ascii_ii[] =
27749		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27750		int use_ascii (int i) {
27751		  return ascii_mm[i] + ascii_ii[i];
27752		}
27753		short int ebcdic_ii[] =
27754		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27755		short int ebcdic_mm[] =
27756		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27757		int use_ebcdic (int i) {
27758		  return ebcdic_mm[i] + ebcdic_ii[i];
27759		}
27760		extern int foo;
27761
27762int
27763main ()
27764{
27765return use_ascii (foo) == use_ebcdic (foo);
27766  ;
27767  return 0;
27768}
27769_ACEOF
27770if ac_fn_cxx_try_compile "$LINENO"; then :
27771  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27772	      ac_cv_c_bigendian=yes
27773	    fi
27774	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27775	      if test "$ac_cv_c_bigendian" = unknown; then
27776		ac_cv_c_bigendian=no
27777	      else
27778		# finding both strings is unlikely to happen, but who knows?
27779		ac_cv_c_bigendian=unknown
27780	      fi
27781	    fi
27782fi
27783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27784else
27785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27786/* end confdefs.h.  */
27787$ac_includes_default
27788int
27789main ()
27790{
27791
27792	     /* Are we little or big endian?  From Harbison&Steele.  */
27793	     union
27794	     {
27795	       long int l;
27796	       char c[sizeof (long int)];
27797	     } u;
27798	     u.l = 1;
27799	     return u.c[sizeof (long int) - 1] == 1;
27800
27801  ;
27802  return 0;
27803}
27804_ACEOF
27805if ac_fn_cxx_try_run "$LINENO"; then :
27806  ac_cv_c_bigendian=no
27807else
27808  ac_cv_c_bigendian=yes
27809fi
27810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27811  conftest.$ac_objext conftest.beam conftest.$ac_ext
27812fi
27813
27814    fi
27815fi
27816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27817$as_echo "$ac_cv_c_bigendian" >&6; }
27818 case $ac_cv_c_bigendian in #(
27819   yes)
27820     ENDIAN="big";; #(
27821   no)
27822     ENDIAN="little" ;; #(
27823   universal)
27824     ENDIAN="universal_endianness"
27825     ;; #(
27826   *)
27827     ENDIAN="unknown" ;;
27828 esac
27829
27830
27831if test "x$ENDIAN" = xuniversal_endianness; then
27832    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27833fi
27834if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27835    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
27836fi
27837
27838
27839# Configure flags for the tools
27840
27841
27842###############################################################################
27843#
27844# How to compile shared libraries.
27845#
27846
27847if test "x$GCC" = xyes; then
27848    COMPILER_NAME=gcc
27849    PICFLAG="-fPIC"
27850    LIBRARY_PREFIX=lib
27851    SHARED_LIBRARY='lib$1.so'
27852    STATIC_LIBRARY='lib$1.a'
27853    SHARED_LIBRARY_FLAGS="-shared"
27854    SHARED_LIBRARY_SUFFIX='.so'
27855    STATIC_LIBRARY_SUFFIX='.a'
27856    OBJ_SUFFIX='.o'
27857    EXE_SUFFIX=''
27858    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27859    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27860    C_FLAG_REORDER=''
27861    CXX_FLAG_REORDER=''
27862    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27863    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27864    LD="$CC"
27865    LDEXE="$CC"
27866    LDCXX="$CXX"
27867    LDEXECXX="$CXX"
27868    POST_STRIP_CMD="$STRIP -g"
27869
27870    # Linking is different on MacOSX
27871    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27872        # Might change in the future to clang.
27873        COMPILER_NAME=gcc
27874        SHARED_LIBRARY='lib$1.dylib'
27875        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27876        SHARED_LIBRARY_SUFFIX='.dylib'
27877        EXE_SUFFIX=''
27878        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27879        SET_SHARED_LIBRARY_MAPFILE=''
27880        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27881        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27882        POST_STRIP_CMD="$STRIP -S"
27883    fi
27884else
27885    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27886        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27887        COMPILER_NAME=ossc
27888        PICFLAG="-KPIC"
27889        LIBRARY_PREFIX=lib
27890        SHARED_LIBRARY='lib$1.so'
27891        STATIC_LIBRARY='lib$1.a'
27892        SHARED_LIBRARY_FLAGS="-G"
27893        SHARED_LIBRARY_SUFFIX='.so'
27894        STATIC_LIBRARY_SUFFIX='.a'
27895        OBJ_SUFFIX='.o'
27896        EXE_SUFFIX=''
27897        SET_SHARED_LIBRARY_NAME=''
27898        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27899	C_FLAG_REORDER='-xF'
27900	CXX_FLAG_REORDER='-xF'
27901        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27902        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27903        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27904        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27905        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27906        POST_STRIP_CMD="$STRIP -x"
27907        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27908    fi
27909    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27910        # If it is not gcc, then assume it is the MS Visual Studio compiler
27911        COMPILER_NAME=cl
27912        PICFLAG=""
27913        LIBRARY_PREFIX=
27914        SHARED_LIBRARY='$1.dll'
27915        STATIC_LIBRARY='$1.lib'
27916        SHARED_LIBRARY_FLAGS="-LD"
27917        SHARED_LIBRARY_SUFFIX='.dll'
27918        STATIC_LIBRARY_SUFFIX='.lib'
27919        OBJ_SUFFIX='.obj'
27920        EXE_SUFFIX='.exe'
27921        SET_SHARED_LIBRARY_NAME=''
27922        SET_SHARED_LIBRARY_MAPFILE=''
27923        SET_SHARED_LIBRARY_ORIGIN=''
27924        SET_EXECUTABLE_ORIGIN=''
27925    fi
27926fi
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945# The (cross) compiler is now configured, we can now test capabilities
27946# of the target platform.
27947
27948
27949
27950###############################################################################
27951#
27952# Setup the opt flags for different compilers
27953# and different operating systems.
27954#
27955
27956#
27957# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27958#
27959if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27960    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27961    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27962    CFLAGS="$CFLAGS -mstackrealign"
27963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27964$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27965    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27966/* end confdefs.h.  */
27967int main() { return 0; }
27968_ACEOF
27969if ac_fn_cxx_try_link "$LINENO"; then :
27970
27971		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27972$as_echo "yes" >&6; }
27973
27974else
27975
27976		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27977$as_echo "no" >&6; }
27978	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27979
27980fi
27981rm -f core conftest.err conftest.$ac_objext \
27982    conftest$ac_exeext conftest.$ac_ext
27983fi
27984
27985C_FLAG_DEPS="-MMD -MF"
27986CXX_FLAG_DEPS="-MMD -MF"
27987
27988case $COMPILER_TYPE in
27989  CC )
27990    D_FLAG="-g"
27991    case $COMPILER_NAME in
27992      gcc )
27993      	case $OPENJDK_TARGET_OS in
27994	  macosx )
27995	    # On MacOSX we optimize for size, something
27996	    # we should do for all platforms?
27997	    C_O_FLAG_HI="-Os"
27998	    C_O_FLAG_NORM="-Os"
27999	    C_O_FLAG_NONE=""
28000	    ;;
28001	  *)
28002	    C_O_FLAG_HI="-O3"
28003	    C_O_FLAG_NORM="-O2"
28004	    C_O_FLAG_NONE="-O0"
28005	    CFLAGS_DEBUG_SYMBOLS="-g"
28006	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28007	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28008	       CFLAGS_DEBUG_SYMBOLS="-g1"
28009	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28010	    fi
28011	    ;;
28012	esac
28013        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28014        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28015        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28016        ;;
28017      ossc )
28018        #
28019        # Forte has different names for this with their C++ compiler...
28020        #
28021        C_FLAG_DEPS="-xMMD -xMF"
28022        CXX_FLAG_DEPS="-xMMD -xMF"
28023
28024        # Extra options used with HIGHEST
28025        #
28026        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28027        #          done with care, there are some assumptions below that need to
28028        #          be understood about the use of pointers, and IEEE behavior.
28029        #
28030        # Use non-standard floating point mode (not IEEE 754)
28031        CC_HIGHEST="$CC_HIGHEST -fns"
28032        # Do some simplification of floating point arithmetic (not IEEE 754)
28033        CC_HIGHEST="$CC_HIGHEST -fsimple"
28034        # Use single precision floating point with 'float'
28035        CC_HIGHEST="$CC_HIGHEST -fsingle"
28036        # Assume memory references via basic pointer types do not alias
28037        #   (Source with excessing pointer casting and data access with mixed
28038        #    pointer types are not recommended)
28039        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28040        # Use intrinsic or inline versions for math/std functions
28041        #   (If you expect perfect errno behavior, do not use this)
28042        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28043        # Loop data dependency optimizations (need -xO3 or higher)
28044        CC_HIGHEST="$CC_HIGHEST -xdepend"
28045        # Pointer parameters to functions do not overlap
28046        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28047        #    If you pass in multiple pointers to the same data, do not use this)
28048        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28049        # Inline some library routines
28050        #   (If you expect perfect errno behavior, do not use this)
28051        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28052        # Use optimized math routines
28053        #   (If you expect perfect errno behavior, do not use this)
28054        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28055        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28056
28057        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28058          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28059          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28060        fi
28061
28062        case $OPENJDK_TARGET_CPU_ARCH in
28063          x86)
28064            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28065            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28066            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28067            C_O_FLAG_NONE="-xregs=no%frameptr"
28068            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28069            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28070            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28071            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28072            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28073               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28074               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28075            fi
28076            ;;
28077          sparc)
28078            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28079            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28080            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28081            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28082            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28083            C_O_FLAG_NONE=""
28084            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28085            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28086            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28087            CXX_O_FLAG_NONE=""
28088            ;;
28089        esac
28090
28091    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28092    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28093    esac
28094    ;;
28095  CL )
28096    D_FLAG=
28097    C_O_FLAG_HIGHEST="-O2"
28098    C_O_FLAG_HI="-O1"
28099    C_O_FLAG_NORM="-O1"
28100    C_O_FLAG_NONE="-Od"
28101    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28102    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28103    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28104    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28105    ;;
28106esac
28107
28108if test -z "$C_O_FLAG_HIGHEST"; then
28109   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28110fi
28111
28112if test -z "$CXX_O_FLAG_HIGHEST"; then
28113   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28114fi
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28130   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28131$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28132fi
28133
28134if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28135   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28136$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28137fi
28138
28139if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28140   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28141$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28142fi
28143
28144
28145# Check whether --with-extra-cflags was given.
28146if test "${with_extra_cflags+set}" = set; then :
28147  withval=$with_extra_cflags;
28148fi
28149
28150
28151
28152# Check whether --with-extra-cxxflags was given.
28153if test "${with_extra_cxxflags+set}" = set; then :
28154  withval=$with_extra_cxxflags;
28155fi
28156
28157
28158
28159# Check whether --with-extra-ldflags was given.
28160if test "${with_extra_ldflags+set}" = set; then :
28161  withval=$with_extra_ldflags;
28162fi
28163
28164
28165CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28166CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28167LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28168
28169# Hotspot needs these set in their legacy form
28170LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28171LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28172LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28173
28174
28175
28176
28177
28178###############################################################################
28179#
28180# Now setup the CFLAGS and LDFLAGS for the JDK build.
28181# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28182#
28183case $COMPILER_NAME in
28184      gcc )
28185      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28186                          -pipe \
28187                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28188	  case $OPENJDK_TARGET_CPU_ARCH in
28189	  arm )
28190            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28191	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28192	  ;;
28193	  ppc )
28194            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28195	  ;;
28196	  * )
28197	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28198	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28199          ;;
28200	  esac
28201          ;;
28202      ossc )
28203          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28204          case $OPENJDK_TARGET_CPU_ARCH in
28205          x86 )
28206            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28207       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28208          ;;
28209          esac
28210
28211      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28212      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28213
28214          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28215          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28216          ;;
28217      cl )
28218          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28219               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28220	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28221	       -DWIN32 -DIAL"
28222          case $OPENJDK_TARGET_CPU in
28223              x86 )
28224                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28225                  ;;
28226              x86_64 )
28227                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28228                  ;;
28229          esac
28230          ;;
28231esac
28232
28233###############################################################################
28234
28235CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28236
28237# The package path is used only on macosx?
28238PACKAGE_PATH=/opt/local
28239
28240
28241if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28242    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28243    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28244    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28245    #   Note: -Dmacro         is the same as    #define macro 1
28246    #         -Dmacro=	    is the same as    #define macro
28247    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28248        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28249    else
28250        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28251    fi
28252else
28253    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28254fi
28255if test "x$OPENJDK_TARGET_OS" = xlinux; then
28256    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28257fi
28258if test "x$OPENJDK_TARGET_OS" = xwindows; then
28259    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28260fi
28261if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28262    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28263fi
28264if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28265    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28266    # Setting these parameters makes it an error to link to macosx APIs that are
28267    # newer than the given OS version and makes the linked binaries compatible even
28268    # if built on a newer version of the OS.
28269    # The expected format is X.Y.Z
28270    MACOSX_VERSION_MIN=10.7.0
28271
28272    # The macro takes the version with no dots, ex: 1070
28273    # Let the flags variables get resolved in make for easier override on make
28274    # command line.
28275    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28276    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28277fi
28278if test "x$OPENJDK_TARGET_OS" = xbsd; then
28279    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28280fi
28281if test "x$DEBUG_LEVEL" = xrelease; then
28282    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28283    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28284        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28285    fi
28286else
28287    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28288fi
28289
28290CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28291CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28292
28293CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28294        -I${JDK_OUTPUTDIR}/include \
28295        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28296        -I${JDK_TOPDIR}/src/share/javavm/export \
28297        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28298        -I${JDK_TOPDIR}/src/share/native/common \
28299        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28300
28301# The shared libraries are compiled using the picflag.
28302CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28303CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28304
28305# Executable flags
28306CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28307CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28308
28309# Now this is odd. The JDK native libraries have to link against libjvm.so
28310# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28311# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28312# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28313# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28314# libraries will link to whatever is in memory. Yuck.
28315#
28316# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28317if test "x$COMPILER_NAME" = xcl; then
28318    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28319    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28320        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28321    fi
28322    # TODO: make -debug optional "--disable-full-debug-symbols"
28323    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28324    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28325    LDFLAGS_JDKLIB_SUFFIX=""
28326    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28327        LDFLAGS_STACK_SIZE=1048576
28328    else
28329        LDFLAGS_STACK_SIZE=327680
28330    fi
28331    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28332else
28333    if test "x$COMPILER_NAME" = xgcc; then
28334        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28335        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28336        if test -n "$HAS_GNU_HASH"; then
28337            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28338        fi
28339        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28340          # And since we now know that the linker is gnu, then add -z defs, to forbid
28341          # undefined symbols in object files.
28342          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28343          if test "x$DEBUG_LEVEL" = "xrelease"; then
28344              # When building release libraries, tell the linker optimize them.
28345              # Should this be supplied to the OSS linker as well?
28346              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28347          fi
28348        fi
28349    fi
28350    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28351                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28352
28353    # On some platforms (mac) the linker warns about non existing -L dirs.
28354    # Add server first if available. Linking aginst client does not always produce the same results.
28355    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28356    # Default to server for other variants.
28357    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28358        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28359    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28360        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28361    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28362        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28363    else
28364        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28365    fi
28366
28367    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28368    if test "x$COMPILER_NAME" = xossc; then
28369        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28370    fi
28371
28372    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28373    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28374        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28375    fi
28376fi
28377
28378# Adjust flags according to debug level.
28379case $DEBUG_LEVEL in
28380      fastdebug )
28381              CFLAGS="$CFLAGS $D_FLAG"
28382              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28383              ;;
28384      slowdebug )
28385              CFLAGS="$CFLAGS $D_FLAG"
28386	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28387	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28388	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28389	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28390              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28391              ;;
28392esac
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408# Setup debug symbols (need objcopy from the toolchain for that)
28409
28410#
28411# ENABLE_DEBUG_SYMBOLS
28412# This must be done after the toolchain is setup, since we're looking at objcopy.
28413#
28414# Check whether --enable-debug-symbols was given.
28415if test "${enable_debug_symbols+set}" = set; then :
28416  enableval=$enable_debug_symbols;
28417fi
28418
28419
28420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28421$as_echo_n "checking if we should generate debug symbols... " >&6; }
28422
28423if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28424   # explicit enabling of enable-debug-symbols and can't find objcopy
28425   #   this is an error
28426   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28427fi
28428
28429if test "x$enable_debug_symbols" = "xyes"; then
28430  ENABLE_DEBUG_SYMBOLS=true
28431elif test "x$enable_debug_symbols" = "xno"; then
28432  ENABLE_DEBUG_SYMBOLS=false
28433else
28434  # default on macosx is false
28435  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28436    ENABLE_DEBUG_SYMBOLS=false
28437  # Default is on if objcopy is found, otherwise off
28438  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28439    ENABLE_DEBUG_SYMBOLS=true
28440  else
28441    ENABLE_DEBUG_SYMBOLS=false
28442  fi
28443fi
28444
28445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28446$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28447
28448#
28449# ZIP_DEBUGINFO_FILES
28450#
28451# Check whether --enable-zip-debug-info was given.
28452if test "${enable_zip_debug_info+set}" = set; then :
28453  enableval=$enable_zip_debug_info;
28454fi
28455
28456
28457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28458$as_echo_n "checking if we should zip debug-info files... " >&6; }
28459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28460$as_echo "${enable_zip_debug_info}" >&6; }
28461
28462if test "x${enable_zip_debug_info}" = "xno"; then
28463   ZIP_DEBUGINFO_FILES=false
28464else
28465   ZIP_DEBUGINFO_FILES=true
28466fi
28467
28468
28469
28470
28471
28472
28473
28474###############################################################################
28475#
28476# Check dependencies for external and internal libraries.
28477#
28478###############################################################################
28479
28480
28481
28482###############################################################################
28483#
28484# OS specific settings that we never will need to probe.
28485#
28486if test "x$OPENJDK_TARGET_OS" = xlinux; then
28487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28488$as_echo_n "checking what is not needed on Linux?... " >&6; }
28489    PULSE_NOT_NEEDED=yes
28490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28491$as_echo "pulse" >&6; }
28492fi
28493
28494if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28496$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28497    ALSA_NOT_NEEDED=yes
28498    PULSE_NOT_NEEDED=yes
28499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28500$as_echo "alsa pulse" >&6; }
28501fi
28502
28503if test "x$OPENJDK_TARGET_OS" = xwindows; then
28504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28505$as_echo_n "checking what is not needed on Windows?... " >&6; }
28506    CUPS_NOT_NEEDED=yes
28507    ALSA_NOT_NEEDED=yes
28508    PULSE_NOT_NEEDED=yes
28509    X11_NOT_NEEDED=yes
28510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28511$as_echo "alsa cups pulse x11" >&6; }
28512fi
28513
28514if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28516$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28517    ALSA_NOT_NEEDED=yes
28518    PULSE_NOT_NEEDED=yes
28519    X11_NOT_NEEDED=yes
28520    FREETYPE2_NOT_NEEDED=yes
28521    # If the java runtime framework is disabled, then we need X11.
28522    # This will be adjusted below.
28523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28524$as_echo "alsa pulse x11" >&6; }
28525fi
28526
28527if test "x$OPENJDK_TARGET_OS" = xbsd; then
28528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28529$as_echo_n "checking what is not needed on bsd?... " >&6; }
28530    ALSA_NOT_NEEDED=yes
28531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28532$as_echo "alsa" >&6; }
28533fi
28534
28535if test "x$OPENJDK" = "xfalse"; then
28536    FREETYPE2_NOT_NEEDED=yes
28537fi
28538
28539if test "x$SUPPORT_HEADFUL" = xno; then
28540    X11_NOT_NEEDED=yes
28541fi
28542
28543###############################################################################
28544#
28545# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28546# that uses this API.
28547#
28548# Check whether --enable-macosx-runtime-support was given.
28549if test "${enable_macosx_runtime_support+set}" = set; then :
28550  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28551else
28552  MACOSX_RUNTIME_SUPPORT="no"
28553fi
28554
28555
28556USE_MACOSX_RUNTIME_SUPPORT=no
28557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28558$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28559if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28560    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28561        MACOSX_RUNTIME_SUPPORT=yes
28562        USE_MACOSX_RUNTIME_SUPPORT=yes
28563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28564$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28565    else
28566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28567$as_echo "yes, but explicitly disabled." >&6; }
28568    fi
28569else
28570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28571$as_echo "no" >&6; }
28572fi
28573
28574if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28576$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28577    X11_NOT_NEEDED=
28578    FREETYPE2_NOT_NEEDED=
28579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28580$as_echo "alsa pulse" >&6; }
28581fi
28582
28583
28584
28585
28586###############################################################################
28587#
28588# Check for X Windows
28589#
28590
28591# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28592# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28593# --x-libraries for the sysroot, if that seems to be correct.
28594if test "x$SYS_ROOT" != "x/"; then
28595  if test "x$x_includes" = xNONE; then
28596    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28597      x_includes="$SYS_ROOT/usr/X11R6/include"
28598    fi
28599  fi
28600  if test "x$x_libraries" = xNONE; then
28601    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28602      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28603    fi
28604  fi
28605fi
28606
28607# Now let autoconf do it's magic
28608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28609$as_echo_n "checking for X... " >&6; }
28610
28611
28612# Check whether --with-x was given.
28613if test "${with_x+set}" = set; then :
28614  withval=$with_x;
28615fi
28616
28617# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28618if test "x$with_x" = xno; then
28619  # The user explicitly disabled X.
28620  have_x=disabled
28621else
28622  case $x_includes,$x_libraries in #(
28623    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28624    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28625  $as_echo_n "(cached) " >&6
28626else
28627  # One or both of the vars are not set, and there is no cached value.
28628ac_x_includes=no ac_x_libraries=no
28629rm -f -r conftest.dir
28630if mkdir conftest.dir; then
28631  cd conftest.dir
28632  cat >Imakefile <<'_ACEOF'
28633incroot:
28634	@echo incroot='${INCROOT}'
28635usrlibdir:
28636	@echo usrlibdir='${USRLIBDIR}'
28637libdir:
28638	@echo libdir='${LIBDIR}'
28639_ACEOF
28640  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28641    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28642    for ac_var in incroot usrlibdir libdir; do
28643      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28644    done
28645    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28646    for ac_extension in a so sl dylib la dll; do
28647      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28648	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28649	ac_im_usrlibdir=$ac_im_libdir; break
28650      fi
28651    done
28652    # Screen out bogus values from the imake configuration.  They are
28653    # bogus both because they are the default anyway, and because
28654    # using them would break gcc on systems where it needs fixed includes.
28655    case $ac_im_incroot in
28656	/usr/include) ac_x_includes= ;;
28657	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28658    esac
28659    case $ac_im_usrlibdir in
28660	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28661	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28662    esac
28663  fi
28664  cd ..
28665  rm -f -r conftest.dir
28666fi
28667
28668# Standard set of common directories for X headers.
28669# Check X11 before X11Rn because it is often a symlink to the current release.
28670ac_x_header_dirs='
28671/usr/X11/include
28672/usr/X11R7/include
28673/usr/X11R6/include
28674/usr/X11R5/include
28675/usr/X11R4/include
28676
28677/usr/include/X11
28678/usr/include/X11R7
28679/usr/include/X11R6
28680/usr/include/X11R5
28681/usr/include/X11R4
28682
28683/usr/local/X11/include
28684/usr/local/X11R7/include
28685/usr/local/X11R6/include
28686/usr/local/X11R5/include
28687/usr/local/X11R4/include
28688
28689/usr/local/include/X11
28690/usr/local/include/X11R7
28691/usr/local/include/X11R6
28692/usr/local/include/X11R5
28693/usr/local/include/X11R4
28694
28695/usr/X386/include
28696/usr/x386/include
28697/usr/XFree86/include/X11
28698
28699/usr/include
28700/usr/local/include
28701/usr/unsupported/include
28702/usr/athena/include
28703/usr/local/x11r5/include
28704/usr/lpp/Xamples/include
28705
28706/usr/openwin/include
28707/usr/openwin/share/include'
28708
28709if test "$ac_x_includes" = no; then
28710  # Guess where to find include files, by looking for Xlib.h.
28711  # First, try using that file with no special directory specified.
28712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28713/* end confdefs.h.  */
28714#include <X11/Xlib.h>
28715_ACEOF
28716if ac_fn_cxx_try_cpp "$LINENO"; then :
28717  # We can compile using X headers with no special include directory.
28718ac_x_includes=
28719else
28720  for ac_dir in $ac_x_header_dirs; do
28721  if test -r "$ac_dir/X11/Xlib.h"; then
28722    ac_x_includes=$ac_dir
28723    break
28724  fi
28725done
28726fi
28727rm -f conftest.err conftest.i conftest.$ac_ext
28728fi # $ac_x_includes = no
28729
28730if test "$ac_x_libraries" = no; then
28731  # Check for the libraries.
28732  # See if we find them without any special options.
28733  # Don't add to $LIBS permanently.
28734  ac_save_LIBS=$LIBS
28735  LIBS="-lX11 $LIBS"
28736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28737/* end confdefs.h.  */
28738#include <X11/Xlib.h>
28739int
28740main ()
28741{
28742XrmInitialize ()
28743  ;
28744  return 0;
28745}
28746_ACEOF
28747if ac_fn_cxx_try_link "$LINENO"; then :
28748  LIBS=$ac_save_LIBS
28749# We can link X programs with no special library path.
28750ac_x_libraries=
28751else
28752  LIBS=$ac_save_LIBS
28753for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28754do
28755  # Don't even attempt the hair of trying to link an X program!
28756  for ac_extension in a so sl dylib la dll; do
28757    if test -r "$ac_dir/libX11.$ac_extension"; then
28758      ac_x_libraries=$ac_dir
28759      break 2
28760    fi
28761  done
28762done
28763fi
28764rm -f core conftest.err conftest.$ac_objext \
28765    conftest$ac_exeext conftest.$ac_ext
28766fi # $ac_x_libraries = no
28767
28768case $ac_x_includes,$ac_x_libraries in #(
28769  no,* | *,no | *\'*)
28770    # Didn't find X, or a directory has "'" in its name.
28771    ac_cv_have_x="have_x=no";; #(
28772  *)
28773    # Record where we found X for the cache.
28774    ac_cv_have_x="have_x=yes\
28775	ac_x_includes='$ac_x_includes'\
28776	ac_x_libraries='$ac_x_libraries'"
28777esac
28778fi
28779;; #(
28780    *) have_x=yes;;
28781  esac
28782  eval "$ac_cv_have_x"
28783fi # $with_x != no
28784
28785if test "$have_x" != yes; then
28786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28787$as_echo "$have_x" >&6; }
28788  no_x=yes
28789else
28790  # If each of the values was on the command line, it overrides each guess.
28791  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28792  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28793  # Update the cache value to reflect the command line values.
28794  ac_cv_have_x="have_x=yes\
28795	ac_x_includes='$x_includes'\
28796	ac_x_libraries='$x_libraries'"
28797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28798$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28799fi
28800
28801if test "$no_x" = yes; then
28802  # Not all programs may use this symbol, but it does not hurt to define it.
28803
28804$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28805
28806  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28807else
28808  if test -n "$x_includes"; then
28809    X_CFLAGS="$X_CFLAGS -I$x_includes"
28810  fi
28811
28812  # It would also be nice to do this for all -L options, not just this one.
28813  if test -n "$x_libraries"; then
28814    X_LIBS="$X_LIBS -L$x_libraries"
28815    # For Solaris; some versions of Sun CC require a space after -R and
28816    # others require no space.  Words are not sufficient . . . .
28817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28818$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28819    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28820    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28821    ac_cxx_werror_flag=yes
28822    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28823/* end confdefs.h.  */
28824
28825int
28826main ()
28827{
28828
28829  ;
28830  return 0;
28831}
28832_ACEOF
28833if ac_fn_cxx_try_link "$LINENO"; then :
28834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28835$as_echo "no" >&6; }
28836       X_LIBS="$X_LIBS -R$x_libraries"
28837else
28838  LIBS="$ac_xsave_LIBS -R $x_libraries"
28839       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28840/* end confdefs.h.  */
28841
28842int
28843main ()
28844{
28845
28846  ;
28847  return 0;
28848}
28849_ACEOF
28850if ac_fn_cxx_try_link "$LINENO"; then :
28851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28852$as_echo "yes" >&6; }
28853	  X_LIBS="$X_LIBS -R $x_libraries"
28854else
28855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28856$as_echo "neither works" >&6; }
28857fi
28858rm -f core conftest.err conftest.$ac_objext \
28859    conftest$ac_exeext conftest.$ac_ext
28860fi
28861rm -f core conftest.err conftest.$ac_objext \
28862    conftest$ac_exeext conftest.$ac_ext
28863    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28864    LIBS=$ac_xsave_LIBS
28865  fi
28866
28867  # Check for system-dependent libraries X programs must link with.
28868  # Do this before checking for the system-independent R6 libraries
28869  # (-lICE), since we may need -lsocket or whatever for X linking.
28870
28871  if test "$ISC" = yes; then
28872    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28873  else
28874    # Martyn Johnson says this is needed for Ultrix, if the X
28875    # libraries were built with DECnet support.  And Karl Berry says
28876    # the Alpha needs dnet_stub (dnet does not exist).
28877    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28878    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28879/* end confdefs.h.  */
28880
28881/* Override any GCC internal prototype to avoid an error.
28882   Use char because int might match the return type of a GCC
28883   builtin and then its argument prototype would still apply.  */
28884#ifdef __cplusplus
28885extern "C"
28886#endif
28887char XOpenDisplay ();
28888int
28889main ()
28890{
28891return XOpenDisplay ();
28892  ;
28893  return 0;
28894}
28895_ACEOF
28896if ac_fn_cxx_try_link "$LINENO"; then :
28897
28898else
28899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28900$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28901if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28902  $as_echo_n "(cached) " >&6
28903else
28904  ac_check_lib_save_LIBS=$LIBS
28905LIBS="-ldnet  $LIBS"
28906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28907/* end confdefs.h.  */
28908
28909/* Override any GCC internal prototype to avoid an error.
28910   Use char because int might match the return type of a GCC
28911   builtin and then its argument prototype would still apply.  */
28912#ifdef __cplusplus
28913extern "C"
28914#endif
28915char dnet_ntoa ();
28916int
28917main ()
28918{
28919return dnet_ntoa ();
28920  ;
28921  return 0;
28922}
28923_ACEOF
28924if ac_fn_cxx_try_link "$LINENO"; then :
28925  ac_cv_lib_dnet_dnet_ntoa=yes
28926else
28927  ac_cv_lib_dnet_dnet_ntoa=no
28928fi
28929rm -f core conftest.err conftest.$ac_objext \
28930    conftest$ac_exeext conftest.$ac_ext
28931LIBS=$ac_check_lib_save_LIBS
28932fi
28933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28934$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28935if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28936  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28937fi
28938
28939    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28941$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28942if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28943  $as_echo_n "(cached) " >&6
28944else
28945  ac_check_lib_save_LIBS=$LIBS
28946LIBS="-ldnet_stub  $LIBS"
28947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28948/* end confdefs.h.  */
28949
28950/* Override any GCC internal prototype to avoid an error.
28951   Use char because int might match the return type of a GCC
28952   builtin and then its argument prototype would still apply.  */
28953#ifdef __cplusplus
28954extern "C"
28955#endif
28956char dnet_ntoa ();
28957int
28958main ()
28959{
28960return dnet_ntoa ();
28961  ;
28962  return 0;
28963}
28964_ACEOF
28965if ac_fn_cxx_try_link "$LINENO"; then :
28966  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28967else
28968  ac_cv_lib_dnet_stub_dnet_ntoa=no
28969fi
28970rm -f core conftest.err conftest.$ac_objext \
28971    conftest$ac_exeext conftest.$ac_ext
28972LIBS=$ac_check_lib_save_LIBS
28973fi
28974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28975$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28976if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28977  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28978fi
28979
28980    fi
28981fi
28982rm -f core conftest.err conftest.$ac_objext \
28983    conftest$ac_exeext conftest.$ac_ext
28984    LIBS="$ac_xsave_LIBS"
28985
28986    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28987    # to get the SysV transport functions.
28988    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28989    # needs -lnsl.
28990    # The nsl library prevents programs from opening the X display
28991    # on Irix 5.2, according to T.E. Dickey.
28992    # The functions gethostbyname, getservbyname, and inet_addr are
28993    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28994    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28995if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28996
28997fi
28998
28999    if test $ac_cv_func_gethostbyname = no; then
29000      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
29001$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29002if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
29003  $as_echo_n "(cached) " >&6
29004else
29005  ac_check_lib_save_LIBS=$LIBS
29006LIBS="-lnsl  $LIBS"
29007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29008/* end confdefs.h.  */
29009
29010/* Override any GCC internal prototype to avoid an error.
29011   Use char because int might match the return type of a GCC
29012   builtin and then its argument prototype would still apply.  */
29013#ifdef __cplusplus
29014extern "C"
29015#endif
29016char gethostbyname ();
29017int
29018main ()
29019{
29020return gethostbyname ();
29021  ;
29022  return 0;
29023}
29024_ACEOF
29025if ac_fn_cxx_try_link "$LINENO"; then :
29026  ac_cv_lib_nsl_gethostbyname=yes
29027else
29028  ac_cv_lib_nsl_gethostbyname=no
29029fi
29030rm -f core conftest.err conftest.$ac_objext \
29031    conftest$ac_exeext conftest.$ac_ext
29032LIBS=$ac_check_lib_save_LIBS
29033fi
29034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29035$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29036if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
29037  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29038fi
29039
29040      if test $ac_cv_lib_nsl_gethostbyname = no; then
29041	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29042$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29043if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29044  $as_echo_n "(cached) " >&6
29045else
29046  ac_check_lib_save_LIBS=$LIBS
29047LIBS="-lbsd  $LIBS"
29048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29049/* end confdefs.h.  */
29050
29051/* Override any GCC internal prototype to avoid an error.
29052   Use char because int might match the return type of a GCC
29053   builtin and then its argument prototype would still apply.  */
29054#ifdef __cplusplus
29055extern "C"
29056#endif
29057char gethostbyname ();
29058int
29059main ()
29060{
29061return gethostbyname ();
29062  ;
29063  return 0;
29064}
29065_ACEOF
29066if ac_fn_cxx_try_link "$LINENO"; then :
29067  ac_cv_lib_bsd_gethostbyname=yes
29068else
29069  ac_cv_lib_bsd_gethostbyname=no
29070fi
29071rm -f core conftest.err conftest.$ac_objext \
29072    conftest$ac_exeext conftest.$ac_ext
29073LIBS=$ac_check_lib_save_LIBS
29074fi
29075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29076$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29077if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29078  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29079fi
29080
29081      fi
29082    fi
29083
29084    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29085    # socket/setsockopt and other routines are undefined under SCO ODT
29086    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29087    # on later versions), says Simon Leinen: it contains gethostby*
29088    # variants that don't use the name server (or something).  -lsocket
29089    # must be given before -lnsl if both are needed.  We assume that
29090    # if connect needs -lnsl, so does gethostbyname.
29091    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29092if test "x$ac_cv_func_connect" = x""yes; then :
29093
29094fi
29095
29096    if test $ac_cv_func_connect = no; then
29097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29098$as_echo_n "checking for connect in -lsocket... " >&6; }
29099if test "${ac_cv_lib_socket_connect+set}" = set; then :
29100  $as_echo_n "(cached) " >&6
29101else
29102  ac_check_lib_save_LIBS=$LIBS
29103LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29105/* end confdefs.h.  */
29106
29107/* Override any GCC internal prototype to avoid an error.
29108   Use char because int might match the return type of a GCC
29109   builtin and then its argument prototype would still apply.  */
29110#ifdef __cplusplus
29111extern "C"
29112#endif
29113char connect ();
29114int
29115main ()
29116{
29117return connect ();
29118  ;
29119  return 0;
29120}
29121_ACEOF
29122if ac_fn_cxx_try_link "$LINENO"; then :
29123  ac_cv_lib_socket_connect=yes
29124else
29125  ac_cv_lib_socket_connect=no
29126fi
29127rm -f core conftest.err conftest.$ac_objext \
29128    conftest$ac_exeext conftest.$ac_ext
29129LIBS=$ac_check_lib_save_LIBS
29130fi
29131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29132$as_echo "$ac_cv_lib_socket_connect" >&6; }
29133if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29134  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29135fi
29136
29137    fi
29138
29139    # Guillermo Gomez says -lposix is necessary on A/UX.
29140    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29141if test "x$ac_cv_func_remove" = x""yes; then :
29142
29143fi
29144
29145    if test $ac_cv_func_remove = no; then
29146      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29147$as_echo_n "checking for remove in -lposix... " >&6; }
29148if test "${ac_cv_lib_posix_remove+set}" = set; then :
29149  $as_echo_n "(cached) " >&6
29150else
29151  ac_check_lib_save_LIBS=$LIBS
29152LIBS="-lposix  $LIBS"
29153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29154/* end confdefs.h.  */
29155
29156/* Override any GCC internal prototype to avoid an error.
29157   Use char because int might match the return type of a GCC
29158   builtin and then its argument prototype would still apply.  */
29159#ifdef __cplusplus
29160extern "C"
29161#endif
29162char remove ();
29163int
29164main ()
29165{
29166return remove ();
29167  ;
29168  return 0;
29169}
29170_ACEOF
29171if ac_fn_cxx_try_link "$LINENO"; then :
29172  ac_cv_lib_posix_remove=yes
29173else
29174  ac_cv_lib_posix_remove=no
29175fi
29176rm -f core conftest.err conftest.$ac_objext \
29177    conftest$ac_exeext conftest.$ac_ext
29178LIBS=$ac_check_lib_save_LIBS
29179fi
29180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29181$as_echo "$ac_cv_lib_posix_remove" >&6; }
29182if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29183  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29184fi
29185
29186    fi
29187
29188    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29189    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29190if test "x$ac_cv_func_shmat" = x""yes; then :
29191
29192fi
29193
29194    if test $ac_cv_func_shmat = no; then
29195      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29196$as_echo_n "checking for shmat in -lipc... " >&6; }
29197if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29198  $as_echo_n "(cached) " >&6
29199else
29200  ac_check_lib_save_LIBS=$LIBS
29201LIBS="-lipc  $LIBS"
29202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29203/* end confdefs.h.  */
29204
29205/* Override any GCC internal prototype to avoid an error.
29206   Use char because int might match the return type of a GCC
29207   builtin and then its argument prototype would still apply.  */
29208#ifdef __cplusplus
29209extern "C"
29210#endif
29211char shmat ();
29212int
29213main ()
29214{
29215return shmat ();
29216  ;
29217  return 0;
29218}
29219_ACEOF
29220if ac_fn_cxx_try_link "$LINENO"; then :
29221  ac_cv_lib_ipc_shmat=yes
29222else
29223  ac_cv_lib_ipc_shmat=no
29224fi
29225rm -f core conftest.err conftest.$ac_objext \
29226    conftest$ac_exeext conftest.$ac_ext
29227LIBS=$ac_check_lib_save_LIBS
29228fi
29229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29230$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29231if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29232  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29233fi
29234
29235    fi
29236  fi
29237
29238  # Check for libraries that X11R6 Xt/Xaw programs need.
29239  ac_save_LDFLAGS=$LDFLAGS
29240  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29241  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29242  # check for ICE first), but we must link in the order -lSM -lICE or
29243  # we get undefined symbols.  So assume we have SM if we have ICE.
29244  # These have to be linked with before -lX11, unlike the other
29245  # libraries we check for below, so use a different variable.
29246  # John Interrante, Karl Berry
29247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29248$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29249if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29250  $as_echo_n "(cached) " >&6
29251else
29252  ac_check_lib_save_LIBS=$LIBS
29253LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29255/* end confdefs.h.  */
29256
29257/* Override any GCC internal prototype to avoid an error.
29258   Use char because int might match the return type of a GCC
29259   builtin and then its argument prototype would still apply.  */
29260#ifdef __cplusplus
29261extern "C"
29262#endif
29263char IceConnectionNumber ();
29264int
29265main ()
29266{
29267return IceConnectionNumber ();
29268  ;
29269  return 0;
29270}
29271_ACEOF
29272if ac_fn_cxx_try_link "$LINENO"; then :
29273  ac_cv_lib_ICE_IceConnectionNumber=yes
29274else
29275  ac_cv_lib_ICE_IceConnectionNumber=no
29276fi
29277rm -f core conftest.err conftest.$ac_objext \
29278    conftest$ac_exeext conftest.$ac_ext
29279LIBS=$ac_check_lib_save_LIBS
29280fi
29281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29282$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29283if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29284  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29285fi
29286
29287  LDFLAGS=$ac_save_LDFLAGS
29288
29289fi
29290
29291
29292# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29293# this doesn't make sense so we remove it.
29294if test "x$COMPILE_TYPE" = xcross; then
29295  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29296fi
29297
29298if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29299
29300    # Print a helpful message on how to acquire the necessary build dependency.
29301    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29302    MISSING_DEPENDENCY=x11
29303    PKGHANDLER_COMMAND=
29304
29305    case $PKGHANDLER in
29306	apt-get)
29307                apt_help     $MISSING_DEPENDENCY ;;
29308    yum)
29309                yum_help     $MISSING_DEPENDENCY ;;
29310	port)
29311                port_help    $MISSING_DEPENDENCY ;;
29312	pkgutil)
29313                pkgutil_help $MISSING_DEPENDENCY ;;
29314	pkgadd)
29315                pkgadd_help  $MISSING_DEPENDENCY ;;
29316    * )
29317      break ;;
29318    esac
29319
29320    if test "x$PKGHANDLER_COMMAND" != x; then
29321        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29322    fi
29323
29324    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29325fi
29326
29327# Some of the old makefiles require a setting of OPENWIN_HOME
29328# Since the X11R6 directory has disappeared on later Linuxes,
29329# we need to probe for it.
29330if test "x$OPENJDK_TARGET_OS" = xlinux; then
29331    if test -d "$SYS_ROOT/usr/X11R6"; then
29332        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29333    fi
29334    if test -d "$SYS_ROOT/usr/include/X11"; then
29335        OPENWIN_HOME="$SYS_ROOT/usr"
29336    fi
29337fi
29338if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29339    OPENWIN_HOME="/usr/openwin"
29340fi
29341
29342
29343
29344#
29345# Weird Sol10 something check...TODO change to try compile
29346#
29347if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29348  if test "`uname -r`" = "5.10"; then
29349     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29350     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29351     fi
29352  fi
29353fi
29354
29355ac_ext=c
29356ac_cpp='$CPP $CPPFLAGS'
29357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29359ac_compiler_gnu=$ac_cv_c_compiler_gnu
29360
29361OLD_CFLAGS="$CFLAGS"
29362CFLAGS="$CFLAGS $X_CFLAGS"
29363
29364# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29365for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29366do :
29367  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29368ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29369                   # include <X11/Xutil.h>
29370
29371"
29372if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29373  cat >>confdefs.h <<_ACEOF
29374#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29375_ACEOF
29376 X11_A_OK=yes
29377else
29378  X11_A_OK=no
29379fi
29380
29381done
29382
29383
29384CFLAGS="$OLD_CFLAGS"
29385ac_ext=cpp
29386ac_cpp='$CXXCPP $CPPFLAGS'
29387ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29388ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29389ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29390
29391
29392if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29393
29394    # Print a helpful message on how to acquire the necessary build dependency.
29395    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29396    MISSING_DEPENDENCY=x11
29397    PKGHANDLER_COMMAND=
29398
29399    case $PKGHANDLER in
29400	apt-get)
29401                apt_help     $MISSING_DEPENDENCY ;;
29402    yum)
29403                yum_help     $MISSING_DEPENDENCY ;;
29404	port)
29405                port_help    $MISSING_DEPENDENCY ;;
29406	pkgutil)
29407                pkgutil_help $MISSING_DEPENDENCY ;;
29408	pkgadd)
29409                pkgadd_help  $MISSING_DEPENDENCY ;;
29410    * )
29411      break ;;
29412    esac
29413
29414    if test "x$PKGHANDLER_COMMAND" != x; then
29415        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29416    fi
29417
29418    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29419fi
29420
29421
29422
29423
29424
29425
29426###############################################################################
29427#
29428# The common unix printing system cups is used to print from java.
29429#
29430
29431# Check whether --with-cups was given.
29432if test "${with_cups+set}" = set; then :
29433  withval=$with_cups;
29434fi
29435
29436
29437# Check whether --with-cups-include was given.
29438if test "${with_cups_include+set}" = set; then :
29439  withval=$with_cups_include;
29440fi
29441
29442
29443if test "x$CUPS_NOT_NEEDED" = xyes; then
29444	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29445		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29446$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29447	fi
29448	CUPS_CFLAGS=
29449else
29450	CUPS_FOUND=no
29451
29452	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29453	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29454	fi
29455
29456	if test "x${with_cups}" != x; then
29457	    CUPS_CFLAGS="-I${with_cups}/include"
29458	    CUPS_FOUND=yes
29459	fi
29460	if test "x${with_cups_include}" != x; then
29461	    CUPS_CFLAGS="-I${with_cups_include}"
29462	    CUPS_FOUND=yes
29463	fi
29464	if test "x$CUPS_FOUND" = xno; then
29465
29466
29467    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29468        # Source the builddeps file again, to make sure it uses the latest variables!
29469        . $builddepsfile
29470        # Look for a target and build machine specific resource!
29471        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29472        if test "x$resource" = x; then
29473            # Ok, lets instead look for a target specific resource
29474            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29475        fi
29476        if test "x$resource" = x; then
29477            # Ok, lets instead look for a build specific resource
29478            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29479        fi
29480        if test "x$resource" = x; then
29481            # Ok, lets instead look for a generic resource
29482            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29483            resource=${builddep_cups}
29484        fi
29485        if test "x$resource" != x; then
29486            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29487$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29488	    # If the resource in the builddeps.conf file is an existing directory,
29489	    # for example /java/linux/cups
29490	    if test -d ${resource}; then
29491	       depdir=${resource}
29492	    else
29493
29494# cups is for example mymodule
29495# $resource is for example libs/general/libmymod_1_2_3.zip
29496# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29497# $with_builddeps_dir is for example /localhome/builddeps
29498# depdir is the name of the variable into which we store the depdir, eg MYMOD
29499# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29500# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29501    filename=`basename $resource`
29502    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29503    filebase=${filename%%.*}
29504    extension=${filename#*.}
29505    installdir=$with_builddeps_dir/$filebase
29506    if test ! -f $installdir/$filename.unpacked; then
29507        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29508$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29509        if test ! -d $installdir; then
29510            mkdir -p $installdir
29511        fi
29512        if test ! -d $installdir; then
29513            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29514        fi
29515        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29516        touch $tmpfile
29517        if test ! -f $tmpfile; then
29518            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29519        fi
29520
29521    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29522    # $tmpfile is the local file name for the downloaded file.
29523    VALID_TOOL=no
29524    if test "x$BDEPS_FTP" = xwget; then
29525       VALID_TOOL=yes
29526       wget -O $tmpfile $with_builddeps_server/$resource
29527    fi
29528    if test "x$BDEPS_FTP" = xlftp; then
29529       VALID_TOOL=yes
29530       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29531    fi
29532    if test "x$BDEPS_FTP" = xftp; then
29533        VALID_TOOL=yes
29534        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29535        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29536        FTPUSERPWD=${FTPSERVER%%@*}
29537        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29538            FTPUSER=${userpwd%%:*}
29539            FTPPWD=${userpwd#*@}
29540            FTPSERVER=${FTPSERVER#*@}
29541        else
29542            FTPUSER=ftp
29543            FTPPWD=ftp
29544        fi
29545        # the "pass" command does not work on some
29546        # ftp clients (read ftp.exe) but if it works,
29547        # passive mode is better!
29548        (\
29549            echo "user $FTPUSER $FTPPWD"        ;\
29550            echo "pass"                         ;\
29551            echo "bin"                          ;\
29552            echo "get $FTPPATH $tmpfile"              ;\
29553        ) | ftp -in $FTPSERVER
29554    fi
29555    if test "x$VALID_TOOL" != xyes; then
29556       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29557    fi
29558
29559        mv $tmpfile $installdir/$filename
29560        if test ! -s $installdir/$filename; then
29561            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29562        fi
29563        case "$extension" in
29564            zip)  echo "Unzipping $installdir/$filename..."
29565               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29566            ;;
29567            tar.gz) echo "Untaring $installdir/$filename..."
29568               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29569            ;;
29570            tgz) echo "Untaring $installdir/$filename..."
29571               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29572            ;;
29573            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29574            ;;
29575        esac
29576    fi
29577    if test -f $installdir/$filename.unpacked; then
29578        depdir=$installdir
29579    fi
29580
29581	    fi
29582            # Source the builddeps file again, because in the previous command, the depdir
29583            # was updated to point at the current build dependency install directory.
29584            . $builddepsfile
29585            # Now extract variables from the builddeps.conf files.
29586            theroot=${builddep_cups_ROOT}
29587            thecflags=${builddep_cups_CFLAGS}
29588            thelibs=${builddep_cups_LIBS}
29589            if test "x$depdir" = x; then
29590                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29591            fi
29592            CUPS=$depdir
29593            if test "x$theroot" != x; then
29594               CUPS="$theroot"
29595            fi
29596            if test "x$thecflags" != x; then
29597               CUPS_CFLAGS="$thecflags"
29598            fi
29599            if test "x$thelibs" != x; then
29600               CUPS_LIBS="$thelibs"
29601            fi
29602            CUPS_FOUND=yes
29603
29604        fi
29605
29606    fi
29607
29608	fi
29609	if test "x$CUPS_FOUND" = xno; then
29610	    # Are the cups headers installed in the default /usr/include location?
29611	    for ac_header in cups/cups.h cups/ppd.h
29612do :
29613  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29614ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29615if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29616  cat >>confdefs.h <<_ACEOF
29617#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29618_ACEOF
29619 CUPS_FOUND=yes
29620	                      CUPS_CFLAGS=
29621	                      DEFAULT_CUPS=yes
29622fi
29623
29624done
29625
29626	fi
29627	if test "x$CUPS_FOUND" = xno; then
29628	    # Getting nervous now? Lets poke around for standard Solaris third-party
29629	    # package installation locations.
29630	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29631$as_echo_n "checking for cups headers... " >&6; }
29632	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29633	       # An SFW package seems to be installed!
29634	       CUPS_FOUND=yes
29635	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29636	    elif test -s /opt/csw/include/cups/cups.h; then
29637	       # A CSW package seems to be installed!
29638	       CUPS_FOUND=yes
29639	       CUPS_CFLAGS="-I/opt/csw/include"
29640	    fi
29641	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29642$as_echo "$CUPS_FOUND" >&6; }
29643	fi
29644	if test "x$CUPS_FOUND" = xno; then
29645
29646    # Print a helpful message on how to acquire the necessary build dependency.
29647    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29648    MISSING_DEPENDENCY=cups
29649    PKGHANDLER_COMMAND=
29650
29651    case $PKGHANDLER in
29652	apt-get)
29653                apt_help     $MISSING_DEPENDENCY ;;
29654    yum)
29655                yum_help     $MISSING_DEPENDENCY ;;
29656	port)
29657                port_help    $MISSING_DEPENDENCY ;;
29658	pkgutil)
29659                pkgutil_help $MISSING_DEPENDENCY ;;
29660	pkgadd)
29661                pkgadd_help  $MISSING_DEPENDENCY ;;
29662    * )
29663      break ;;
29664    esac
29665
29666    if test "x$PKGHANDLER_COMMAND" != x; then
29667        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29668    fi
29669
29670	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29671	fi
29672fi
29673
29674
29675
29676
29677
29678
29679###############################################################################
29680#
29681# The ubiquitous freetype2 library is used to render fonts.
29682#
29683
29684# Check whether --with-freetype was given.
29685if test "${with_freetype+set}" = set; then :
29686  withval=$with_freetype;
29687fi
29688
29689
29690# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29691USING_SYSTEM_FT_LIB=false
29692
29693if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29694	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29695		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29696$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29697	fi
29698	FREETYPE2_CFLAGS=
29699	FREETYPE2_LIBS=
29700        FREETYPE2_LIB_PATH=
29701else
29702	FREETYPE2_FOUND=no
29703
29704	if test "x$with_freetype" != x; then
29705
29706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29707
29708  # Input might be given as Windows format, start by converting to
29709  # unix format.
29710  path="$with_freetype"
29711  new_path=`$CYGPATH -u "$path"`
29712
29713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29716  # "foo.exe" is OK but "foo" is an error.
29717  #
29718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29719  # It is also a way to make sure we got the proper file name for the real test later on.
29720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29721  if test "x$test_shortpath" = x; then
29722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29723$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29724    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29725  fi
29726
29727  # Call helper function which possibly converts this using DOS-style short mode.
29728  # If so, the updated path is stored in $new_path.
29729
29730  input_path="$new_path"
29731  # Check if we need to convert this using DOS-style short mode. If the path
29732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29733  # take no chances and rewrite it.
29734  # Note: m4 eats our [], so we need to use [ and ] instead.
29735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29736  if test "x$has_forbidden_chars" != x; then
29737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29741      # Going to short mode and back again did indeed matter. Since short mode is
29742      # case insensitive, let's make it lowercase to improve readability.
29743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29744      # Now convert it back to Unix-stile (cygpath)
29745      input_path=`$CYGPATH -u "$shortmode_path"`
29746      new_path="$input_path"
29747    fi
29748  fi
29749
29750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29751  if test "x$test_cygdrive_prefix" = x; then
29752    # As a simple fix, exclude /usr/bin since it's not a real path.
29753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29755      # a path prefixed by /cygdrive for fixpath to work.
29756      new_path="$CYGWIN_ROOT_PATH$input_path"
29757    fi
29758  fi
29759
29760
29761  if test "x$path" != "x$new_path"; then
29762    with_freetype="$new_path"
29763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29764$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29765  fi
29766
29767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29768
29769  path="$with_freetype"
29770  has_colon=`$ECHO $path | $GREP ^.:`
29771  new_path="$path"
29772  if test "x$has_colon" = x; then
29773    # Not in mixed or Windows style, start by that.
29774    new_path=`cmd //c echo $path`
29775  fi
29776
29777
29778  input_path="$new_path"
29779  # Check if we need to convert this using DOS-style short mode. If the path
29780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29781  # take no chances and rewrite it.
29782  # Note: m4 eats our [], so we need to use [ and ] instead.
29783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29784  if test "x$has_forbidden_chars" != x; then
29785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29787  fi
29788
29789
29790  windows_path="$new_path"
29791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29792    unix_path=`$CYGPATH -u "$windows_path"`
29793    new_path="$unix_path"
29794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29796    new_path="$unix_path"
29797  fi
29798
29799  if test "x$path" != "x$new_path"; then
29800    with_freetype="$new_path"
29801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29802$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29803  fi
29804
29805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29807
29808  else
29809    # We're on a posix platform. Hooray! :)
29810    path="$with_freetype"
29811
29812    if test ! -f "$path" && test ! -d "$path"; then
29813      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29814    fi
29815
29816    has_space=`$ECHO "$path" | $GREP " "`
29817    if test "x$has_space" != x; then
29818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29819$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29820      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29821    fi
29822  fi
29823
29824	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29825            FREETYPE2_LIB_PATH="$with_freetype/lib"
29826            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29827                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29828                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29829            fi
29830            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29831                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29832            fi
29833	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29834            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29835                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29836            fi
29837 	    FREETYPE2_FOUND=yes
29838   	    if test "x$FREETYPE2_FOUND" = xyes; then
29839	        # Verify that the directories exist
29840                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29841		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29842		fi
29843	        # List the contents of the lib.
29844		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29845                if test "x$FREETYPELIB" = x; then
29846		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29847		fi
29848	        # Check one h-file
29849                if ! test -s "$with_freetype/include/ft2build.h"; then
29850		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29851		fi
29852            fi
29853        fi
29854	if test "x$FREETYPE2_FOUND" = xno; then
29855
29856
29857    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29858        # Source the builddeps file again, to make sure it uses the latest variables!
29859        . $builddepsfile
29860        # Look for a target and build machine specific resource!
29861        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29862        if test "x$resource" = x; then
29863            # Ok, lets instead look for a target specific resource
29864            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29865        fi
29866        if test "x$resource" = x; then
29867            # Ok, lets instead look for a build specific resource
29868            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29869        fi
29870        if test "x$resource" = x; then
29871            # Ok, lets instead look for a generic resource
29872            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29873            resource=${builddep_freetype2}
29874        fi
29875        if test "x$resource" != x; then
29876            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29877$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29878	    # If the resource in the builddeps.conf file is an existing directory,
29879	    # for example /java/linux/cups
29880	    if test -d ${resource}; then
29881	       depdir=${resource}
29882	    else
29883
29884# freetype2 is for example mymodule
29885# $resource is for example libs/general/libmymod_1_2_3.zip
29886# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29887# $with_builddeps_dir is for example /localhome/builddeps
29888# depdir is the name of the variable into which we store the depdir, eg MYMOD
29889# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29890# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29891    filename=`basename $resource`
29892    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29893    filebase=${filename%%.*}
29894    extension=${filename#*.}
29895    installdir=$with_builddeps_dir/$filebase
29896    if test ! -f $installdir/$filename.unpacked; then
29897        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29898$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29899        if test ! -d $installdir; then
29900            mkdir -p $installdir
29901        fi
29902        if test ! -d $installdir; then
29903            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29904        fi
29905        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29906        touch $tmpfile
29907        if test ! -f $tmpfile; then
29908            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29909        fi
29910
29911    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29912    # $tmpfile is the local file name for the downloaded file.
29913    VALID_TOOL=no
29914    if test "x$BDEPS_FTP" = xwget; then
29915       VALID_TOOL=yes
29916       wget -O $tmpfile $with_builddeps_server/$resource
29917    fi
29918    if test "x$BDEPS_FTP" = xlftp; then
29919       VALID_TOOL=yes
29920       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29921    fi
29922    if test "x$BDEPS_FTP" = xftp; then
29923        VALID_TOOL=yes
29924        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29925        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29926        FTPUSERPWD=${FTPSERVER%%@*}
29927        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29928            FTPUSER=${userpwd%%:*}
29929            FTPPWD=${userpwd#*@}
29930            FTPSERVER=${FTPSERVER#*@}
29931        else
29932            FTPUSER=ftp
29933            FTPPWD=ftp
29934        fi
29935        # the "pass" command does not work on some
29936        # ftp clients (read ftp.exe) but if it works,
29937        # passive mode is better!
29938        (\
29939            echo "user $FTPUSER $FTPPWD"        ;\
29940            echo "pass"                         ;\
29941            echo "bin"                          ;\
29942            echo "get $FTPPATH $tmpfile"              ;\
29943        ) | ftp -in $FTPSERVER
29944    fi
29945    if test "x$VALID_TOOL" != xyes; then
29946       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29947    fi
29948
29949        mv $tmpfile $installdir/$filename
29950        if test ! -s $installdir/$filename; then
29951            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29952        fi
29953        case "$extension" in
29954            zip)  echo "Unzipping $installdir/$filename..."
29955               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29956            ;;
29957            tar.gz) echo "Untaring $installdir/$filename..."
29958               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29959            ;;
29960            tgz) echo "Untaring $installdir/$filename..."
29961               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29962            ;;
29963            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29964            ;;
29965        esac
29966    fi
29967    if test -f $installdir/$filename.unpacked; then
29968        depdir=$installdir
29969    fi
29970
29971	    fi
29972            # Source the builddeps file again, because in the previous command, the depdir
29973            # was updated to point at the current build dependency install directory.
29974            . $builddepsfile
29975            # Now extract variables from the builddeps.conf files.
29976            theroot=${builddep_freetype2_ROOT}
29977            thecflags=${builddep_freetype2_CFLAGS}
29978            thelibs=${builddep_freetype2_LIBS}
29979            if test "x$depdir" = x; then
29980                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29981            fi
29982            FREETYPE2=$depdir
29983            if test "x$theroot" != x; then
29984               FREETYPE2="$theroot"
29985            fi
29986            if test "x$thecflags" != x; then
29987               FREETYPE2_CFLAGS="$thecflags"
29988            fi
29989            if test "x$thelibs" != x; then
29990               FREETYPE2_LIBS="$thelibs"
29991            fi
29992            FREETYPE2_FOUND=yes
29993            else FREETYPE2_FOUND=no
29994
29995        fi
29996        else FREETYPE2_FOUND=no
29997
29998    fi
29999
30000            USING_SYSTEM_FT_LIB=true
30001	fi
30002	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
30003            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30004
30005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30006
30007  # Input might be given as Windows format, start by converting to
30008  # unix format.
30009  path="$FREETYPELOCATION"
30010  new_path=`$CYGPATH -u "$path"`
30011
30012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30015  # "foo.exe" is OK but "foo" is an error.
30016  #
30017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30018  # It is also a way to make sure we got the proper file name for the real test later on.
30019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30020  if test "x$test_shortpath" = x; then
30021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30022$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30023    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30024  fi
30025
30026  # Call helper function which possibly converts this using DOS-style short mode.
30027  # If so, the updated path is stored in $new_path.
30028
30029  input_path="$new_path"
30030  # Check if we need to convert this using DOS-style short mode. If the path
30031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30032  # take no chances and rewrite it.
30033  # Note: m4 eats our [], so we need to use [ and ] instead.
30034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30035  if test "x$has_forbidden_chars" != x; then
30036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30040      # Going to short mode and back again did indeed matter. Since short mode is
30041      # case insensitive, let's make it lowercase to improve readability.
30042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30043      # Now convert it back to Unix-stile (cygpath)
30044      input_path=`$CYGPATH -u "$shortmode_path"`
30045      new_path="$input_path"
30046    fi
30047  fi
30048
30049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30050  if test "x$test_cygdrive_prefix" = x; then
30051    # As a simple fix, exclude /usr/bin since it's not a real path.
30052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30054      # a path prefixed by /cygdrive for fixpath to work.
30055      new_path="$CYGWIN_ROOT_PATH$input_path"
30056    fi
30057  fi
30058
30059
30060  if test "x$path" != "x$new_path"; then
30061    FREETYPELOCATION="$new_path"
30062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30063$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30064  fi
30065
30066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30067
30068  path="$FREETYPELOCATION"
30069  has_colon=`$ECHO $path | $GREP ^.:`
30070  new_path="$path"
30071  if test "x$has_colon" = x; then
30072    # Not in mixed or Windows style, start by that.
30073    new_path=`cmd //c echo $path`
30074  fi
30075
30076
30077  input_path="$new_path"
30078  # Check if we need to convert this using DOS-style short mode. If the path
30079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30080  # take no chances and rewrite it.
30081  # Note: m4 eats our [], so we need to use [ and ] instead.
30082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30083  if test "x$has_forbidden_chars" != x; then
30084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30086  fi
30087
30088
30089  windows_path="$new_path"
30090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30091    unix_path=`$CYGPATH -u "$windows_path"`
30092    new_path="$unix_path"
30093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30095    new_path="$unix_path"
30096  fi
30097
30098  if test "x$path" != "x$new_path"; then
30099    FREETYPELOCATION="$new_path"
30100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30101$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30102  fi
30103
30104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30106
30107  else
30108    # We're on a posix platform. Hooray! :)
30109    path="$FREETYPELOCATION"
30110
30111    if test ! -f "$path" && test ! -d "$path"; then
30112      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30113    fi
30114
30115    has_space=`$ECHO "$path" | $GREP " "`
30116    if test "x$has_space" != x; then
30117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30118$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30119      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30120    fi
30121  fi
30122
30123	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30124$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30125	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30126	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30127	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30128 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30129                if ! test -s "$FREETYPE2_LIBS"; then
30130		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30131		fi
30132                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30133		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30134		fi
30135                USING_SYSTEM_FT_LIB=true
30136                FREETYPE2_FOUND=yes
30137	    fi
30138	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30139$as_echo "$FREETYPE2_FOUND" >&6; }
30140        fi
30141	if test "x$FREETYPE2_FOUND" = xno; then
30142
30143pkg_failed=no
30144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30145$as_echo_n "checking for FREETYPE2... " >&6; }
30146
30147if test -n "$FREETYPE2_CFLAGS"; then
30148    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30149 elif test -n "$PKG_CONFIG"; then
30150    if test -n "$PKG_CONFIG" && \
30151    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30152  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30153  ac_status=$?
30154  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30155  test $ac_status = 0; }; then
30156  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30157else
30158  pkg_failed=yes
30159fi
30160 else
30161    pkg_failed=untried
30162fi
30163if test -n "$FREETYPE2_LIBS"; then
30164    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30165 elif test -n "$PKG_CONFIG"; then
30166    if test -n "$PKG_CONFIG" && \
30167    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30168  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30169  ac_status=$?
30170  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30171  test $ac_status = 0; }; then
30172  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30173else
30174  pkg_failed=yes
30175fi
30176 else
30177    pkg_failed=untried
30178fi
30179
30180
30181
30182if test $pkg_failed = yes; then
30183
30184if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30185        _pkg_short_errors_supported=yes
30186else
30187        _pkg_short_errors_supported=no
30188fi
30189        if test $_pkg_short_errors_supported = yes; then
30190	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30191        else
30192	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30193        fi
30194	# Put the nasty error message in config.log where it belongs
30195	echo "$FREETYPE2_PKG_ERRORS" >&5
30196
30197	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30198$as_echo "no" >&6; }
30199                FREETYPE2_FOUND=no
30200elif test $pkg_failed = untried; then
30201	FREETYPE2_FOUND=no
30202else
30203	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30204	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30206$as_echo "yes" >&6; }
30207	FREETYPE2_FOUND=yes
30208fi
30209            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30210            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30211            USING_SYSTEM_FT_LIB=true
30212            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30213            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30214              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30215            fi
30216	fi
30217	if test "x$FREETYPE2_FOUND" = xno; then
30218	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30219$as_echo_n "checking for freetype in some standard locations... " >&6; }
30220
30221	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30222	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30223	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30224	    fi
30225	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30226	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30227	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30228	    fi
30229
30230	    PREV_CXXCFLAGS="$CXXFLAGS"
30231	    PREV_LDFLAGS="$LDFLAGS"
30232	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30233	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30234	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30235/* end confdefs.h.  */
30236#include<ft2build.h>
30237	                    #include FT_FREETYPE_H
30238	                   int main() { return 0; }
30239
30240_ACEOF
30241if ac_fn_cxx_try_link "$LINENO"; then :
30242
30243	                      # Yes, the default cflags and libs did the trick.
30244	                      FREETYPE2_FOUND=yes
30245	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30246	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30247
30248else
30249
30250	                      FREETYPE2_FOUND=no
30251
30252fi
30253rm -f core conftest.err conftest.$ac_objext \
30254    conftest$ac_exeext conftest.$ac_ext
30255            CXXCFLAGS="$PREV_CXXFLAGS"
30256	    LDFLAGS="$PREV_LDFLAGS"
30257	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30258$as_echo "$FREETYPE2_FOUND" >&6; }
30259            USING_SYSTEM_FT_LIB=true
30260	fi
30261	if test "x$FREETYPE2_FOUND" = xno; then
30262
30263    # Print a helpful message on how to acquire the necessary build dependency.
30264    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30265    MISSING_DEPENDENCY=freetype2
30266    PKGHANDLER_COMMAND=
30267
30268    case $PKGHANDLER in
30269	apt-get)
30270                apt_help     $MISSING_DEPENDENCY ;;
30271    yum)
30272                yum_help     $MISSING_DEPENDENCY ;;
30273	port)
30274                port_help    $MISSING_DEPENDENCY ;;
30275	pkgutil)
30276                pkgutil_help $MISSING_DEPENDENCY ;;
30277	pkgadd)
30278                pkgadd_help  $MISSING_DEPENDENCY ;;
30279    * )
30280      break ;;
30281    esac
30282
30283    if test "x$PKGHANDLER_COMMAND" != x; then
30284        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30285    fi
30286
30287		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30288	fi
30289
30290        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30291            # AC_CHECK_LIB does not support use of cl.exe
30292            PREV_LDFLAGS="$LDFLAGS"
30293            LDFLAGS="$FREETYPE2_LIBS"
30294            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30295$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30296if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30297  $as_echo_n "(cached) " >&6
30298else
30299  ac_check_lib_save_LIBS=$LIBS
30300LIBS="-lfreetype  $LIBS"
30301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30302/* end confdefs.h.  */
30303
30304/* Override any GCC internal prototype to avoid an error.
30305   Use char because int might match the return type of a GCC
30306   builtin and then its argument prototype would still apply.  */
30307#ifdef __cplusplus
30308extern "C"
30309#endif
30310char FT_Init_FreeType ();
30311int
30312main ()
30313{
30314return FT_Init_FreeType ();
30315  ;
30316  return 0;
30317}
30318_ACEOF
30319if ac_fn_cxx_try_link "$LINENO"; then :
30320  ac_cv_lib_freetype_FT_Init_FreeType=yes
30321else
30322  ac_cv_lib_freetype_FT_Init_FreeType=no
30323fi
30324rm -f core conftest.err conftest.$ac_objext \
30325    conftest$ac_exeext conftest.$ac_ext
30326LIBS=$ac_check_lib_save_LIBS
30327fi
30328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30329$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30330if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30331  FREETYPE2_FOUND=true
30332else
30333  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30334fi
30335
30336            LDFLAGS="$PREV_LDFLAGS"
30337        fi
30338fi
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348###############################################################################
30349#
30350# Check for alsa headers and libraries. Used on Linux/GNU systems.
30351#
30352
30353# Check whether --with-alsa was given.
30354if test "${with_alsa+set}" = set; then :
30355  withval=$with_alsa;
30356fi
30357
30358
30359# Check whether --with-alsa-include was given.
30360if test "${with_alsa_include+set}" = set; then :
30361  withval=$with_alsa_include;
30362fi
30363
30364
30365# Check whether --with-alsa-lib was given.
30366if test "${with_alsa_lib+set}" = set; then :
30367  withval=$with_alsa_lib;
30368fi
30369
30370
30371if test "x$ALSA_NOT_NEEDED" = xyes; then
30372	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30373		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30374$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30375	fi
30376	ALSA_CFLAGS=
30377	ALSA_LIBS=
30378else
30379	ALSA_FOUND=no
30380
30381	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30382	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30383	fi
30384
30385	if test "x${with_alsa}" != x; then
30386	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30387	    ALSA_CFLAGS="-I${with_alsa}/include"
30388	    ALSA_FOUND=yes
30389	fi
30390	if test "x${with_alsa_include}" != x; then
30391	    ALSA_CFLAGS="-I${with_alsa_include}"
30392	    ALSA_FOUND=yes
30393	fi
30394	if test "x${with_alsa_lib}" != x; then
30395	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30396	    ALSA_FOUND=yes
30397	fi
30398	if test "x$ALSA_FOUND" = xno; then
30399
30400
30401    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30402        # Source the builddeps file again, to make sure it uses the latest variables!
30403        . $builddepsfile
30404        # Look for a target and build machine specific resource!
30405        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30406        if test "x$resource" = x; then
30407            # Ok, lets instead look for a target specific resource
30408            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30409        fi
30410        if test "x$resource" = x; then
30411            # Ok, lets instead look for a build specific resource
30412            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30413        fi
30414        if test "x$resource" = x; then
30415            # Ok, lets instead look for a generic resource
30416            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30417            resource=${builddep_alsa}
30418        fi
30419        if test "x$resource" != x; then
30420            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30421$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30422	    # If the resource in the builddeps.conf file is an existing directory,
30423	    # for example /java/linux/cups
30424	    if test -d ${resource}; then
30425	       depdir=${resource}
30426	    else
30427
30428# alsa is for example mymodule
30429# $resource is for example libs/general/libmymod_1_2_3.zip
30430# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30431# $with_builddeps_dir is for example /localhome/builddeps
30432# depdir is the name of the variable into which we store the depdir, eg MYMOD
30433# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30434# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30435    filename=`basename $resource`
30436    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30437    filebase=${filename%%.*}
30438    extension=${filename#*.}
30439    installdir=$with_builddeps_dir/$filebase
30440    if test ! -f $installdir/$filename.unpacked; then
30441        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30442$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30443        if test ! -d $installdir; then
30444            mkdir -p $installdir
30445        fi
30446        if test ! -d $installdir; then
30447            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30448        fi
30449        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30450        touch $tmpfile
30451        if test ! -f $tmpfile; then
30452            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30453        fi
30454
30455    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30456    # $tmpfile is the local file name for the downloaded file.
30457    VALID_TOOL=no
30458    if test "x$BDEPS_FTP" = xwget; then
30459       VALID_TOOL=yes
30460       wget -O $tmpfile $with_builddeps_server/$resource
30461    fi
30462    if test "x$BDEPS_FTP" = xlftp; then
30463       VALID_TOOL=yes
30464       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30465    fi
30466    if test "x$BDEPS_FTP" = xftp; then
30467        VALID_TOOL=yes
30468        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30469        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30470        FTPUSERPWD=${FTPSERVER%%@*}
30471        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30472            FTPUSER=${userpwd%%:*}
30473            FTPPWD=${userpwd#*@}
30474            FTPSERVER=${FTPSERVER#*@}
30475        else
30476            FTPUSER=ftp
30477            FTPPWD=ftp
30478        fi
30479        # the "pass" command does not work on some
30480        # ftp clients (read ftp.exe) but if it works,
30481        # passive mode is better!
30482        (\
30483            echo "user $FTPUSER $FTPPWD"        ;\
30484            echo "pass"                         ;\
30485            echo "bin"                          ;\
30486            echo "get $FTPPATH $tmpfile"              ;\
30487        ) | ftp -in $FTPSERVER
30488    fi
30489    if test "x$VALID_TOOL" != xyes; then
30490       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30491    fi
30492
30493        mv $tmpfile $installdir/$filename
30494        if test ! -s $installdir/$filename; then
30495            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30496        fi
30497        case "$extension" in
30498            zip)  echo "Unzipping $installdir/$filename..."
30499               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30500            ;;
30501            tar.gz) echo "Untaring $installdir/$filename..."
30502               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30503            ;;
30504            tgz) echo "Untaring $installdir/$filename..."
30505               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30506            ;;
30507            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30508            ;;
30509        esac
30510    fi
30511    if test -f $installdir/$filename.unpacked; then
30512        depdir=$installdir
30513    fi
30514
30515	    fi
30516            # Source the builddeps file again, because in the previous command, the depdir
30517            # was updated to point at the current build dependency install directory.
30518            . $builddepsfile
30519            # Now extract variables from the builddeps.conf files.
30520            theroot=${builddep_alsa_ROOT}
30521            thecflags=${builddep_alsa_CFLAGS}
30522            thelibs=${builddep_alsa_LIBS}
30523            if test "x$depdir" = x; then
30524                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30525            fi
30526            ALSA=$depdir
30527            if test "x$theroot" != x; then
30528               ALSA="$theroot"
30529            fi
30530            if test "x$thecflags" != x; then
30531               ALSA_CFLAGS="$thecflags"
30532            fi
30533            if test "x$thelibs" != x; then
30534               ALSA_LIBS="$thelibs"
30535            fi
30536            ALSA_FOUND=yes
30537            else ALSA_FOUND=no
30538
30539        fi
30540        else ALSA_FOUND=no
30541
30542    fi
30543
30544	fi
30545	if test "x$ALSA_FOUND" = xno; then
30546
30547pkg_failed=no
30548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30549$as_echo_n "checking for ALSA... " >&6; }
30550
30551if test -n "$ALSA_CFLAGS"; then
30552    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30553 elif test -n "$PKG_CONFIG"; then
30554    if test -n "$PKG_CONFIG" && \
30555    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30556  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30557  ac_status=$?
30558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30559  test $ac_status = 0; }; then
30560  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30561else
30562  pkg_failed=yes
30563fi
30564 else
30565    pkg_failed=untried
30566fi
30567if test -n "$ALSA_LIBS"; then
30568    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30569 elif test -n "$PKG_CONFIG"; then
30570    if test -n "$PKG_CONFIG" && \
30571    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30572  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30573  ac_status=$?
30574  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30575  test $ac_status = 0; }; then
30576  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30577else
30578  pkg_failed=yes
30579fi
30580 else
30581    pkg_failed=untried
30582fi
30583
30584
30585
30586if test $pkg_failed = yes; then
30587
30588if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30589        _pkg_short_errors_supported=yes
30590else
30591        _pkg_short_errors_supported=no
30592fi
30593        if test $_pkg_short_errors_supported = yes; then
30594	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30595        else
30596	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30597        fi
30598	# Put the nasty error message in config.log where it belongs
30599	echo "$ALSA_PKG_ERRORS" >&5
30600
30601	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30602$as_echo "no" >&6; }
30603                ALSA_FOUND=no
30604elif test $pkg_failed = untried; then
30605	ALSA_FOUND=no
30606else
30607	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30608	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30610$as_echo "yes" >&6; }
30611	ALSA_FOUND=yes
30612fi
30613	fi
30614	if test "x$ALSA_FOUND" = xno; then
30615	    for ac_header in alsa/asoundlib.h
30616do :
30617  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30618if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30619  cat >>confdefs.h <<_ACEOF
30620#define HAVE_ALSA_ASOUNDLIB_H 1
30621_ACEOF
30622 ALSA_FOUND=yes
30623	                      ALSA_CFLAGS=-Iignoreme
30624	                      ALSA_LIBS=-lasound
30625	                      DEFAULT_ALSA=yes
30626else
30627  ALSA_FOUND=no
30628fi
30629
30630done
30631
30632	fi
30633	if test "x$ALSA_FOUND" = xno; then
30634
30635    # Print a helpful message on how to acquire the necessary build dependency.
30636    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30637    MISSING_DEPENDENCY=alsa
30638    PKGHANDLER_COMMAND=
30639
30640    case $PKGHANDLER in
30641	apt-get)
30642                apt_help     $MISSING_DEPENDENCY ;;
30643    yum)
30644                yum_help     $MISSING_DEPENDENCY ;;
30645	port)
30646                port_help    $MISSING_DEPENDENCY ;;
30647	pkgutil)
30648                pkgutil_help $MISSING_DEPENDENCY ;;
30649	pkgadd)
30650                pkgadd_help  $MISSING_DEPENDENCY ;;
30651    * )
30652      break ;;
30653    esac
30654
30655    if test "x$PKGHANDLER_COMMAND" != x; then
30656        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30657    fi
30658
30659	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30660	fi
30661fi
30662
30663
30664
30665
30666
30667
30668
30669###############################################################################
30670#
30671# Check for the jpeg library
30672#
30673
30674USE_EXTERNAL_LIBJPEG=true
30675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30676$as_echo_n "checking for main in -ljpeg... " >&6; }
30677if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30678  $as_echo_n "(cached) " >&6
30679else
30680  ac_check_lib_save_LIBS=$LIBS
30681LIBS="-ljpeg  $LIBS"
30682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30683/* end confdefs.h.  */
30684
30685
30686int
30687main ()
30688{
30689return main ();
30690  ;
30691  return 0;
30692}
30693_ACEOF
30694if ac_fn_cxx_try_link "$LINENO"; then :
30695  ac_cv_lib_jpeg_main=yes
30696else
30697  ac_cv_lib_jpeg_main=no
30698fi
30699rm -f core conftest.err conftest.$ac_objext \
30700    conftest$ac_exeext conftest.$ac_ext
30701LIBS=$ac_check_lib_save_LIBS
30702fi
30703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30704$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30705if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30706  cat >>confdefs.h <<_ACEOF
30707#define HAVE_LIBJPEG 1
30708_ACEOF
30709
30710  LIBS="-ljpeg $LIBS"
30711
30712else
30713   USE_EXTERNAL_LIBJPEG=false
30714               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30715$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30716
30717fi
30718
30719
30720
30721###############################################################################
30722#
30723# Check for the gif library
30724#
30725
30726USE_EXTERNAL_LIBJPEG=true
30727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30728$as_echo_n "checking for main in -lgif... " >&6; }
30729if test "${ac_cv_lib_gif_main+set}" = set; then :
30730  $as_echo_n "(cached) " >&6
30731else
30732  ac_check_lib_save_LIBS=$LIBS
30733LIBS="-lgif  $LIBS"
30734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30735/* end confdefs.h.  */
30736
30737
30738int
30739main ()
30740{
30741return main ();
30742  ;
30743  return 0;
30744}
30745_ACEOF
30746if ac_fn_cxx_try_link "$LINENO"; then :
30747  ac_cv_lib_gif_main=yes
30748else
30749  ac_cv_lib_gif_main=no
30750fi
30751rm -f core conftest.err conftest.$ac_objext \
30752    conftest$ac_exeext conftest.$ac_ext
30753LIBS=$ac_check_lib_save_LIBS
30754fi
30755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30756$as_echo "$ac_cv_lib_gif_main" >&6; }
30757if test "x$ac_cv_lib_gif_main" = x""yes; then :
30758  cat >>confdefs.h <<_ACEOF
30759#define HAVE_LIBGIF 1
30760_ACEOF
30761
30762  LIBS="-lgif $LIBS"
30763
30764else
30765   USE_EXTERNAL_LIBGIF=false
30766               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30767$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30768
30769fi
30770
30771
30772
30773###############################################################################
30774#
30775# Check for the zlib library
30776#
30777
30778
30779# Check whether --with-zlib was given.
30780if test "${with_zlib+set}" = set; then :
30781  withval=$with_zlib;
30782fi
30783
30784
30785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30786$as_echo_n "checking for compress in -lz... " >&6; }
30787if test "${ac_cv_lib_z_compress+set}" = set; then :
30788  $as_echo_n "(cached) " >&6
30789else
30790  ac_check_lib_save_LIBS=$LIBS
30791LIBS="-lz  $LIBS"
30792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30793/* end confdefs.h.  */
30794
30795/* Override any GCC internal prototype to avoid an error.
30796   Use char because int might match the return type of a GCC
30797   builtin and then its argument prototype would still apply.  */
30798#ifdef __cplusplus
30799extern "C"
30800#endif
30801char compress ();
30802int
30803main ()
30804{
30805return compress ();
30806  ;
30807  return 0;
30808}
30809_ACEOF
30810if ac_fn_cxx_try_link "$LINENO"; then :
30811  ac_cv_lib_z_compress=yes
30812else
30813  ac_cv_lib_z_compress=no
30814fi
30815rm -f core conftest.err conftest.$ac_objext \
30816    conftest$ac_exeext conftest.$ac_ext
30817LIBS=$ac_check_lib_save_LIBS
30818fi
30819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30820$as_echo "$ac_cv_lib_z_compress" >&6; }
30821if test "x$ac_cv_lib_z_compress" = x""yes; then :
30822   ZLIB_FOUND=yes
30823else
30824   ZLIB_FOUND=no
30825fi
30826
30827
30828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30829$as_echo_n "checking for which zlib to use... " >&6; }
30830
30831DEFAULT_ZLIB=bundled
30832if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30833#
30834# On macosx default is system...on others default is
30835#
30836    DEFAULT_ZLIB=system
30837fi
30838
30839if test "x${ZLIB_FOUND}" != "xyes"; then
30840#
30841# If we don't find any system...set default to bundled
30842#
30843    DEFAULT_ZLIB=bundled
30844fi
30845
30846#
30847# If user didn't specify, use DEFAULT_ZLIB
30848#
30849if test "x${with_zlib}" = "x"; then
30850    with_zlib=${DEFAULT_ZLIB}
30851fi
30852
30853if test "x${with_zlib}" = "xbundled"; then
30854    USE_EXTERNAL_LIBZ=false
30855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30856$as_echo "bundled" >&6; }
30857elif test "x${with_zlib}" = "xsystem"; then
30858    if test "x${ZLIB_FOUND}" = "xyes"; then
30859        USE_EXTERNAL_LIBZ=true
30860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30861$as_echo "system" >&6; }
30862    else
30863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30864$as_echo "system not found" >&6; }
30865        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30866    fi
30867else
30868    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30869fi
30870
30871
30872
30873###############################################################################
30874LIBZIP_CAN_USE_MMAP=true
30875
30876
30877
30878###############################################################################
30879#
30880# Check if altzone exists in time.h
30881#
30882
30883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30884/* end confdefs.h.  */
30885#include <time.h>
30886int
30887main ()
30888{
30889return (int)altzone;
30890  ;
30891  return 0;
30892}
30893_ACEOF
30894if ac_fn_cxx_try_link "$LINENO"; then :
30895  has_altzone=yes
30896else
30897  has_altzone=no
30898fi
30899rm -f core conftest.err conftest.$ac_objext \
30900    conftest$ac_exeext conftest.$ac_ext
30901if test "x$has_altzone" = xyes; then
30902
30903$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30904
30905fi
30906
30907###############################################################################
30908#
30909# Check the maths library
30910#
30911
30912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30913$as_echo_n "checking for cos in -lm... " >&6; }
30914if test "${ac_cv_lib_m_cos+set}" = set; then :
30915  $as_echo_n "(cached) " >&6
30916else
30917  ac_check_lib_save_LIBS=$LIBS
30918LIBS="-lm  $LIBS"
30919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30920/* end confdefs.h.  */
30921
30922/* Override any GCC internal prototype to avoid an error.
30923   Use char because int might match the return type of a GCC
30924   builtin and then its argument prototype would still apply.  */
30925#ifdef __cplusplus
30926extern "C"
30927#endif
30928char cos ();
30929int
30930main ()
30931{
30932return cos ();
30933  ;
30934  return 0;
30935}
30936_ACEOF
30937if ac_fn_cxx_try_link "$LINENO"; then :
30938  ac_cv_lib_m_cos=yes
30939else
30940  ac_cv_lib_m_cos=no
30941fi
30942rm -f core conftest.err conftest.$ac_objext \
30943    conftest$ac_exeext conftest.$ac_ext
30944LIBS=$ac_check_lib_save_LIBS
30945fi
30946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30947$as_echo "$ac_cv_lib_m_cos" >&6; }
30948if test "x$ac_cv_lib_m_cos" = x""yes; then :
30949  cat >>confdefs.h <<_ACEOF
30950#define HAVE_LIBM 1
30951_ACEOF
30952
30953  LIBS="-lm $LIBS"
30954
30955else
30956
30957                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30958$as_echo "$as_me: Maths library was not found" >&6;}
30959
30960fi
30961
30962
30963
30964###############################################################################
30965#
30966# Check for libdl.so
30967
30968save_LIBS="$LIBS"
30969LIBS=""
30970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30971$as_echo_n "checking for dlopen in -ldl... " >&6; }
30972if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30973  $as_echo_n "(cached) " >&6
30974else
30975  ac_check_lib_save_LIBS=$LIBS
30976LIBS="-ldl  $LIBS"
30977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30978/* end confdefs.h.  */
30979
30980/* Override any GCC internal prototype to avoid an error.
30981   Use char because int might match the return type of a GCC
30982   builtin and then its argument prototype would still apply.  */
30983#ifdef __cplusplus
30984extern "C"
30985#endif
30986char dlopen ();
30987int
30988main ()
30989{
30990return dlopen ();
30991  ;
30992  return 0;
30993}
30994_ACEOF
30995if ac_fn_cxx_try_link "$LINENO"; then :
30996  ac_cv_lib_dl_dlopen=yes
30997else
30998  ac_cv_lib_dl_dlopen=no
30999fi
31000rm -f core conftest.err conftest.$ac_objext \
31001    conftest$ac_exeext conftest.$ac_ext
31002LIBS=$ac_check_lib_save_LIBS
31003fi
31004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31005$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31006if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
31007  cat >>confdefs.h <<_ACEOF
31008#define HAVE_LIBDL 1
31009_ACEOF
31010
31011  LIBS="-ldl $LIBS"
31012
31013fi
31014
31015LIBDL="$LIBS"
31016
31017LIBS="$save_LIBS"
31018
31019
31020
31021###############################################################################
31022#
31023# statically link libstdc++ before C++ ABI is stablized on Linux unless
31024# dynamic build is configured on command line.
31025#
31026
31027# Check whether --with-stdc++lib was given.
31028if test "${with_stdc__lib+set}" = set; then :
31029  withval=$with_stdc__lib;
31030    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31031        && test "x$with_stdc__lib" != xdefault; then
31032      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31033    fi
31034
31035else
31036  with_stdc__lib=default
31037
31038fi
31039
31040
31041if test "x$OPENJDK_TARGET_OS" = xlinux; then
31042    # Test if -lstdc++ works.
31043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31044$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31045    ac_ext=cpp
31046ac_cpp='$CXXCPP $CPPFLAGS'
31047ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31048ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31049ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31050
31051    OLD_CXXFLAGS="$CXXFLAGS"
31052    CXXFLAGS="$CXXFLAGS -lstdc++"
31053    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31054/* end confdefs.h.  */
31055
31056int
31057main ()
31058{
31059return 0;
31060  ;
31061  return 0;
31062}
31063_ACEOF
31064if ac_fn_cxx_try_link "$LINENO"; then :
31065  has_dynamic_libstdcxx=yes
31066else
31067  has_dynamic_libstdcxx=no
31068fi
31069rm -f core conftest.err conftest.$ac_objext \
31070    conftest$ac_exeext conftest.$ac_ext
31071    CXXFLAGS="$OLD_CXXFLAGS"
31072    ac_ext=cpp
31073ac_cpp='$CXXCPP $CPPFLAGS'
31074ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31075ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31076ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31077
31078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31079$as_echo "$has_dynamic_libstdcxx" >&6; }
31080
31081    # Test if stdc++ can be linked statically.
31082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31083$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31084    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31085    ac_ext=cpp
31086ac_cpp='$CXXCPP $CPPFLAGS'
31087ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31088ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31089ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31090
31091    OLD_LIBS="$LIBS"
31092    OLD_CXX="$CXX"
31093    LIBS="$STATIC_STDCXX_FLAGS"
31094    CXX="$CC"
31095    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31096/* end confdefs.h.  */
31097
31098int
31099main ()
31100{
31101return 0;
31102  ;
31103  return 0;
31104}
31105_ACEOF
31106if ac_fn_cxx_try_link "$LINENO"; then :
31107  has_static_libstdcxx=yes
31108else
31109  has_static_libstdcxx=no
31110fi
31111rm -f core conftest.err conftest.$ac_objext \
31112    conftest$ac_exeext conftest.$ac_ext
31113    LIBS="$OLD_LIBS"
31114    CXX="$OLD_CXX"
31115    ac_ext=cpp
31116ac_cpp='$CXXCPP $CPPFLAGS'
31117ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31118ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31119ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31120
31121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31122$as_echo "$has_static_libstdcxx" >&6; }
31123
31124    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31125        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31126    fi
31127
31128    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31129        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31130    fi
31131
31132    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31133        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31134    fi
31135
31136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31137$as_echo_n "checking how to link with libstdc++... " >&6; }
31138    # If dynamic was requested, it's available since it would fail above otherwise.
31139    # If dynamic wasn't requested, go with static unless it isn't available.
31140    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31141        LIBCXX="$LIBCXX -lstdc++"
31142        LDCXX="$CXX"
31143        STATIC_CXX_SETTING="STATIC_CXX=false"
31144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31145$as_echo "dynamic" >&6; }
31146    else
31147        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31148        LDCXX="$CC"
31149        STATIC_CXX_SETTING="STATIC_CXX=true"
31150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31151$as_echo "static" >&6; }
31152    fi
31153fi
31154
31155
31156# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31157if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31158    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31159fi
31160
31161# TODO better (platform agnostic) test
31162if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31163    LIBCXX="-lstdc++"
31164fi
31165
31166
31167
31168
31169
31170# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31171
31172# When using cygwin or msys, we need a wrapper binary that renames
31173# /cygdrive/c/ arguments into c:/ arguments and peeks into
31174# @files and rewrites these too! This wrapper binary is
31175# called fixpath.
31176FIXPATH=
31177if test "x$OPENJDK_BUILD_OS" = xwindows; then
31178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31179$as_echo_n "checking if fixpath can be created... " >&6; }
31180    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31181    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31182    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31183      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31184      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31185      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31186      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31187    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31188      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31189      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31190
31191      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31192      # @ was chosen as separator to minimize risk of other tools messing around with it
31193      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31194      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31195
31196      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31197    fi
31198    rm -f $OUTPUT_ROOT/fixpath*
31199    cd $OUTPUT_ROOT
31200    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31201    cd $CURDIR
31202
31203    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31205$as_echo "no" >&6; }
31206        cat $OUTPUT_ROOT/fixpath1.log
31207        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31208    fi
31209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31210$as_echo "yes" >&6; }
31211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31212$as_echo_n "checking if fixpath.exe works... " >&6; }
31213    cd $OUTPUT_ROOT
31214    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31215    cd $CURDIR
31216    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31218$as_echo "no" >&6; }
31219        cat $OUTPUT_ROOT/fixpath2.log
31220        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31221    fi
31222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31223$as_echo "yes" >&6; }
31224    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31225fi
31226
31227
31228
31229
31230###############################################################################
31231#
31232# We need to do some final tweaking, when everything else is done.
31233#
31234###############################################################################
31235
31236
31237HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31238
31239
31240# The name of the Service Agent jar.
31241SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31242if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31243  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31244fi
31245
31246
31247
31248
31249###############################################################################
31250#
31251# Configure parts of the build that only affect the build performance,
31252# not the result.
31253#
31254###############################################################################
31255
31256
31257  # How many cores do we have on this build system?
31258
31259# Check whether --with-num-cores was given.
31260if test "${with_num_cores+set}" = set; then :
31261  withval=$with_num_cores;
31262fi
31263
31264  if test "x$with_num_cores" = x; then
31265    # The number of cores were not specified, try to probe them.
31266
31267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31268$as_echo_n "checking for number of cores... " >&6; }
31269    NUM_CORES=1
31270    FOUND_CORES=no
31271
31272    if test -f /proc/cpuinfo; then
31273        # Looks like a Linux (or cygwin) system
31274        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31275        FOUND_CORES=yes
31276    elif test -x /usr/sbin/psrinfo; then
31277        # Looks like a Solaris system
31278        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31279        FOUND_CORES=yes
31280    elif test -x /usr/sbin/system_profiler; then
31281        # Looks like a MacOSX system
31282        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31283        FOUND_CORES=yes
31284    elif test -n "$NUMBER_OF_PROCESSORS"; then
31285        # On windows, look in the env
31286        NUM_CORES=$NUMBER_OF_PROCESSORS
31287        FOUND_CORES=yes
31288    fi
31289
31290    if test "x$FOUND_CORES" = xyes; then
31291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31292$as_echo "$NUM_CORES" >&6; }
31293    else
31294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31295$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31297$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31298    fi
31299
31300
31301  else
31302    NUM_CORES=$with_num_cores
31303  fi
31304
31305
31306
31307  # How much memory do we have on this build system?
31308
31309# Check whether --with-memory-size was given.
31310if test "${with_memory_size+set}" = set; then :
31311  withval=$with_memory_size;
31312fi
31313
31314  if test "x$with_memory_size" = x; then
31315    # The memory size was not specified, try to probe it.
31316
31317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31318$as_echo_n "checking for memory size... " >&6; }
31319    # Default to 1024 MB
31320    MEMORY_SIZE=1024
31321    FOUND_MEM=no
31322
31323    if test -f /proc/meminfo; then
31324        # Looks like a Linux (or cygwin) system
31325        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31326        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31327        FOUND_MEM=yes
31328    elif test -x /usr/sbin/prtconf; then
31329        # Looks like a Solaris system
31330        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31331        FOUND_MEM=yes
31332    elif test -x /usr/sbin/system_profiler; then
31333        # Looks like a MacOSX system
31334        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31335        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31336        FOUND_MEM=yes
31337    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31338        # Windows, but without cygwin
31339        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31340        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31341        FOUND_MEM=yes
31342    fi
31343
31344    if test "x$FOUND_MEM" = xyes; then
31345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31346$as_echo "$MEMORY_SIZE MB" >&6; }
31347    else
31348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31349$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31350        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31351$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31352    fi
31353
31354  else
31355    MEMORY_SIZE=$with_memory_size
31356  fi
31357
31358
31359
31360  # Provide a decent default number of parallel jobs for make depending on
31361  # number of cores, amount of memory and machine architecture.
31362
31363# Check whether --with-jobs was given.
31364if test "${with_jobs+set}" = set; then :
31365  withval=$with_jobs;
31366fi
31367
31368  if test "x$with_jobs" = x; then
31369    # Number of jobs was not specified, calculate.
31370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
31371$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
31372    # Approximate memory in GB, rounding up a bit.
31373    memory_gb=`expr $MEMORY_SIZE / 1100`
31374    # Pick the lowest of memory in gb and number of cores.
31375    if test "$memory_gb" -lt "$NUM_CORES"; then
31376      JOBS="$memory_gb"
31377    else
31378      JOBS="$NUM_CORES"
31379      # On bigger machines, leave some room for other processes to run
31380      if test "$JOBS" -gt "4"; then
31381        JOBS=`expr $JOBS '*' 90 / 100`
31382      fi
31383    fi
31384    # Cap number of jobs to 16
31385    if test "$JOBS" -gt "16"; then
31386      JOBS=16
31387    fi
31388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
31389$as_echo "$JOBS" >&6; }
31390  else
31391    JOBS=$with_jobs
31392  fi
31393
31394
31395
31396# Setup smart javac (after cores and memory have been setup)
31397
31398
31399# Check whether --with-sjavac-server-java was given.
31400if test "${with_sjavac_server_java+set}" = set; then :
31401  withval=$with_sjavac_server_java;
31402fi
31403
31404
31405if test "x$with_sjavac_server_java" != x; then
31406    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31407    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31408    if test "x$FOUND_VERSION" = x; then
31409        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31410    fi
31411else
31412    SJAVAC_SERVER_JAVA=""
31413    # Hotspot specific options.
31414
31415    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31416    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31417    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31418    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31419    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31420        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31421    fi
31422
31423    # JRockit specific options.
31424
31425    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31426    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31427    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31428    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31429    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31430        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31431    fi
31432
31433    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31434fi
31435
31436
31437
31438# Check whether --with-sjavac-server-cores was given.
31439if test "${with_sjavac_server_cores+set}" = set; then :
31440  withval=$with_sjavac_server_cores;
31441fi
31442
31443if test "x$with_sjavac_server_cores" != x; then
31444    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31445else
31446    if test "$NUM_CORES" -gt 16; then
31447        # We set this arbitrary limit because we want to limit the heap
31448        # size of the javac server.
31449        # In the future we will make the javac compilers in the server
31450        # share more and more state, thus enabling us to use more and
31451        # more concurrent threads in the server.
31452        SJAVAC_SERVER_CORES="16"
31453    else
31454        SJAVAC_SERVER_CORES="$NUM_CORES"
31455    fi
31456
31457    if test "$MEMORY_SIZE" -gt "17000"; then
31458        MAX_HEAP_MEM=10000
31459
31460    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31461    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31462    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31463    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31464    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31465        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31466    fi
31467
31468
31469    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31470    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31471    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31472    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31473    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31474        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31475    fi
31476
31477    elif test "$MEMORY_SIZE" -gt "10000"; then
31478        MAX_HEAP_MEM=6000
31479
31480    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31481    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31482    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31483    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31484    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31485        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31486    fi
31487
31488
31489    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31490    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31491    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31492    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31493    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31494        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31495    fi
31496
31497    elif test "$MEMORY_SIZE" -gt "5000"; then
31498        MAX_HEAP_MEM=3000
31499
31500    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31501    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31502    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31503    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31504    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31505        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31506    fi
31507
31508
31509    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31510    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31511    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31512    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31513    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31514        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31515    fi
31516
31517    elif test "$MEMORY_SIZE" -gt "3800"; then
31518        MAX_HEAP_MEM=2500
31519
31520    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31521    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31522    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31523    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31524    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31525        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31526    fi
31527
31528    elif test "$MEMORY_SIZE" -gt "1900"; then
31529        MAX_HEAP_MEM=1200
31530
31531    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31532    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31533    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31534    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31535    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31536        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31537    fi
31538
31539    elif test "$MEMORY_SIZE" -gt "1000"; then
31540        MAX_HEAP_MEM=900
31541
31542    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31543    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31544    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31545    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31546    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31547        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31548    fi
31549
31550    else
31551        MAX_HEAP_MEM=512
31552
31553    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31554    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31555    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31556    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31557    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31558        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31559    fi
31560
31561    fi
31562
31563
31564    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31565    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31566    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31567    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31568    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31569        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31570    fi
31571
31572
31573    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31574    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31575    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31576    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31577    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31578        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31579    fi
31580
31581
31582    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31583    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31584    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31585    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31586    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31587        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31588    fi
31589
31590
31591    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31592    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31594$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31595        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31597$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31598    fi
31599fi
31600
31601
31602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31603$as_echo_n "checking whether to use sjavac... " >&6; }
31604# Check whether --enable-sjavac was given.
31605if test "${enable_sjavac+set}" = set; then :
31606  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31607else
31608  ENABLE_SJAVAC='no'
31609fi
31610
31611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31612$as_echo "$ENABLE_SJAVAC" >&6; }
31613
31614
31615if test "x$ENABLE_SJAVAC" = xyes; then
31616    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31617else
31618    SJAVAC_SERVER_DIR=
31619fi
31620
31621
31622
31623
31624# Can the C/C++ compiler use precompiled headers?
31625
31626
31627###############################################################################
31628#
31629# Can the C/C++ compiler use precompiled headers?
31630#
31631# Check whether --enable-precompiled-headers was given.
31632if test "${enable_precompiled_headers+set}" = set; then :
31633  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31634else
31635  ENABLE_PRECOMPH=yes
31636fi
31637
31638
31639USE_PRECOMPILED_HEADER=1
31640if test "x$ENABLE_PRECOMPH" = xno; then
31641    USE_PRECOMPILED_HEADER=0
31642fi
31643
31644if test "x$ENABLE_PRECOMPH" = xyes; then
31645    # Check that the compiler actually supports precomp headers.
31646    if test "x$GCC" = xyes; then
31647         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31648$as_echo_n "checking that precompiled headers work... " >&6; }
31649         echo "int alfa();" > conftest.h
31650         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31651         if test ! -f conftest.hpp.gch; then
31652             USE_PRECOMPILED_HEADER=0
31653             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31654$as_echo "no" >&6; }
31655         else
31656             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31657$as_echo "yes" >&6; }
31658         fi
31659         rm -f conftest.h conftest.hpp.gch
31660    fi
31661fi
31662
31663
31664
31665
31666# Setup use of ccache, if available
31667
31668    # Check whether --enable-ccache was given.
31669if test "${enable_ccache+set}" = set; then :
31670  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31671else
31672  ENABLE_CCACHE=yes
31673fi
31674
31675    if test "x$ENABLE_CCACHE" = xyes; then
31676        # Extract the first word of "ccache", so it can be a program name with args.
31677set dummy ccache; ac_word=$2
31678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31679$as_echo_n "checking for $ac_word... " >&6; }
31680if test "${ac_cv_path_CCACHE+set}" = set; then :
31681  $as_echo_n "(cached) " >&6
31682else
31683  case $CCACHE in
31684  [\\/]* | ?:[\\/]*)
31685  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31686  ;;
31687  *)
31688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31689for as_dir in $PATH
31690do
31691  IFS=$as_save_IFS
31692  test -z "$as_dir" && as_dir=.
31693    for ac_exec_ext in '' $ac_executable_extensions; do
31694  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31695    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31697    break 2
31698  fi
31699done
31700  done
31701IFS=$as_save_IFS
31702
31703  ;;
31704esac
31705fi
31706CCACHE=$ac_cv_path_CCACHE
31707if test -n "$CCACHE"; then
31708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31709$as_echo "$CCACHE" >&6; }
31710else
31711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31712$as_echo "no" >&6; }
31713fi
31714
31715
31716    else
31717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31718$as_echo_n "checking for ccache... " >&6; }
31719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31720$as_echo "explicitly disabled" >&6; }
31721        CCACHE=
31722    fi
31723
31724
31725
31726# Check whether --with-ccache-dir was given.
31727if test "${with_ccache_dir+set}" = set; then :
31728  withval=$with_ccache_dir;
31729fi
31730
31731
31732    if test "x$with_ccache_dir" != x; then
31733        # When using a non home ccache directory, assume the use is to share ccache files
31734        # with other users. Thus change the umask.
31735        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31736    fi
31737    CCACHE_FOUND=""
31738    if test "x$CCACHE" != x; then
31739
31740    if test "x$CCACHE" != x; then
31741        CCACHE_FOUND="true"
31742        # Only use ccache if it is 3.1.4 or later, which supports
31743        # precompiled headers.
31744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31745$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31746        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31747        if test "x$HAS_GOOD_CCACHE" = x; then
31748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31749$as_echo "no, disabling ccache" >&6; }
31750            CCACHE=
31751        else
31752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31753$as_echo "yes" >&6; }
31754            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31755$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31756            PUSHED_FLAGS="$CXXFLAGS"
31757            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31758            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31759/* end confdefs.h.  */
31760
31761int
31762main ()
31763{
31764
31765  ;
31766  return 0;
31767}
31768_ACEOF
31769if ac_fn_cxx_try_compile "$LINENO"; then :
31770  CC_KNOWS_CCACHE_TRICK=yes
31771else
31772  CC_KNOWS_CCACHE_TRICK=no
31773fi
31774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31775            CXXFLAGS="$PUSHED_FLAGS"
31776            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31777                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31778$as_echo "yes" >&6; }
31779            else
31780                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31781$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31782                CCACHE=
31783            fi
31784        fi
31785    fi
31786
31787    if test "x$CCACHE" != x; then
31788        CCACHE_SLOPPINESS=time_macros
31789        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31790        CCACHE_FLAGS=-fpch-preprocess
31791
31792        if test "x$SET_CCACHE_DIR" != x; then
31793            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31794	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31795        fi
31796    fi
31797
31798    fi
31799
31800
31801###############################################################################
31802#
31803# And now the finish...
31804#
31805###############################################################################
31806
31807# Check for some common pitfalls
31808
31809  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31810    file_to_test="$SRC_ROOT/LICENSE"
31811    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31812      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
31813    fi
31814  fi
31815
31816
31817
31818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31819$as_echo_n "checking if build directory is on local disk... " >&6; }
31820
31821	# df -l lists only local disks; if the given directory is not found then
31822	# a non-zero exit code is given
31823  if test "x$DF" = x; then
31824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31825      # msys does not have df; use Windows "net use" instead.
31826      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31827      if test "x$IS_NETWORK_DISK" = x; then
31828        OUTPUT_DIR_IS_LOCAL="yes"
31829      else
31830        OUTPUT_DIR_IS_LOCAL="no"
31831      fi
31832    else
31833      # No df here, say it's local
31834      OUTPUT_DIR_IS_LOCAL="yes"
31835    fi
31836  else
31837    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31838      OUTPUT_DIR_IS_LOCAL="yes"
31839    else
31840      OUTPUT_DIR_IS_LOCAL="no"
31841    fi
31842  fi
31843
31844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31845$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31846
31847
31848
31849# Check if the user has any old-style ALT_ variables set.
31850FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31851
31852# Before generating output files, test if they exist. If they do, this is a reconfigure.
31853# Since we can't properly handle the dependencies for this, warn the user about the situation
31854if test -e $OUTPUT_ROOT/spec.gmk; then
31855  IS_RECONFIGURE=yes
31856else
31857  IS_RECONFIGURE=no
31858fi
31859
31860if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31861  HIDE_PERFORMANCE_HINTS=yes
31862else
31863  HIDE_PERFORMANCE_HINTS=no
31864  # Hide it the next time around...
31865  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31866fi
31867
31868
31869
31870# At the end, call the custom hook. (Dummy macro if no custom sources available)
31871
31872
31873# We're messing a bit with internal autoconf variables to put the config.status
31874# in the output directory instead of the current directory.
31875CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31876# Create the actual output files. Now the main work of configure is done.
31877cat >confcache <<\_ACEOF
31878# This file is a shell script that caches the results of configure
31879# tests run on this system so they can be shared between configure
31880# scripts and configure runs, see configure's option --config-cache.
31881# It is not useful on other systems.  If it contains results you don't
31882# want to keep, you may remove or edit it.
31883#
31884# config.status only pays attention to the cache file if you give it
31885# the --recheck option to rerun configure.
31886#
31887# `ac_cv_env_foo' variables (set or unset) will be overridden when
31888# loading this file, other *unset* `ac_cv_foo' will be assigned the
31889# following values.
31890
31891_ACEOF
31892
31893# The following way of writing the cache mishandles newlines in values,
31894# but we know of no workaround that is simple, portable, and efficient.
31895# So, we kill variables containing newlines.
31896# Ultrix sh set writes to stderr and can't be redirected directly,
31897# and sets the high bit in the cache file unless we assign to the vars.
31898(
31899  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31900    eval ac_val=\$$ac_var
31901    case $ac_val in #(
31902    *${as_nl}*)
31903      case $ac_var in #(
31904      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31905$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31906      esac
31907      case $ac_var in #(
31908      _ | IFS | as_nl) ;; #(
31909      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31910      *) { eval $ac_var=; unset $ac_var;} ;;
31911      esac ;;
31912    esac
31913  done
31914
31915  (set) 2>&1 |
31916    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31917    *${as_nl}ac_space=\ *)
31918      # `set' does not quote correctly, so add quotes: double-quote
31919      # substitution turns \\\\ into \\, and sed turns \\ into \.
31920      sed -n \
31921	"s/'/'\\\\''/g;
31922	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31923      ;; #(
31924    *)
31925      # `set' quotes correctly as required by POSIX, so do not add quotes.
31926      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31927      ;;
31928    esac |
31929    sort
31930) |
31931  sed '
31932     /^ac_cv_env_/b end
31933     t clear
31934     :clear
31935     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31936     t end
31937     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31938     :end' >>confcache
31939if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31940  if test -w "$cache_file"; then
31941    test "x$cache_file" != "x/dev/null" &&
31942      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31943$as_echo "$as_me: updating cache $cache_file" >&6;}
31944    cat confcache >$cache_file
31945  else
31946    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31947$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31948  fi
31949fi
31950rm -f confcache
31951
31952test "x$prefix" = xNONE && prefix=$ac_default_prefix
31953# Let make expand exec_prefix.
31954test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31955
31956DEFS=-DHAVE_CONFIG_H
31957
31958ac_libobjs=
31959ac_ltlibobjs=
31960U=
31961for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31962  # 1. Remove the extension, and $U if already installed.
31963  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31964  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31965  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31966  #    will be set to the directory where LIBOBJS objects are built.
31967  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31968  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31969done
31970LIBOBJS=$ac_libobjs
31971
31972LTLIBOBJS=$ac_ltlibobjs
31973
31974
31975
31976: ${CONFIG_STATUS=./config.status}
31977ac_write_fail=0
31978ac_clean_files_save=$ac_clean_files
31979ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31980{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31981$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31982as_write_fail=0
31983cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31984#! $SHELL
31985# Generated by $as_me.
31986# Run this file to recreate the current configuration.
31987# Compiler output produced by configure, useful for debugging
31988# configure, is in config.log if it exists.
31989
31990debug=false
31991ac_cs_recheck=false
31992ac_cs_silent=false
31993
31994SHELL=\${CONFIG_SHELL-$SHELL}
31995export SHELL
31996_ASEOF
31997cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31998## -------------------- ##
31999## M4sh Initialization. ##
32000## -------------------- ##
32001
32002# Be more Bourne compatible
32003DUALCASE=1; export DUALCASE # for MKS sh
32004if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32005  emulate sh
32006  NULLCMD=:
32007  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32008  # is contrary to our usage.  Disable this feature.
32009  alias -g '${1+"$@"}'='"$@"'
32010  setopt NO_GLOB_SUBST
32011else
32012  case `(set -o) 2>/dev/null` in #(
32013  *posix*) :
32014    set -o posix ;; #(
32015  *) :
32016     ;;
32017esac
32018fi
32019
32020
32021as_nl='
32022'
32023export as_nl
32024# Printing a long string crashes Solaris 7 /usr/bin/printf.
32025as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32026as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32027as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32028# Prefer a ksh shell builtin over an external printf program on Solaris,
32029# but without wasting forks for bash or zsh.
32030if test -z "$BASH_VERSION$ZSH_VERSION" \
32031    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32032  as_echo='print -r --'
32033  as_echo_n='print -rn --'
32034elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32035  as_echo='printf %s\n'
32036  as_echo_n='printf %s'
32037else
32038  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32039    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32040    as_echo_n='/usr/ucb/echo -n'
32041  else
32042    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32043    as_echo_n_body='eval
32044      arg=$1;
32045      case $arg in #(
32046      *"$as_nl"*)
32047	expr "X$arg" : "X\\(.*\\)$as_nl";
32048	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32049      esac;
32050      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32051    '
32052    export as_echo_n_body
32053    as_echo_n='sh -c $as_echo_n_body as_echo'
32054  fi
32055  export as_echo_body
32056  as_echo='sh -c $as_echo_body as_echo'
32057fi
32058
32059# The user is always right.
32060if test "${PATH_SEPARATOR+set}" != set; then
32061  PATH_SEPARATOR=:
32062  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32063    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32064      PATH_SEPARATOR=';'
32065  }
32066fi
32067
32068
32069# IFS
32070# We need space, tab and new line, in precisely that order.  Quoting is
32071# there to prevent editors from complaining about space-tab.
32072# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32073# splitting by setting IFS to empty value.)
32074IFS=" ""	$as_nl"
32075
32076# Find who we are.  Look in the path if we contain no directory separator.
32077case $0 in #((
32078  *[\\/]* ) as_myself=$0 ;;
32079  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32080for as_dir in $PATH
32081do
32082  IFS=$as_save_IFS
32083  test -z "$as_dir" && as_dir=.
32084    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32085  done
32086IFS=$as_save_IFS
32087
32088     ;;
32089esac
32090# We did not find ourselves, most probably we were run as `sh COMMAND'
32091# in which case we are not to be found in the path.
32092if test "x$as_myself" = x; then
32093  as_myself=$0
32094fi
32095if test ! -f "$as_myself"; then
32096  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32097  exit 1
32098fi
32099
32100# Unset variables that we do not need and which cause bugs (e.g. in
32101# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32102# suppresses any "Segmentation fault" message there.  '((' could
32103# trigger a bug in pdksh 5.2.14.
32104for as_var in BASH_ENV ENV MAIL MAILPATH
32105do eval test x\${$as_var+set} = xset \
32106  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32107done
32108PS1='$ '
32109PS2='> '
32110PS4='+ '
32111
32112# NLS nuisances.
32113LC_ALL=C
32114export LC_ALL
32115LANGUAGE=C
32116export LANGUAGE
32117
32118# CDPATH.
32119(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32120
32121
32122# as_fn_error STATUS ERROR [LINENO LOG_FD]
32123# ----------------------------------------
32124# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32125# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32126# script with STATUS, using 1 if that was 0.
32127as_fn_error ()
32128{
32129  as_status=$1; test $as_status -eq 0 && as_status=1
32130  if test "$4"; then
32131    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32132    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32133  fi
32134  $as_echo "$as_me: error: $2" >&2
32135  as_fn_exit $as_status
32136} # as_fn_error
32137
32138
32139# as_fn_set_status STATUS
32140# -----------------------
32141# Set $? to STATUS, without forking.
32142as_fn_set_status ()
32143{
32144  return $1
32145} # as_fn_set_status
32146
32147# as_fn_exit STATUS
32148# -----------------
32149# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32150as_fn_exit ()
32151{
32152  set +e
32153  as_fn_set_status $1
32154  exit $1
32155} # as_fn_exit
32156
32157# as_fn_unset VAR
32158# ---------------
32159# Portably unset VAR.
32160as_fn_unset ()
32161{
32162  { eval $1=; unset $1;}
32163}
32164as_unset=as_fn_unset
32165# as_fn_append VAR VALUE
32166# ----------------------
32167# Append the text in VALUE to the end of the definition contained in VAR. Take
32168# advantage of any shell optimizations that allow amortized linear growth over
32169# repeated appends, instead of the typical quadratic growth present in naive
32170# implementations.
32171if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32172  eval 'as_fn_append ()
32173  {
32174    eval $1+=\$2
32175  }'
32176else
32177  as_fn_append ()
32178  {
32179    eval $1=\$$1\$2
32180  }
32181fi # as_fn_append
32182
32183# as_fn_arith ARG...
32184# ------------------
32185# Perform arithmetic evaluation on the ARGs, and store the result in the
32186# global $as_val. Take advantage of shells that can avoid forks. The arguments
32187# must be portable across $(()) and expr.
32188if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32189  eval 'as_fn_arith ()
32190  {
32191    as_val=$(( $* ))
32192  }'
32193else
32194  as_fn_arith ()
32195  {
32196    as_val=`expr "$@" || test $? -eq 1`
32197  }
32198fi # as_fn_arith
32199
32200
32201if expr a : '\(a\)' >/dev/null 2>&1 &&
32202   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32203  as_expr=expr
32204else
32205  as_expr=false
32206fi
32207
32208if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32209  as_basename=basename
32210else
32211  as_basename=false
32212fi
32213
32214if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32215  as_dirname=dirname
32216else
32217  as_dirname=false
32218fi
32219
32220as_me=`$as_basename -- "$0" ||
32221$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32222	 X"$0" : 'X\(//\)$' \| \
32223	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32224$as_echo X/"$0" |
32225    sed '/^.*\/\([^/][^/]*\)\/*$/{
32226	    s//\1/
32227	    q
32228	  }
32229	  /^X\/\(\/\/\)$/{
32230	    s//\1/
32231	    q
32232	  }
32233	  /^X\/\(\/\).*/{
32234	    s//\1/
32235	    q
32236	  }
32237	  s/.*/./; q'`
32238
32239# Avoid depending upon Character Ranges.
32240as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32241as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32242as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32243as_cr_digits='0123456789'
32244as_cr_alnum=$as_cr_Letters$as_cr_digits
32245
32246ECHO_C= ECHO_N= ECHO_T=
32247case `echo -n x` in #(((((
32248-n*)
32249  case `echo 'xy\c'` in
32250  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32251  xy)  ECHO_C='\c';;
32252  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32253       ECHO_T='	';;
32254  esac;;
32255*)
32256  ECHO_N='-n';;
32257esac
32258
32259rm -f conf$$ conf$$.exe conf$$.file
32260if test -d conf$$.dir; then
32261  rm -f conf$$.dir/conf$$.file
32262else
32263  rm -f conf$$.dir
32264  mkdir conf$$.dir 2>/dev/null
32265fi
32266if (echo >conf$$.file) 2>/dev/null; then
32267  if ln -s conf$$.file conf$$ 2>/dev/null; then
32268    as_ln_s='ln -s'
32269    # ... but there are two gotchas:
32270    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32271    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32272    # In both cases, we have to default to `cp -p'.
32273    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32274      as_ln_s='cp -p'
32275  elif ln conf$$.file conf$$ 2>/dev/null; then
32276    as_ln_s=ln
32277  else
32278    as_ln_s='cp -p'
32279  fi
32280else
32281  as_ln_s='cp -p'
32282fi
32283rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32284rmdir conf$$.dir 2>/dev/null
32285
32286
32287# as_fn_mkdir_p
32288# -------------
32289# Create "$as_dir" as a directory, including parents if necessary.
32290as_fn_mkdir_p ()
32291{
32292
32293  case $as_dir in #(
32294  -*) as_dir=./$as_dir;;
32295  esac
32296  test -d "$as_dir" || eval $as_mkdir_p || {
32297    as_dirs=
32298    while :; do
32299      case $as_dir in #(
32300      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32301      *) as_qdir=$as_dir;;
32302      esac
32303      as_dirs="'$as_qdir' $as_dirs"
32304      as_dir=`$as_dirname -- "$as_dir" ||
32305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32306	 X"$as_dir" : 'X\(//\)[^/]' \| \
32307	 X"$as_dir" : 'X\(//\)$' \| \
32308	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32309$as_echo X"$as_dir" |
32310    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32311	    s//\1/
32312	    q
32313	  }
32314	  /^X\(\/\/\)[^/].*/{
32315	    s//\1/
32316	    q
32317	  }
32318	  /^X\(\/\/\)$/{
32319	    s//\1/
32320	    q
32321	  }
32322	  /^X\(\/\).*/{
32323	    s//\1/
32324	    q
32325	  }
32326	  s/.*/./; q'`
32327      test -d "$as_dir" && break
32328    done
32329    test -z "$as_dirs" || eval "mkdir $as_dirs"
32330  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32331
32332
32333} # as_fn_mkdir_p
32334if mkdir -p . 2>/dev/null; then
32335  as_mkdir_p='mkdir -p "$as_dir"'
32336else
32337  test -d ./-p && rmdir ./-p
32338  as_mkdir_p=false
32339fi
32340
32341if test -x / >/dev/null 2>&1; then
32342  as_test_x='test -x'
32343else
32344  if ls -dL / >/dev/null 2>&1; then
32345    as_ls_L_option=L
32346  else
32347    as_ls_L_option=
32348  fi
32349  as_test_x='
32350    eval sh -c '\''
32351      if test -d "$1"; then
32352	test -d "$1/.";
32353      else
32354	case $1 in #(
32355	-*)set "./$1";;
32356	esac;
32357	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32358	???[sx]*):;;*)false;;esac;fi
32359    '\'' sh
32360  '
32361fi
32362as_executable_p=$as_test_x
32363
32364# Sed expression to map a string onto a valid CPP name.
32365as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32366
32367# Sed expression to map a string onto a valid variable name.
32368as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32369
32370
32371exec 6>&1
32372## ----------------------------------- ##
32373## Main body of $CONFIG_STATUS script. ##
32374## ----------------------------------- ##
32375_ASEOF
32376test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32377
32378cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32379# Save the log message, to keep $0 and so on meaningful, and to
32380# report actual input values of CONFIG_FILES etc. instead of their
32381# values after options handling.
32382ac_log="
32383This file was extended by OpenJDK $as_me jdk8, which was
32384generated by GNU Autoconf 2.67.  Invocation command line was
32385
32386  CONFIG_FILES    = $CONFIG_FILES
32387  CONFIG_HEADERS  = $CONFIG_HEADERS
32388  CONFIG_LINKS    = $CONFIG_LINKS
32389  CONFIG_COMMANDS = $CONFIG_COMMANDS
32390  $ $0 $@
32391
32392on `(hostname || uname -n) 2>/dev/null | sed 1q`
32393"
32394
32395_ACEOF
32396
32397case $ac_config_files in *"
32398"*) set x $ac_config_files; shift; ac_config_files=$*;;
32399esac
32400
32401case $ac_config_headers in *"
32402"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32403esac
32404
32405
32406cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32407# Files that config.status was made for.
32408config_files="$ac_config_files"
32409config_headers="$ac_config_headers"
32410
32411_ACEOF
32412
32413cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32414ac_cs_usage="\
32415\`$as_me' instantiates files and other configuration actions
32416from templates according to the current configuration.  Unless the files
32417and actions are specified as TAGs, all are instantiated by default.
32418
32419Usage: $0 [OPTION]... [TAG]...
32420
32421  -h, --help       print this help, then exit
32422  -V, --version    print version number and configuration settings, then exit
32423      --config     print configuration, then exit
32424  -q, --quiet, --silent
32425                   do not print progress messages
32426  -d, --debug      don't remove temporary files
32427      --recheck    update $as_me by reconfiguring in the same conditions
32428      --file=FILE[:TEMPLATE]
32429                   instantiate the configuration file FILE
32430      --header=FILE[:TEMPLATE]
32431                   instantiate the configuration header FILE
32432
32433Configuration files:
32434$config_files
32435
32436Configuration headers:
32437$config_headers
32438
32439Report bugs to <build-dev@openjdk.java.net>.
32440OpenJDK home page: <http://openjdk.java.net>."
32441
32442_ACEOF
32443cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32444ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32445ac_cs_version="\\
32446OpenJDK config.status jdk8
32447configured by $0, generated by GNU Autoconf 2.67,
32448  with options \\"\$ac_cs_config\\"
32449
32450Copyright (C) 2010 Free Software Foundation, Inc.
32451This config.status script is free software; the Free Software Foundation
32452gives unlimited permission to copy, distribute and modify it."
32453
32454ac_pwd='$ac_pwd'
32455srcdir='$srcdir'
32456AWK='$AWK'
32457test -n "\$AWK" || AWK=awk
32458_ACEOF
32459
32460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32461# The default lists apply if the user does not specify any file.
32462ac_need_defaults=:
32463while test $# != 0
32464do
32465  case $1 in
32466  --*=?*)
32467    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32468    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32469    ac_shift=:
32470    ;;
32471  --*=)
32472    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32473    ac_optarg=
32474    ac_shift=:
32475    ;;
32476  *)
32477    ac_option=$1
32478    ac_optarg=$2
32479    ac_shift=shift
32480    ;;
32481  esac
32482
32483  case $ac_option in
32484  # Handling of the options.
32485  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32486    ac_cs_recheck=: ;;
32487  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32488    $as_echo "$ac_cs_version"; exit ;;
32489  --config | --confi | --conf | --con | --co | --c )
32490    $as_echo "$ac_cs_config"; exit ;;
32491  --debug | --debu | --deb | --de | --d | -d )
32492    debug=: ;;
32493  --file | --fil | --fi | --f )
32494    $ac_shift
32495    case $ac_optarg in
32496    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32497    '') as_fn_error $? "missing file argument" ;;
32498    esac
32499    as_fn_append CONFIG_FILES " '$ac_optarg'"
32500    ac_need_defaults=false;;
32501  --header | --heade | --head | --hea )
32502    $ac_shift
32503    case $ac_optarg in
32504    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32505    esac
32506    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32507    ac_need_defaults=false;;
32508  --he | --h)
32509    # Conflict between --help and --header
32510    as_fn_error $? "ambiguous option: \`$1'
32511Try \`$0 --help' for more information.";;
32512  --help | --hel | -h )
32513    $as_echo "$ac_cs_usage"; exit ;;
32514  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32515  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32516    ac_cs_silent=: ;;
32517
32518  # This is an error.
32519  -*) as_fn_error $? "unrecognized option: \`$1'
32520Try \`$0 --help' for more information." ;;
32521
32522  *) as_fn_append ac_config_targets " $1"
32523     ac_need_defaults=false ;;
32524
32525  esac
32526  shift
32527done
32528
32529ac_configure_extra_args=
32530
32531if $ac_cs_silent; then
32532  exec 6>/dev/null
32533  ac_configure_extra_args="$ac_configure_extra_args --silent"
32534fi
32535
32536_ACEOF
32537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32538if \$ac_cs_recheck; then
32539  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32540  shift
32541  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32542  CONFIG_SHELL='$SHELL'
32543  export CONFIG_SHELL
32544  exec "\$@"
32545fi
32546
32547_ACEOF
32548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32549exec 5>>config.log
32550{
32551  echo
32552  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32553## Running $as_me. ##
32554_ASBOX
32555  $as_echo "$ac_log"
32556} >&5
32557
32558_ACEOF
32559cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32560_ACEOF
32561
32562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32563
32564# Handling of arguments.
32565for ac_config_target in $ac_config_targets
32566do
32567  case $ac_config_target in
32568    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32569    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32570    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32571    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32572    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32573    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32574    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32575
32576  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32577  esac
32578done
32579
32580
32581# If the user did not use the arguments to specify the items to instantiate,
32582# then the envvar interface is used.  Set only those that are not.
32583# We use the long form for the default assignment because of an extremely
32584# bizarre bug on SunOS 4.1.3.
32585if $ac_need_defaults; then
32586  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32587  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32588fi
32589
32590# Have a temporary directory for convenience.  Make it in the build tree
32591# simply because there is no reason against having it here, and in addition,
32592# creating and moving files from /tmp can sometimes cause problems.
32593# Hook for its removal unless debugging.
32594# Note that there is a small window in which the directory will not be cleaned:
32595# after its creation but before its name has been assigned to `$tmp'.
32596$debug ||
32597{
32598  tmp=
32599  trap 'exit_status=$?
32600  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32601' 0
32602  trap 'as_fn_exit 1' 1 2 13 15
32603}
32604# Create a (secure) tmp directory for tmp files.
32605
32606{
32607  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32608  test -n "$tmp" && test -d "$tmp"
32609}  ||
32610{
32611  tmp=./conf$$-$RANDOM
32612  (umask 077 && mkdir "$tmp")
32613} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32614
32615# Set up the scripts for CONFIG_FILES section.
32616# No need to generate them if there are no CONFIG_FILES.
32617# This happens for instance with `./config.status config.h'.
32618if test -n "$CONFIG_FILES"; then
32619
32620
32621ac_cr=`echo X | tr X '\015'`
32622# On cygwin, bash can eat \r inside `` if the user requested igncr.
32623# But we know of no other shell where ac_cr would be empty at this
32624# point, so we can use a bashism as a fallback.
32625if test "x$ac_cr" = x; then
32626  eval ac_cr=\$\'\\r\'
32627fi
32628ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32629if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32630  ac_cs_awk_cr='\\r'
32631else
32632  ac_cs_awk_cr=$ac_cr
32633fi
32634
32635echo 'BEGIN {' >"$tmp/subs1.awk" &&
32636_ACEOF
32637
32638
32639{
32640  echo "cat >conf$$subs.awk <<_ACEOF" &&
32641  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32642  echo "_ACEOF"
32643} >conf$$subs.sh ||
32644  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32645ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32646ac_delim='%!_!# '
32647for ac_last_try in false false false false false :; do
32648  . ./conf$$subs.sh ||
32649    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32650
32651  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32652  if test $ac_delim_n = $ac_delim_num; then
32653    break
32654  elif $ac_last_try; then
32655    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32656  else
32657    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32658  fi
32659done
32660rm -f conf$$subs.sh
32661
32662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32663cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32664_ACEOF
32665sed -n '
32666h
32667s/^/S["/; s/!.*/"]=/
32668p
32669g
32670s/^[^!]*!//
32671:repl
32672t repl
32673s/'"$ac_delim"'$//
32674t delim
32675:nl
32676h
32677s/\(.\{148\}\)..*/\1/
32678t more1
32679s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32680p
32681n
32682b repl
32683:more1
32684s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32685p
32686g
32687s/.\{148\}//
32688t nl
32689:delim
32690h
32691s/\(.\{148\}\)..*/\1/
32692t more2
32693s/["\\]/\\&/g; s/^/"/; s/$/"/
32694p
32695b
32696:more2
32697s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32698p
32699g
32700s/.\{148\}//
32701t delim
32702' <conf$$subs.awk | sed '
32703/^[^""]/{
32704  N
32705  s/\n//
32706}
32707' >>$CONFIG_STATUS || ac_write_fail=1
32708rm -f conf$$subs.awk
32709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32710_ACAWK
32711cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32712  for (key in S) S_is_set[key] = 1
32713  FS = ""
32714
32715}
32716{
32717  line = $ 0
32718  nfields = split(line, field, "@")
32719  substed = 0
32720  len = length(field[1])
32721  for (i = 2; i < nfields; i++) {
32722    key = field[i]
32723    keylen = length(key)
32724    if (S_is_set[key]) {
32725      value = S[key]
32726      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32727      len += length(value) + length(field[++i])
32728      substed = 1
32729    } else
32730      len += 1 + keylen
32731  }
32732
32733  print line
32734}
32735
32736_ACAWK
32737_ACEOF
32738cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32739if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32740  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32741else
32742  cat
32743fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32744  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32745_ACEOF
32746
32747# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32748# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32749# trailing colons and then remove the whole line if VPATH becomes empty
32750# (actually we leave an empty line to preserve line numbers).
32751if test "x$srcdir" = x.; then
32752  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32753h
32754s///
32755s/^/:/
32756s/[	 ]*$/:/
32757s/:\$(srcdir):/:/g
32758s/:\${srcdir}:/:/g
32759s/:@srcdir@:/:/g
32760s/^:*//
32761s/:*$//
32762x
32763s/\(=[	 ]*\).*/\1/
32764G
32765s/\n//
32766s/^[^=]*=[	 ]*$//
32767}'
32768fi
32769
32770cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32771fi # test -n "$CONFIG_FILES"
32772
32773# Set up the scripts for CONFIG_HEADERS section.
32774# No need to generate them if there are no CONFIG_HEADERS.
32775# This happens for instance with `./config.status Makefile'.
32776if test -n "$CONFIG_HEADERS"; then
32777cat >"$tmp/defines.awk" <<\_ACAWK ||
32778BEGIN {
32779_ACEOF
32780
32781# Transform confdefs.h into an awk script `defines.awk', embedded as
32782# here-document in config.status, that substitutes the proper values into
32783# config.h.in to produce config.h.
32784
32785# Create a delimiter string that does not exist in confdefs.h, to ease
32786# handling of long lines.
32787ac_delim='%!_!# '
32788for ac_last_try in false false :; do
32789  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32790  if test -z "$ac_t"; then
32791    break
32792  elif $ac_last_try; then
32793    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32794  else
32795    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32796  fi
32797done
32798
32799# For the awk script, D is an array of macro values keyed by name,
32800# likewise P contains macro parameters if any.  Preserve backslash
32801# newline sequences.
32802
32803ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32804sed -n '
32805s/.\{148\}/&'"$ac_delim"'/g
32806t rset
32807:rset
32808s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32809t def
32810d
32811:def
32812s/\\$//
32813t bsnl
32814s/["\\]/\\&/g
32815s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32816D["\1"]=" \3"/p
32817s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32818d
32819:bsnl
32820s/["\\]/\\&/g
32821s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32822D["\1"]=" \3\\\\\\n"\\/p
32823t cont
32824s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32825t cont
32826d
32827:cont
32828n
32829s/.\{148\}/&'"$ac_delim"'/g
32830t clear
32831:clear
32832s/\\$//
32833t bsnlc
32834s/["\\]/\\&/g; s/^/"/; s/$/"/p
32835d
32836:bsnlc
32837s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32838b cont
32839' <confdefs.h | sed '
32840s/'"$ac_delim"'/"\\\
32841"/g' >>$CONFIG_STATUS || ac_write_fail=1
32842
32843cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32844  for (key in D) D_is_set[key] = 1
32845  FS = ""
32846}
32847/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32848  line = \$ 0
32849  split(line, arg, " ")
32850  if (arg[1] == "#") {
32851    defundef = arg[2]
32852    mac1 = arg[3]
32853  } else {
32854    defundef = substr(arg[1], 2)
32855    mac1 = arg[2]
32856  }
32857  split(mac1, mac2, "(") #)
32858  macro = mac2[1]
32859  prefix = substr(line, 1, index(line, defundef) - 1)
32860  if (D_is_set[macro]) {
32861    # Preserve the white space surrounding the "#".
32862    print prefix "define", macro P[macro] D[macro]
32863    next
32864  } else {
32865    # Replace #undef with comments.  This is necessary, for example,
32866    # in the case of _POSIX_SOURCE, which is predefined and required
32867    # on some systems where configure will not decide to define it.
32868    if (defundef == "undef") {
32869      print "/*", prefix defundef, macro, "*/"
32870      next
32871    }
32872  }
32873}
32874{ print }
32875_ACAWK
32876_ACEOF
32877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32878  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32879fi # test -n "$CONFIG_HEADERS"
32880
32881
32882eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32883shift
32884for ac_tag
32885do
32886  case $ac_tag in
32887  :[FHLC]) ac_mode=$ac_tag; continue;;
32888  esac
32889  case $ac_mode$ac_tag in
32890  :[FHL]*:*);;
32891  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32892  :[FH]-) ac_tag=-:-;;
32893  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32894  esac
32895  ac_save_IFS=$IFS
32896  IFS=:
32897  set x $ac_tag
32898  IFS=$ac_save_IFS
32899  shift
32900  ac_file=$1
32901  shift
32902
32903  case $ac_mode in
32904  :L) ac_source=$1;;
32905  :[FH])
32906    ac_file_inputs=
32907    for ac_f
32908    do
32909      case $ac_f in
32910      -) ac_f="$tmp/stdin";;
32911      *) # Look for the file first in the build tree, then in the source tree
32912	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32913	 # because $ac_f cannot contain `:'.
32914	 test -f "$ac_f" ||
32915	   case $ac_f in
32916	   [\\/$]*) false;;
32917	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32918	   esac ||
32919	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32920      esac
32921      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32922      as_fn_append ac_file_inputs " '$ac_f'"
32923    done
32924
32925    # Let's still pretend it is `configure' which instantiates (i.e., don't
32926    # use $as_me), people would be surprised to read:
32927    #    /* config.h.  Generated by config.status.  */
32928    configure_input='Generated from '`
32929	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32930	`' by configure.'
32931    if test x"$ac_file" != x-; then
32932      configure_input="$ac_file.  $configure_input"
32933      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32934$as_echo "$as_me: creating $ac_file" >&6;}
32935    fi
32936    # Neutralize special characters interpreted by sed in replacement strings.
32937    case $configure_input in #(
32938    *\&* | *\|* | *\\* )
32939       ac_sed_conf_input=`$as_echo "$configure_input" |
32940       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32941    *) ac_sed_conf_input=$configure_input;;
32942    esac
32943
32944    case $ac_tag in
32945    *:-:* | *:-) cat >"$tmp/stdin" \
32946      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32947    esac
32948    ;;
32949  esac
32950
32951  ac_dir=`$as_dirname -- "$ac_file" ||
32952$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32953	 X"$ac_file" : 'X\(//\)[^/]' \| \
32954	 X"$ac_file" : 'X\(//\)$' \| \
32955	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32956$as_echo X"$ac_file" |
32957    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32958	    s//\1/
32959	    q
32960	  }
32961	  /^X\(\/\/\)[^/].*/{
32962	    s//\1/
32963	    q
32964	  }
32965	  /^X\(\/\/\)$/{
32966	    s//\1/
32967	    q
32968	  }
32969	  /^X\(\/\).*/{
32970	    s//\1/
32971	    q
32972	  }
32973	  s/.*/./; q'`
32974  as_dir="$ac_dir"; as_fn_mkdir_p
32975  ac_builddir=.
32976
32977case "$ac_dir" in
32978.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32979*)
32980  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32981  # A ".." for each directory in $ac_dir_suffix.
32982  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32983  case $ac_top_builddir_sub in
32984  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32985  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32986  esac ;;
32987esac
32988ac_abs_top_builddir=$ac_pwd
32989ac_abs_builddir=$ac_pwd$ac_dir_suffix
32990# for backward compatibility:
32991ac_top_builddir=$ac_top_build_prefix
32992
32993case $srcdir in
32994  .)  # We are building in place.
32995    ac_srcdir=.
32996    ac_top_srcdir=$ac_top_builddir_sub
32997    ac_abs_top_srcdir=$ac_pwd ;;
32998  [\\/]* | ?:[\\/]* )  # Absolute name.
32999    ac_srcdir=$srcdir$ac_dir_suffix;
33000    ac_top_srcdir=$srcdir
33001    ac_abs_top_srcdir=$srcdir ;;
33002  *) # Relative name.
33003    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33004    ac_top_srcdir=$ac_top_build_prefix$srcdir
33005    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33006esac
33007ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33008
33009
33010  case $ac_mode in
33011  :F)
33012  #
33013  # CONFIG_FILE
33014  #
33015
33016_ACEOF
33017
33018cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33019# If the template does not know about datarootdir, expand it.
33020# FIXME: This hack should be removed a few years after 2.60.
33021ac_datarootdir_hack=; ac_datarootdir_seen=
33022ac_sed_dataroot='
33023/datarootdir/ {
33024  p
33025  q
33026}
33027/@datadir@/p
33028/@docdir@/p
33029/@infodir@/p
33030/@localedir@/p
33031/@mandir@/p'
33032case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33033*datarootdir*) ac_datarootdir_seen=yes;;
33034*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33035  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33036$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33037_ACEOF
33038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33039  ac_datarootdir_hack='
33040  s&@datadir@&$datadir&g
33041  s&@docdir@&$docdir&g
33042  s&@infodir@&$infodir&g
33043  s&@localedir@&$localedir&g
33044  s&@mandir@&$mandir&g
33045  s&\\\${datarootdir}&$datarootdir&g' ;;
33046esac
33047_ACEOF
33048
33049# Neutralize VPATH when `$srcdir' = `.'.
33050# Shell code in configure.ac might set extrasub.
33051# FIXME: do we really want to maintain this feature?
33052cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33053ac_sed_extra="$ac_vpsub
33054$extrasub
33055_ACEOF
33056cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33057:t
33058/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33059s|@configure_input@|$ac_sed_conf_input|;t t
33060s&@top_builddir@&$ac_top_builddir_sub&;t t
33061s&@top_build_prefix@&$ac_top_build_prefix&;t t
33062s&@srcdir@&$ac_srcdir&;t t
33063s&@abs_srcdir@&$ac_abs_srcdir&;t t
33064s&@top_srcdir@&$ac_top_srcdir&;t t
33065s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33066s&@builddir@&$ac_builddir&;t t
33067s&@abs_builddir@&$ac_abs_builddir&;t t
33068s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33069$ac_datarootdir_hack
33070"
33071eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33072  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33073
33074test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33075  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33076  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33077  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33078which seems to be undefined.  Please make sure it is defined" >&5
33079$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33080which seems to be undefined.  Please make sure it is defined" >&2;}
33081
33082  rm -f "$tmp/stdin"
33083  case $ac_file in
33084  -) cat "$tmp/out" && rm -f "$tmp/out";;
33085  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33086  esac \
33087  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33088 ;;
33089  :H)
33090  #
33091  # CONFIG_HEADER
33092  #
33093  if test x"$ac_file" != x-; then
33094    {
33095      $as_echo "/* $configure_input  */" \
33096      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33097    } >"$tmp/config.h" \
33098      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33099    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33100      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33101$as_echo "$as_me: $ac_file is unchanged" >&6;}
33102    else
33103      rm -f "$ac_file"
33104      mv "$tmp/config.h" "$ac_file" \
33105	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33106    fi
33107  else
33108    $as_echo "/* $configure_input  */" \
33109      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33110      || as_fn_error $? "could not create -" "$LINENO" 5
33111  fi
33112 ;;
33113
33114
33115  esac
33116
33117done # for ac_tag
33118
33119
33120as_fn_exit 0
33121_ACEOF
33122ac_clean_files=$ac_clean_files_save
33123
33124test $ac_write_fail = 0 ||
33125  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33126
33127
33128# configure is writing to config.log, and then calls config.status.
33129# config.status does its own redirection, appending to config.log.
33130# Unfortunately, on DOS this fails, as config.log is still kept open
33131# by configure, so config.status won't be able to write to it; its
33132# output is simply discarded.  So we exec the FD to /dev/null,
33133# effectively closing config.log, so it can be properly (re)opened and
33134# appended to by config.status.  When coming back to configure, we
33135# need to make the FD available again.
33136if test "$no_create" != yes; then
33137  ac_cs_success=:
33138  ac_config_status_args=
33139  test "$silent" = yes &&
33140    ac_config_status_args="$ac_config_status_args --quiet"
33141  exec 5>/dev/null
33142  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33143  exec 5>>config.log
33144  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33145  # would make configure fail if this is the last instruction.
33146  $ac_cs_success || as_fn_exit 1
33147fi
33148if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33149  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33150$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33151fi
33152
33153
33154# Make the compare script executable
33155$CHMOD +x $OUTPUT_ROOT/compare.sh
33156
33157# Finally output some useful information to the user
33158
33159# Finally output some useful information to the user
33160
33161if test "x$CCACHE_FOUND" != x; then
33162	if  test "x$HAS_GOOD_CCACHE" = x; then
33163		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33164		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33165	else
33166		CCACHE_STATUS="installed and in use"
33167	fi
33168else
33169	if test "x$GCC" = xyes; then
33170		CCACHE_STATUS="not installed (consider installing)"
33171		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33172	else
33173		CCACHE_STATUS="not available for your system"
33174	fi
33175fi
33176
33177printf "\n"
33178printf "====================================================\n"
33179printf "A new configuration has been successfully created in\n"
33180printf "$OUTPUT_ROOT\n"
33181if test "x$CONFIGURE_COMMAND_LINE" != x; then
33182	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33183else
33184	printf "using default settings.\n"
33185fi
33186
33187printf "\n"
33188printf "Configuration summary:\n"
33189printf "* Debug level:    $DEBUG_LEVEL\n"
33190printf "* JDK variant:    $JDK_VARIANT\n"
33191printf "* JVM variants:   $with_jvm_variants\n"
33192printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33193
33194printf "\n"
33195printf "Tools summary:\n"
33196if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33197  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33198fi
33199printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33200printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33201printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33202
33203printf "\n"
33204printf "Build performance summary:\n"
33205printf "* Cores to use:   $JOBS\n"
33206printf "* Memory limit:   $MEMORY_SIZE MB\n"
33207printf "* ccache status:  $CCACHE_STATUS\n"
33208printf "\n"
33209
33210if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33211	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33212	printf "$CCACHE_HELP_MSG\n"
33213
33214    # Print a helpful message on how to acquire the necessary build dependency.
33215    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33216    MISSING_DEPENDENCY=ccache
33217    PKGHANDLER_COMMAND=
33218
33219    case $PKGHANDLER in
33220	apt-get)
33221                apt_help     $MISSING_DEPENDENCY ;;
33222    yum)
33223                yum_help     $MISSING_DEPENDENCY ;;
33224	port)
33225                port_help    $MISSING_DEPENDENCY ;;
33226	pkgutil)
33227                pkgutil_help $MISSING_DEPENDENCY ;;
33228	pkgadd)
33229                pkgadd_help  $MISSING_DEPENDENCY ;;
33230    * )
33231      break ;;
33232    esac
33233
33234    if test "x$PKGHANDLER_COMMAND" != x; then
33235        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33236    fi
33237
33238	printf "$HELP_MSG\n"
33239	printf "\n"
33240fi
33241
33242if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33243	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33244	printf "will result in longer build times.\n"
33245	printf "\n"
33246fi
33247
33248if test "x$FOUND_ALT_VARIABLES" != "x"; then
33249	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33250	printf "These are not respected, and will be ignored. It is recommended\n"
33251	printf "that you clean your environment. The following variables are set:\n"
33252	printf "$FOUND_ALT_VARIABLES\n"
33253	printf "\n"
33254fi
33255
33256if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33257	printf "WARNING: Your build output directory is not on a local disk.\n"
33258	printf "This will severely degrade build performance!\n"
33259	printf "It is recommended that you create an output directory on a local disk,\n"
33260	printf "and run the configure script again from that directory.\n"
33261	printf "\n"
33262fi
33263
33264if test "x$IS_RECONFIGURE" = "xyes"; then
33265	printf "WARNING: The result of this configuration has overridden an older\n"
33266	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33267	printf "proper build. Failure to do so might result in strange build problems.\n"
33268	printf "\n"
33269fi
33270
33271