generated-configure.sh revision 875:3dc55f0c1b6f
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711TOOLS_DIR_CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719ac_ct_PROPER_COMPILER_CC
720PROPER_COMPILER_CC
721POTENTIAL_CC
722TOOLS_DIR_CC
723BUILD_LD
724BUILD_CXX
725BUILD_CC
726MSVCR_DLL
727VS_PATH
728VS_LIB
729VS_INCLUDE
730CYGWIN_LINK
731AR_OUT_OPTION
732LD_OUT_OPTION
733EXE_OUT_OPTION
734CC_OUT_OPTION
735BUILD_HOTSPOT
736HOTSPOT_DIST
737BUILD_OUTPUT
738OVERRIDE_SRC_ROOT
739ADD_SRC_ROOT
740JDK_TOPDIR
741NASHORN_TOPDIR
742HOTSPOT_TOPDIR
743JAXWS_TOPDIR
744JAXP_TOPDIR
745CORBA_TOPDIR
746LANGTOOLS_TOPDIR
747BOOT_JDK_JVMARGS
748JAVAC_FLAGS
749BOOT_JDK_SOURCETARGET
750BOOT_JDK
751BOOT_TOOLSJAR
752BOOT_RTJAR
753JAVA_CHECK
754JAVAC_CHECK
755COOKED_BUILD_NUMBER
756JDK_VERSION
757COPYRIGHT_YEAR
758MACOSX_BUNDLE_ID_BASE
759MACOSX_BUNDLE_NAME_BASE
760COMPANY_NAME
761JDK_RC_PLATFORM_NAME
762PRODUCT_SUFFIX
763PRODUCT_NAME
764LAUNCHER_NAME
765MILESTONE
766JDK_BUILD_NUMBER
767JDK_UPDATE_VERSION
768JDK_MICRO_VERSION
769JDK_MINOR_VERSION
770JDK_MAJOR_VERSION
771USER_RELEASE_SUFFIX
772COMPRESS_JARS
773UNLIMITED_CRYPTO
774CACERTS_FILE
775TEST_IN_BUILD
776BUILD_HEADLESS
777SUPPORT_HEADFUL
778SUPPORT_HEADLESS
779BDEPS_FTP
780BDEPS_UNZIP
781OS_VERSION_MICRO
782OS_VERSION_MINOR
783OS_VERSION_MAJOR
784PKG_CONFIG
785TIME
786STAT
787HG
788READELF
789OTOOL
790LDD
791ZIP
792UNZIP
793FIND_DELETE
794MAKE
795CHECK_TOOLSDIR_MAKE
796CHECK_TOOLSDIR_GMAKE
797CHECK_MAKE
798CHECK_GMAKE
799PKGHANDLER
800OUTPUT_ROOT
801CONF_NAME
802SPEC
803BUILD_VARIANT_RELEASE
804DEBUG_CLASSFILES
805FASTDEBUG
806VARIANT
807DEBUG_LEVEL
808MACOSX_UNIVERSAL
809JVM_VARIANT_ZEROSHARK
810JVM_VARIANT_ZERO
811JVM_VARIANT_KERNEL
812JVM_VARIANT_MINIMAL1
813JVM_VARIANT_CLIENT
814JVM_VARIANT_SERVER
815JVM_VARIANTS
816JDK_VARIANT
817SET_OPENJDK
818BUILD_LOG_WRAPPER
819BUILD_LOG_PREVIOUS
820BUILD_LOG
821SYS_ROOT
822PATH_SEP
823SRC_ROOT
824DEFINE_CROSS_COMPILE_ARCH
825LP64
826OPENJDK_TARGET_OS_API_DIR
827OPENJDK_TARGET_CPU_JLI_CFLAGS
828OPENJDK_TARGET_CPU_OSARCH
829OPENJDK_TARGET_CPU_ISADIR
830OPENJDK_TARGET_CPU_LIBDIR
831OPENJDK_TARGET_CPU_LEGACY_LIB
832OPENJDK_TARGET_CPU_LEGACY
833REQUIRED_OS_VERSION
834REQUIRED_OS_NAME
835COMPILE_TYPE
836OPENJDK_TARGET_CPU_ENDIAN
837OPENJDK_TARGET_CPU_BITS
838OPENJDK_TARGET_CPU_ARCH
839OPENJDK_TARGET_CPU
840OPENJDK_TARGET_OS_API
841OPENJDK_TARGET_OS
842OPENJDK_BUILD_CPU_ENDIAN
843OPENJDK_BUILD_CPU_BITS
844OPENJDK_BUILD_CPU_ARCH
845OPENJDK_BUILD_CPU
846OPENJDK_BUILD_OS_API
847OPENJDK_BUILD_OS
848OPENJDK_BUILD_AUTOCONF_NAME
849OPENJDK_TARGET_AUTOCONF_NAME
850target_os
851target_vendor
852target_cpu
853target
854host_os
855host_vendor
856host_cpu
857host
858build_os
859build_vendor
860build_cpu
861build
862SETFILE
863DF
864READLINK
865CYGPATH
866NAWK
867SED
868FGREP
869EGREP
870GREP
871AWK
872XARGS
873WHICH
874WC
875UNIQ
876UNAME
877TR
878TOUCH
879TEE
880TAR
881TAIL
882SORT
883SH
884RM
885THEPWDCMD
886PRINTF
887MV
888MKTEMP
889MKDIR
890LS
891LN
892HEAD
893FIND
894FILE
895EXPR
896ECHO
897DIRNAME
898DIFF
899DATE
900CUT
901CPIO
902CP
903COMM
904CMP
905CHMOD
906CAT
907BASH
908BASENAME
909DATE_WHEN_CONFIGURED
910CONFIGURE_COMMAND_LINE
911CUSTOM_MAKE_DIR
912target_alias
913host_alias
914build_alias
915LIBS
916ECHO_T
917ECHO_N
918ECHO_C
919DEFS
920mandir
921localedir
922libdir
923psdir
924pdfdir
925dvidir
926htmldir
927infodir
928docdir
929oldincludedir
930includedir
931localstatedir
932sharedstatedir
933sysconfdir
934datadir
935datarootdir
936libexecdir
937sbindir
938bindir
939program_transform_name
940prefix
941exec_prefix
942PACKAGE_URL
943PACKAGE_BUGREPORT
944PACKAGE_STRING
945PACKAGE_VERSION
946PACKAGE_TARNAME
947PACKAGE_NAME
948PATH_SEPARATOR
949SHELL'
950ac_subst_files=''
951ac_user_opts='
952enable_option_checking
953with_custom_make_dir
954with_target_bits
955with_sys_root
956with_tools_dir
957with_devkit
958enable_openjdk_only
959with_jdk_variant
960with_jvm_variants
961enable_debug
962with_debug_level
963with_conf_name
964with_builddeps_conf
965with_builddeps_server
966with_builddeps_dir
967with_builddeps_group
968enable_headful
969enable_hotspot_test_in_build
970with_cacerts_file
971enable_unlimited_crypto
972with_milestone
973with_build_number
974with_user_release_suffix
975with_boot_jdk
976with_boot_jdk_jvmargs
977with_add_source_root
978with_override_source_root
979with_adds_and_overrides
980with_override_langtools
981with_override_corba
982with_override_jaxp
983with_override_jaxws
984with_override_hotspot
985with_override_jdk
986with_import_hotspot
987with_msvcr_dll
988with_extra_cflags
989with_extra_cxxflags
990with_extra_ldflags
991enable_debug_symbols
992enable_zip_debug_info
993enable_macosx_runtime_support
994with_x
995with_cups
996with_cups_include
997with_freetype
998with_alsa
999with_alsa_include
1000with_alsa_lib
1001with_zlib
1002with_stdc__lib
1003with_num_cores
1004with_memory_size
1005with_sjavac_server_java
1006with_sjavac_server_cores
1007enable_sjavac
1008enable_precompiled_headers
1009enable_ccache
1010with_ccache_dir
1011'
1012      ac_precious_vars='build_alias
1013host_alias
1014target_alias
1015PKG_CONFIG
1016CC
1017CFLAGS
1018LDFLAGS
1019LIBS
1020CPPFLAGS
1021CXX
1022CXXFLAGS
1023CCC
1024OBJC
1025OBJCFLAGS
1026CPP
1027CXXCPP
1028XMKMF
1029FREETYPE2_CFLAGS
1030FREETYPE2_LIBS
1031ALSA_CFLAGS
1032ALSA_LIBS'
1033
1034
1035# Initialize some variables set by options.
1036ac_init_help=
1037ac_init_version=false
1038ac_unrecognized_opts=
1039ac_unrecognized_sep=
1040# The variables have the same names as the options, with
1041# dashes changed to underlines.
1042cache_file=/dev/null
1043exec_prefix=NONE
1044no_create=
1045no_recursion=
1046prefix=NONE
1047program_prefix=NONE
1048program_suffix=NONE
1049program_transform_name=s,x,x,
1050silent=
1051site=
1052srcdir=
1053verbose=
1054x_includes=NONE
1055x_libraries=NONE
1056
1057# Installation directory options.
1058# These are left unexpanded so users can "make install exec_prefix=/foo"
1059# and all the variables that are supposed to be based on exec_prefix
1060# by default will actually change.
1061# Use braces instead of parens because sh, perl, etc. also accept them.
1062# (The list follows the same order as the GNU Coding Standards.)
1063bindir='${exec_prefix}/bin'
1064sbindir='${exec_prefix}/sbin'
1065libexecdir='${exec_prefix}/libexec'
1066datarootdir='${prefix}/share'
1067datadir='${datarootdir}'
1068sysconfdir='${prefix}/etc'
1069sharedstatedir='${prefix}/com'
1070localstatedir='${prefix}/var'
1071includedir='${prefix}/include'
1072oldincludedir='/usr/include'
1073docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1074infodir='${datarootdir}/info'
1075htmldir='${docdir}'
1076dvidir='${docdir}'
1077pdfdir='${docdir}'
1078psdir='${docdir}'
1079libdir='${exec_prefix}/lib'
1080localedir='${datarootdir}/locale'
1081mandir='${datarootdir}/man'
1082
1083ac_prev=
1084ac_dashdash=
1085for ac_option
1086do
1087  # If the previous option needs an argument, assign it.
1088  if test -n "$ac_prev"; then
1089    eval $ac_prev=\$ac_option
1090    ac_prev=
1091    continue
1092  fi
1093
1094  case $ac_option in
1095  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1096  *=)   ac_optarg= ;;
1097  *)    ac_optarg=yes ;;
1098  esac
1099
1100  # Accept the important Cygnus configure options, so we can diagnose typos.
1101
1102  case $ac_dashdash$ac_option in
1103  --)
1104    ac_dashdash=yes ;;
1105
1106  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1107    ac_prev=bindir ;;
1108  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1109    bindir=$ac_optarg ;;
1110
1111  -build | --build | --buil | --bui | --bu)
1112    ac_prev=build_alias ;;
1113  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1114    build_alias=$ac_optarg ;;
1115
1116  -cache-file | --cache-file | --cache-fil | --cache-fi \
1117  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1118    ac_prev=cache_file ;;
1119  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1120  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1121    cache_file=$ac_optarg ;;
1122
1123  --config-cache | -C)
1124    cache_file=config.cache ;;
1125
1126  -datadir | --datadir | --datadi | --datad)
1127    ac_prev=datadir ;;
1128  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1129    datadir=$ac_optarg ;;
1130
1131  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1132  | --dataroo | --dataro | --datar)
1133    ac_prev=datarootdir ;;
1134  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1135  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1136    datarootdir=$ac_optarg ;;
1137
1138  -disable-* | --disable-*)
1139    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1140    # Reject names that are not valid shell variable names.
1141    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1142      as_fn_error $? "invalid feature name: $ac_useropt"
1143    ac_useropt_orig=$ac_useropt
1144    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145    case $ac_user_opts in
1146      *"
1147"enable_$ac_useropt"
1148"*) ;;
1149      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1150	 ac_unrecognized_sep=', ';;
1151    esac
1152    eval enable_$ac_useropt=no ;;
1153
1154  -docdir | --docdir | --docdi | --doc | --do)
1155    ac_prev=docdir ;;
1156  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1157    docdir=$ac_optarg ;;
1158
1159  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1160    ac_prev=dvidir ;;
1161  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1162    dvidir=$ac_optarg ;;
1163
1164  -enable-* | --enable-*)
1165    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1166    # Reject names that are not valid shell variable names.
1167    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168      as_fn_error $? "invalid feature name: $ac_useropt"
1169    ac_useropt_orig=$ac_useropt
1170    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171    case $ac_user_opts in
1172      *"
1173"enable_$ac_useropt"
1174"*) ;;
1175      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1176	 ac_unrecognized_sep=', ';;
1177    esac
1178    eval enable_$ac_useropt=\$ac_optarg ;;
1179
1180  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1181  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1182  | --exec | --exe | --ex)
1183    ac_prev=exec_prefix ;;
1184  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1185  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1186  | --exec=* | --exe=* | --ex=*)
1187    exec_prefix=$ac_optarg ;;
1188
1189  -gas | --gas | --ga | --g)
1190    # Obsolete; use --with-gas.
1191    with_gas=yes ;;
1192
1193  -help | --help | --hel | --he | -h)
1194    ac_init_help=long ;;
1195  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1196    ac_init_help=recursive ;;
1197  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1198    ac_init_help=short ;;
1199
1200  -host | --host | --hos | --ho)
1201    ac_prev=host_alias ;;
1202  -host=* | --host=* | --hos=* | --ho=*)
1203    host_alias=$ac_optarg ;;
1204
1205  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1206    ac_prev=htmldir ;;
1207  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1208  | --ht=*)
1209    htmldir=$ac_optarg ;;
1210
1211  -includedir | --includedir | --includedi | --included | --include \
1212  | --includ | --inclu | --incl | --inc)
1213    ac_prev=includedir ;;
1214  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1215  | --includ=* | --inclu=* | --incl=* | --inc=*)
1216    includedir=$ac_optarg ;;
1217
1218  -infodir | --infodir | --infodi | --infod | --info | --inf)
1219    ac_prev=infodir ;;
1220  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1221    infodir=$ac_optarg ;;
1222
1223  -libdir | --libdir | --libdi | --libd)
1224    ac_prev=libdir ;;
1225  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1226    libdir=$ac_optarg ;;
1227
1228  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1229  | --libexe | --libex | --libe)
1230    ac_prev=libexecdir ;;
1231  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1232  | --libexe=* | --libex=* | --libe=*)
1233    libexecdir=$ac_optarg ;;
1234
1235  -localedir | --localedir | --localedi | --localed | --locale)
1236    ac_prev=localedir ;;
1237  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1238    localedir=$ac_optarg ;;
1239
1240  -localstatedir | --localstatedir | --localstatedi | --localstated \
1241  | --localstate | --localstat | --localsta | --localst | --locals)
1242    ac_prev=localstatedir ;;
1243  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1244  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1245    localstatedir=$ac_optarg ;;
1246
1247  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1248    ac_prev=mandir ;;
1249  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1250    mandir=$ac_optarg ;;
1251
1252  -nfp | --nfp | --nf)
1253    # Obsolete; use --without-fp.
1254    with_fp=no ;;
1255
1256  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1257  | --no-cr | --no-c | -n)
1258    no_create=yes ;;
1259
1260  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1261  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1262    no_recursion=yes ;;
1263
1264  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1265  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1266  | --oldin | --oldi | --old | --ol | --o)
1267    ac_prev=oldincludedir ;;
1268  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1269  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1270  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1271    oldincludedir=$ac_optarg ;;
1272
1273  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1274    ac_prev=prefix ;;
1275  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1276    prefix=$ac_optarg ;;
1277
1278  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1279  | --program-pre | --program-pr | --program-p)
1280    ac_prev=program_prefix ;;
1281  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1282  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1283    program_prefix=$ac_optarg ;;
1284
1285  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1286  | --program-suf | --program-su | --program-s)
1287    ac_prev=program_suffix ;;
1288  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1289  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1290    program_suffix=$ac_optarg ;;
1291
1292  -program-transform-name | --program-transform-name \
1293  | --program-transform-nam | --program-transform-na \
1294  | --program-transform-n | --program-transform- \
1295  | --program-transform | --program-transfor \
1296  | --program-transfo | --program-transf \
1297  | --program-trans | --program-tran \
1298  | --progr-tra | --program-tr | --program-t)
1299    ac_prev=program_transform_name ;;
1300  -program-transform-name=* | --program-transform-name=* \
1301  | --program-transform-nam=* | --program-transform-na=* \
1302  | --program-transform-n=* | --program-transform-=* \
1303  | --program-transform=* | --program-transfor=* \
1304  | --program-transfo=* | --program-transf=* \
1305  | --program-trans=* | --program-tran=* \
1306  | --progr-tra=* | --program-tr=* | --program-t=*)
1307    program_transform_name=$ac_optarg ;;
1308
1309  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1310    ac_prev=pdfdir ;;
1311  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1312    pdfdir=$ac_optarg ;;
1313
1314  -psdir | --psdir | --psdi | --psd | --ps)
1315    ac_prev=psdir ;;
1316  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1317    psdir=$ac_optarg ;;
1318
1319  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1320  | -silent | --silent | --silen | --sile | --sil)
1321    silent=yes ;;
1322
1323  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1324    ac_prev=sbindir ;;
1325  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1326  | --sbi=* | --sb=*)
1327    sbindir=$ac_optarg ;;
1328
1329  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1330  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1331  | --sharedst | --shareds | --shared | --share | --shar \
1332  | --sha | --sh)
1333    ac_prev=sharedstatedir ;;
1334  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1335  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1336  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1337  | --sha=* | --sh=*)
1338    sharedstatedir=$ac_optarg ;;
1339
1340  -site | --site | --sit)
1341    ac_prev=site ;;
1342  -site=* | --site=* | --sit=*)
1343    site=$ac_optarg ;;
1344
1345  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1346    ac_prev=srcdir ;;
1347  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1348    srcdir=$ac_optarg ;;
1349
1350  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1351  | --syscon | --sysco | --sysc | --sys | --sy)
1352    ac_prev=sysconfdir ;;
1353  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1354  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1355    sysconfdir=$ac_optarg ;;
1356
1357  -target | --target | --targe | --targ | --tar | --ta | --t)
1358    ac_prev=target_alias ;;
1359  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1360    target_alias=$ac_optarg ;;
1361
1362  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1363    verbose=yes ;;
1364
1365  -version | --version | --versio | --versi | --vers | -V)
1366    ac_init_version=: ;;
1367
1368  -with-* | --with-*)
1369    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1370    # Reject names that are not valid shell variable names.
1371    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1372      as_fn_error $? "invalid package name: $ac_useropt"
1373    ac_useropt_orig=$ac_useropt
1374    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1375    case $ac_user_opts in
1376      *"
1377"with_$ac_useropt"
1378"*) ;;
1379      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1380	 ac_unrecognized_sep=', ';;
1381    esac
1382    eval with_$ac_useropt=\$ac_optarg ;;
1383
1384  -without-* | --without-*)
1385    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1386    # Reject names that are not valid shell variable names.
1387    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1388      as_fn_error $? "invalid package name: $ac_useropt"
1389    ac_useropt_orig=$ac_useropt
1390    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1391    case $ac_user_opts in
1392      *"
1393"with_$ac_useropt"
1394"*) ;;
1395      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1396	 ac_unrecognized_sep=', ';;
1397    esac
1398    eval with_$ac_useropt=no ;;
1399
1400  --x)
1401    # Obsolete; use --with-x.
1402    with_x=yes ;;
1403
1404  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1405  | --x-incl | --x-inc | --x-in | --x-i)
1406    ac_prev=x_includes ;;
1407  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1408  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1409    x_includes=$ac_optarg ;;
1410
1411  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1412  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1413    ac_prev=x_libraries ;;
1414  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1415  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1416    x_libraries=$ac_optarg ;;
1417
1418  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1419Try \`$0 --help' for more information"
1420    ;;
1421
1422  *=*)
1423    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1424    # Reject names that are not valid shell variable names.
1425    case $ac_envvar in #(
1426      '' | [0-9]* | *[!_$as_cr_alnum]* )
1427      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1428    esac
1429    eval $ac_envvar=\$ac_optarg
1430    export $ac_envvar ;;
1431
1432  *)
1433    # FIXME: should be removed in autoconf 3.0.
1434    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1435    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1436      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1437    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1438    ;;
1439
1440  esac
1441done
1442
1443if test -n "$ac_prev"; then
1444  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1445  as_fn_error $? "missing argument to $ac_option"
1446fi
1447
1448if test -n "$ac_unrecognized_opts"; then
1449  case $enable_option_checking in
1450    no) ;;
1451    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1452    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1453  esac
1454fi
1455
1456# Check all directory arguments for consistency.
1457for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1458		datadir sysconfdir sharedstatedir localstatedir includedir \
1459		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1460		libdir localedir mandir
1461do
1462  eval ac_val=\$$ac_var
1463  # Remove trailing slashes.
1464  case $ac_val in
1465    */ )
1466      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1467      eval $ac_var=\$ac_val;;
1468  esac
1469  # Be sure to have absolute directory names.
1470  case $ac_val in
1471    [\\/$]* | ?:[\\/]* )  continue;;
1472    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1473  esac
1474  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1475done
1476
1477# There might be people who depend on the old broken behavior: `$host'
1478# used to hold the argument of --host etc.
1479# FIXME: To remove some day.
1480build=$build_alias
1481host=$host_alias
1482target=$target_alias
1483
1484# FIXME: To remove some day.
1485if test "x$host_alias" != x; then
1486  if test "x$build_alias" = x; then
1487    cross_compiling=maybe
1488    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1489    If a cross compiler is detected then cross compile mode will be used" >&2
1490  elif test "x$build_alias" != "x$host_alias"; then
1491    cross_compiling=yes
1492  fi
1493fi
1494
1495ac_tool_prefix=
1496test -n "$host_alias" && ac_tool_prefix=$host_alias-
1497
1498test "$silent" = yes && exec 6>/dev/null
1499
1500
1501ac_pwd=`pwd` && test -n "$ac_pwd" &&
1502ac_ls_di=`ls -di .` &&
1503ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1504  as_fn_error $? "working directory cannot be determined"
1505test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1506  as_fn_error $? "pwd does not report name of working directory"
1507
1508
1509# Find the source files, if location was not specified.
1510if test -z "$srcdir"; then
1511  ac_srcdir_defaulted=yes
1512  # Try the directory containing this script, then the parent directory.
1513  ac_confdir=`$as_dirname -- "$as_myself" ||
1514$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1515	 X"$as_myself" : 'X\(//\)[^/]' \| \
1516	 X"$as_myself" : 'X\(//\)$' \| \
1517	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1518$as_echo X"$as_myself" |
1519    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1520	    s//\1/
1521	    q
1522	  }
1523	  /^X\(\/\/\)[^/].*/{
1524	    s//\1/
1525	    q
1526	  }
1527	  /^X\(\/\/\)$/{
1528	    s//\1/
1529	    q
1530	  }
1531	  /^X\(\/\).*/{
1532	    s//\1/
1533	    q
1534	  }
1535	  s/.*/./; q'`
1536  srcdir=$ac_confdir
1537  if test ! -r "$srcdir/$ac_unique_file"; then
1538    srcdir=..
1539  fi
1540else
1541  ac_srcdir_defaulted=no
1542fi
1543if test ! -r "$srcdir/$ac_unique_file"; then
1544  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1545  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1546fi
1547ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1548ac_abs_confdir=`(
1549	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1550	pwd)`
1551# When building in place, set srcdir=.
1552if test "$ac_abs_confdir" = "$ac_pwd"; then
1553  srcdir=.
1554fi
1555# Remove unnecessary trailing slashes from srcdir.
1556# Double slashes in file names in object file debugging info
1557# mess up M-x gdb in Emacs.
1558case $srcdir in
1559*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1560esac
1561for ac_var in $ac_precious_vars; do
1562  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1563  eval ac_env_${ac_var}_value=\$${ac_var}
1564  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1565  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1566done
1567
1568#
1569# Report the --help message.
1570#
1571if test "$ac_init_help" = "long"; then
1572  # Omit some internal or obsolete options to make the list less imposing.
1573  # This message is too long to be a string in the A/UX 3.1 sh.
1574  cat <<_ACEOF
1575\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1576
1577Usage: $0 [OPTION]... [VAR=VALUE]...
1578
1579To assign environment variables (e.g., CC, CFLAGS...), specify them as
1580VAR=VALUE.  See below for descriptions of some of the useful variables.
1581
1582Defaults for the options are specified in brackets.
1583
1584Configuration:
1585  -h, --help              display this help and exit
1586      --help=short        display options specific to this package
1587      --help=recursive    display the short help of all the included packages
1588  -V, --version           display version information and exit
1589  -q, --quiet, --silent   do not print \`checking ...' messages
1590      --cache-file=FILE   cache test results in FILE [disabled]
1591  -C, --config-cache      alias for \`--cache-file=config.cache'
1592  -n, --no-create         do not create output files
1593      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1594
1595Installation directories:
1596  --prefix=PREFIX         install architecture-independent files in PREFIX
1597                          [$ac_default_prefix]
1598  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1599                          [PREFIX]
1600
1601By default, \`make install' will install all the files in
1602\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1603an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1604for instance \`--prefix=\$HOME'.
1605
1606For better control, use the options below.
1607
1608Fine tuning of the installation directories:
1609  --bindir=DIR            user executables [EPREFIX/bin]
1610  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1611  --libexecdir=DIR        program executables [EPREFIX/libexec]
1612  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1613  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1614  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1615  --libdir=DIR            object code libraries [EPREFIX/lib]
1616  --includedir=DIR        C header files [PREFIX/include]
1617  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1618  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1619  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1620  --infodir=DIR           info documentation [DATAROOTDIR/info]
1621  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1622  --mandir=DIR            man documentation [DATAROOTDIR/man]
1623  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1624  --htmldir=DIR           html documentation [DOCDIR]
1625  --dvidir=DIR            dvi documentation [DOCDIR]
1626  --pdfdir=DIR            pdf documentation [DOCDIR]
1627  --psdir=DIR             ps documentation [DOCDIR]
1628_ACEOF
1629
1630  cat <<\_ACEOF
1631
1632X features:
1633  --x-includes=DIR    X include files are in DIR
1634  --x-libraries=DIR   X library files are in DIR
1635
1636System types:
1637  --build=BUILD     configure for building on BUILD [guessed]
1638  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1639  --target=TARGET   configure for building compilers for TARGET [HOST]
1640_ACEOF
1641fi
1642
1643if test -n "$ac_init_help"; then
1644  case $ac_init_help in
1645     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1646   esac
1647  cat <<\_ACEOF
1648
1649Optional Features:
1650  --disable-option-checking  ignore unrecognized --enable/--with options
1651  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1652  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1653  --enable-openjdk-only   suppress building custom source even if present
1654                          [disabled]
1655  --enable-debug          set the debug level to fastdebug (shorthand for
1656                          --with-debug-level=fastdebug) [disabled]
1657  --disable-headful       disable building headful support (graphical UI
1658                          support) [enabled]
1659  --enable-hotspot-test-in-build
1660                          run the Queens test after Hotspot build [disabled]
1661  --enable-unlimited-crypto
1662                          Enable unlimited crypto policy [disabled]
1663  --disable-debug-symbols disable generation of debug symbols [enabled]
1664  --disable-zip-debug-info
1665                          disable zipping of debug-info files [enabled]
1666  --disable-macosx-runtime-support
1667                          disable the use of MacOSX Java runtime support
1668                          framework [enabled]
1669  --enable-sjavac         use sjavac to do fast incremental compiles
1670                          [disabled]
1671  --disable-precompiled-headers
1672                          disable using precompiled headers when compiling C++
1673                          [enabled]
1674  --disable-ccache        disable using ccache to speed up recompilations
1675                          [enabled]
1676
1677Optional Packages:
1678  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1679  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1680  --with-custom-make-dir  use this directory for custom build/make files
1681  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1682                          support it), e.g. --with-target-bits=32 [guessed]
1683  --with-sys-root         pass this sys-root to the compilers and tools (for
1684                          cross-compiling)
1685  --with-tools-dir        search this directory for compilers and tools (for
1686                          cross-compiling)
1687  --with-devkit           use this directory as base for tools-dir and
1688                          sys-root (for cross-compiling)
1689  --with-jdk-variant      JDK variant to build (normal) [normal]
1690  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1691                          client, minimal1, kernel, zero, zeroshark) [server]
1692  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1693                          [release]
1694  --with-conf-name        use this as the name of the configuration [generated
1695                          from important configuration options]
1696  --with-builddeps-conf   use this configuration file for the builddeps
1697  --with-builddeps-server download and use build dependencies from this server
1698                          url
1699  --with-builddeps-dir    store downloaded build dependencies here
1700                          [/localhome/builddeps]
1701  --with-builddeps-group  chgrp the downloaded build dependencies to this
1702                          group
1703  --with-cacerts-file     specify alternative cacerts file
1704  --with-milestone        Set milestone value for build [internal]
1705  --with-build-number     Set build number value for build [b00]
1706  --with-user-release-suffix
1707                          Add a custom string to the version string if build
1708                          number isn't set.[username_builddateb00]
1709  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1710  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1711                          invocations of the Boot JDK, overriding the default
1712                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1713                          -enableassertions"
1714  --with-add-source-root  for each and every source directory, look in this
1715                          additional source root for the same directory; if it
1716                          exists and have files in it, include it in the build
1717  --with-override-source-root
1718                          for each and every source directory, look in this
1719                          override source root for the same directory; if it
1720                          exists, use that directory instead and ignore the
1721                          directory in the original source root
1722  --with-adds-and-overrides
1723                          use the subdirs 'adds' and 'overrides' in the
1724                          specified directory as add-source-root and
1725                          override-source-root
1726  --with-override-langtools
1727                          use this langtools dir for the build
1728  --with-override-corba   use this corba dir for the build
1729  --with-override-jaxp    use this jaxp dir for the build
1730  --with-override-jaxws   use this jaxws dir for the build
1731  --with-override-hotspot use this hotspot dir for the build
1732  --with-override-jdk     use this jdk dir for the build
1733  --with-import-hotspot   import hotspot binaries from this jdk image or
1734                          hotspot build dist dir instead of building from
1735                          source
1736  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1737                          only) [probed]
1738  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1739  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1740  --with-extra-ldflags    extra flags to be used when linking jdk
1741  --with-x                use the X Window System
1742  --with-cups             specify prefix directory for the cups package
1743                          (expecting the headers under PATH/include)
1744  --with-cups-include     specify directory for the cups include files
1745  --with-freetype         specify prefix directory for the freetype2 package
1746                          (expecting the libraries under PATH/lib and the
1747                          headers under PATH/include)
1748  --with-alsa             specify prefix directory for the alsa package
1749                          (expecting the libraries under PATH/lib and the
1750                          headers under PATH/include)
1751  --with-alsa-include     specify directory for the alsa include files
1752  --with-alsa-lib         specify directory for the alsa library
1753  --with-zlib             use zlib from build system or OpenJDK source
1754                          (system, bundled) [bundled]
1755  --with-stdc++lib=<static>,<dynamic>,<default>
1756                          force linking of the C++ runtime on Linux to either
1757                          static or dynamic, default is static with dynamic as
1758                          fallback
1759  --with-num-cores        number of cores in the build system, e.g.
1760                          --with-num-cores=8 [probed]
1761  --with-memory-size      memory (in MB) available in the build system, e.g.
1762                          --with-memory-size=1024 [probed]
1763  --with-sjavac-server-java
1764                          use this java binary for running the sjavac
1765                          background server [Boot JDK java]
1766  --with-sjavac-server-cores
1767                          use at most this number of concurrent threads on the
1768                          sjavac server [probed]
1769  --with-ccache-dir       where to store ccache files [~/.ccache]
1770
1771Some influential environment variables:
1772  PKG_CONFIG  path to pkg-config utility
1773  CC          C compiler command
1774  CFLAGS      C compiler flags
1775  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1776              nonstandard directory <lib dir>
1777  LIBS        libraries to pass to the linker, e.g. -l<library>
1778  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1779              you have headers in a nonstandard directory <include dir>
1780  CXX         C++ compiler command
1781  CXXFLAGS    C++ compiler flags
1782  OBJC        Objective C compiler command
1783  OBJCFLAGS   Objective C compiler flags
1784  CPP         C preprocessor
1785  CXXCPP      C++ preprocessor
1786  XMKMF       Path to xmkmf, Makefile generator for X Window System
1787  FREETYPE2_CFLAGS
1788              C compiler flags for FREETYPE2, overriding pkg-config
1789  FREETYPE2_LIBS
1790              linker flags for FREETYPE2, overriding pkg-config
1791  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1792  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1793
1794Use these variables to override the choices made by `configure' or to help
1795it to find libraries and programs with nonstandard names/locations.
1796
1797Report bugs to <build-dev@openjdk.java.net>.
1798OpenJDK home page: <http://openjdk.java.net>.
1799_ACEOF
1800ac_status=$?
1801fi
1802
1803if test "$ac_init_help" = "recursive"; then
1804  # If there are subdirs, report their specific --help.
1805  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1806    test -d "$ac_dir" ||
1807      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1808      continue
1809    ac_builddir=.
1810
1811case "$ac_dir" in
1812.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1813*)
1814  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1815  # A ".." for each directory in $ac_dir_suffix.
1816  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1817  case $ac_top_builddir_sub in
1818  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1819  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1820  esac ;;
1821esac
1822ac_abs_top_builddir=$ac_pwd
1823ac_abs_builddir=$ac_pwd$ac_dir_suffix
1824# for backward compatibility:
1825ac_top_builddir=$ac_top_build_prefix
1826
1827case $srcdir in
1828  .)  # We are building in place.
1829    ac_srcdir=.
1830    ac_top_srcdir=$ac_top_builddir_sub
1831    ac_abs_top_srcdir=$ac_pwd ;;
1832  [\\/]* | ?:[\\/]* )  # Absolute name.
1833    ac_srcdir=$srcdir$ac_dir_suffix;
1834    ac_top_srcdir=$srcdir
1835    ac_abs_top_srcdir=$srcdir ;;
1836  *) # Relative name.
1837    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1838    ac_top_srcdir=$ac_top_build_prefix$srcdir
1839    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1840esac
1841ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1842
1843    cd "$ac_dir" || { ac_status=$?; continue; }
1844    # Check for guested configure.
1845    if test -f "$ac_srcdir/configure.gnu"; then
1846      echo &&
1847      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1848    elif test -f "$ac_srcdir/configure"; then
1849      echo &&
1850      $SHELL "$ac_srcdir/configure" --help=recursive
1851    else
1852      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1853    fi || ac_status=$?
1854    cd "$ac_pwd" || { ac_status=$?; break; }
1855  done
1856fi
1857
1858test -n "$ac_init_help" && exit $ac_status
1859if $ac_init_version; then
1860  cat <<\_ACEOF
1861OpenJDK configure jdk8
1862generated by GNU Autoconf 2.67
1863
1864Copyright (C) 2010 Free Software Foundation, Inc.
1865This configure script is free software; the Free Software Foundation
1866gives unlimited permission to copy, distribute and modify it.
1867_ACEOF
1868  exit
1869fi
1870
1871## ------------------------ ##
1872## Autoconf initialization. ##
1873## ------------------------ ##
1874
1875# ac_fn_c_try_compile LINENO
1876# --------------------------
1877# Try to compile conftest.$ac_ext, and return whether this succeeded.
1878ac_fn_c_try_compile ()
1879{
1880  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881  rm -f conftest.$ac_objext
1882  if { { ac_try="$ac_compile"
1883case "(($ac_try" in
1884  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1885  *) ac_try_echo=$ac_try;;
1886esac
1887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1888$as_echo "$ac_try_echo"; } >&5
1889  (eval "$ac_compile") 2>conftest.err
1890  ac_status=$?
1891  if test -s conftest.err; then
1892    grep -v '^ *+' conftest.err >conftest.er1
1893    cat conftest.er1 >&5
1894    mv -f conftest.er1 conftest.err
1895  fi
1896  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897  test $ac_status = 0; } && {
1898	 test -z "$ac_c_werror_flag" ||
1899	 test ! -s conftest.err
1900       } && test -s conftest.$ac_objext; then :
1901  ac_retval=0
1902else
1903  $as_echo "$as_me: failed program was:" >&5
1904sed 's/^/| /' conftest.$ac_ext >&5
1905
1906	ac_retval=1
1907fi
1908  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1909  as_fn_set_status $ac_retval
1910
1911} # ac_fn_c_try_compile
1912
1913# ac_fn_cxx_try_compile LINENO
1914# ----------------------------
1915# Try to compile conftest.$ac_ext, and return whether this succeeded.
1916ac_fn_cxx_try_compile ()
1917{
1918  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919  rm -f conftest.$ac_objext
1920  if { { ac_try="$ac_compile"
1921case "(($ac_try" in
1922  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1923  *) ac_try_echo=$ac_try;;
1924esac
1925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1926$as_echo "$ac_try_echo"; } >&5
1927  (eval "$ac_compile") 2>conftest.err
1928  ac_status=$?
1929  if test -s conftest.err; then
1930    grep -v '^ *+' conftest.err >conftest.er1
1931    cat conftest.er1 >&5
1932    mv -f conftest.er1 conftest.err
1933  fi
1934  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1935  test $ac_status = 0; } && {
1936	 test -z "$ac_cxx_werror_flag" ||
1937	 test ! -s conftest.err
1938       } && test -s conftest.$ac_objext; then :
1939  ac_retval=0
1940else
1941  $as_echo "$as_me: failed program was:" >&5
1942sed 's/^/| /' conftest.$ac_ext >&5
1943
1944	ac_retval=1
1945fi
1946  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1947  as_fn_set_status $ac_retval
1948
1949} # ac_fn_cxx_try_compile
1950
1951# ac_fn_objc_try_compile LINENO
1952# -----------------------------
1953# Try to compile conftest.$ac_ext, and return whether this succeeded.
1954ac_fn_objc_try_compile ()
1955{
1956  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1957  rm -f conftest.$ac_objext
1958  if { { ac_try="$ac_compile"
1959case "(($ac_try" in
1960  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1961  *) ac_try_echo=$ac_try;;
1962esac
1963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1964$as_echo "$ac_try_echo"; } >&5
1965  (eval "$ac_compile") 2>conftest.err
1966  ac_status=$?
1967  if test -s conftest.err; then
1968    grep -v '^ *+' conftest.err >conftest.er1
1969    cat conftest.er1 >&5
1970    mv -f conftest.er1 conftest.err
1971  fi
1972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1973  test $ac_status = 0; } && {
1974	 test -z "$ac_objc_werror_flag" ||
1975	 test ! -s conftest.err
1976       } && test -s conftest.$ac_objext; then :
1977  ac_retval=0
1978else
1979  $as_echo "$as_me: failed program was:" >&5
1980sed 's/^/| /' conftest.$ac_ext >&5
1981
1982	ac_retval=1
1983fi
1984  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1985  as_fn_set_status $ac_retval
1986
1987} # ac_fn_objc_try_compile
1988
1989# ac_fn_c_try_cpp LINENO
1990# ----------------------
1991# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1992ac_fn_c_try_cpp ()
1993{
1994  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995  if { { ac_try="$ac_cpp conftest.$ac_ext"
1996case "(($ac_try" in
1997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998  *) ac_try_echo=$ac_try;;
1999esac
2000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001$as_echo "$ac_try_echo"; } >&5
2002  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2003  ac_status=$?
2004  if test -s conftest.err; then
2005    grep -v '^ *+' conftest.err >conftest.er1
2006    cat conftest.er1 >&5
2007    mv -f conftest.er1 conftest.err
2008  fi
2009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010  test $ac_status = 0; } > conftest.i && {
2011	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2012	 test ! -s conftest.err
2013       }; then :
2014  ac_retval=0
2015else
2016  $as_echo "$as_me: failed program was:" >&5
2017sed 's/^/| /' conftest.$ac_ext >&5
2018
2019    ac_retval=1
2020fi
2021  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2022  as_fn_set_status $ac_retval
2023
2024} # ac_fn_c_try_cpp
2025
2026# ac_fn_cxx_try_cpp LINENO
2027# ------------------------
2028# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029ac_fn_cxx_try_cpp ()
2030{
2031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032  if { { ac_try="$ac_cpp conftest.$ac_ext"
2033case "(($ac_try" in
2034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035  *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040  ac_status=$?
2041  if test -s conftest.err; then
2042    grep -v '^ *+' conftest.err >conftest.er1
2043    cat conftest.er1 >&5
2044    mv -f conftest.er1 conftest.err
2045  fi
2046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047  test $ac_status = 0; } > conftest.i && {
2048	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2049	 test ! -s conftest.err
2050       }; then :
2051  ac_retval=0
2052else
2053  $as_echo "$as_me: failed program was:" >&5
2054sed 's/^/| /' conftest.$ac_ext >&5
2055
2056    ac_retval=1
2057fi
2058  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059  as_fn_set_status $ac_retval
2060
2061} # ac_fn_cxx_try_cpp
2062
2063# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2064# ---------------------------------------------------------
2065# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2066# the include files in INCLUDES and setting the cache variable VAR
2067# accordingly.
2068ac_fn_cxx_check_header_mongrel ()
2069{
2070  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2071  if eval "test \"\${$3+set}\"" = set; then :
2072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2073$as_echo_n "checking for $2... " >&6; }
2074if eval "test \"\${$3+set}\"" = set; then :
2075  $as_echo_n "(cached) " >&6
2076fi
2077eval ac_res=\$$3
2078	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2079$as_echo "$ac_res" >&6; }
2080else
2081  # Is the header compilable?
2082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2083$as_echo_n "checking $2 usability... " >&6; }
2084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085/* end confdefs.h.  */
2086$4
2087#include <$2>
2088_ACEOF
2089if ac_fn_cxx_try_compile "$LINENO"; then :
2090  ac_header_compiler=yes
2091else
2092  ac_header_compiler=no
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2096$as_echo "$ac_header_compiler" >&6; }
2097
2098# Is the header present?
2099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2100$as_echo_n "checking $2 presence... " >&6; }
2101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h.  */
2103#include <$2>
2104_ACEOF
2105if ac_fn_cxx_try_cpp "$LINENO"; then :
2106  ac_header_preproc=yes
2107else
2108  ac_header_preproc=no
2109fi
2110rm -f conftest.err conftest.i conftest.$ac_ext
2111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2112$as_echo "$ac_header_preproc" >&6; }
2113
2114# So?  What about this header?
2115case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2116  yes:no: )
2117    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2118$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2119    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2120$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2121    ;;
2122  no:yes:* )
2123    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2124$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2125    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2126$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2128$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2129    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2130$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2131    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2132$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2133( $as_echo "## ----------------------------------------- ##
2134## Report this to build-dev@openjdk.java.net ##
2135## ----------------------------------------- ##"
2136     ) | sed "s/^/$as_me: WARNING:     /" >&2
2137    ;;
2138esac
2139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2140$as_echo_n "checking for $2... " >&6; }
2141if eval "test \"\${$3+set}\"" = set; then :
2142  $as_echo_n "(cached) " >&6
2143else
2144  eval "$3=\$ac_header_compiler"
2145fi
2146eval ac_res=\$$3
2147	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2148$as_echo "$ac_res" >&6; }
2149fi
2150  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2151
2152} # ac_fn_cxx_check_header_mongrel
2153
2154# ac_fn_cxx_try_run LINENO
2155# ------------------------
2156# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2157# that executables *can* be run.
2158ac_fn_cxx_try_run ()
2159{
2160  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2161  if { { ac_try="$ac_link"
2162case "(($ac_try" in
2163  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2164  *) ac_try_echo=$ac_try;;
2165esac
2166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2167$as_echo "$ac_try_echo"; } >&5
2168  (eval "$ac_link") 2>&5
2169  ac_status=$?
2170  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2171  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2172  { { case "(($ac_try" in
2173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2174  *) ac_try_echo=$ac_try;;
2175esac
2176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2177$as_echo "$ac_try_echo"; } >&5
2178  (eval "$ac_try") 2>&5
2179  ac_status=$?
2180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2181  test $ac_status = 0; }; }; then :
2182  ac_retval=0
2183else
2184  $as_echo "$as_me: program exited with status $ac_status" >&5
2185       $as_echo "$as_me: failed program was:" >&5
2186sed 's/^/| /' conftest.$ac_ext >&5
2187
2188       ac_retval=$ac_status
2189fi
2190  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2191  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2192  as_fn_set_status $ac_retval
2193
2194} # ac_fn_cxx_try_run
2195
2196# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2197# ---------------------------------------------------------
2198# Tests whether HEADER exists and can be compiled using the include files in
2199# INCLUDES, setting the cache variable VAR accordingly.
2200ac_fn_cxx_check_header_compile ()
2201{
2202  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2204$as_echo_n "checking for $2... " >&6; }
2205if eval "test \"\${$3+set}\"" = set; then :
2206  $as_echo_n "(cached) " >&6
2207else
2208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2209/* end confdefs.h.  */
2210$4
2211#include <$2>
2212_ACEOF
2213if ac_fn_cxx_try_compile "$LINENO"; then :
2214  eval "$3=yes"
2215else
2216  eval "$3=no"
2217fi
2218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
2223  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2224
2225} # ac_fn_cxx_check_header_compile
2226
2227# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2228# ----------------------------------------------
2229# Tries to find the compile-time value of EXPR in a program that includes
2230# INCLUDES, setting VAR accordingly. Returns whether the value could be
2231# computed
2232ac_fn_cxx_compute_int ()
2233{
2234  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235  if test "$cross_compiling" = yes; then
2236    # Depending upon the size, compute the lo and hi bounds.
2237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238/* end confdefs.h.  */
2239$4
2240int
2241main ()
2242{
2243static int test_array [1 - 2 * !(($2) >= 0)];
2244test_array [0] = 0
2245
2246  ;
2247  return 0;
2248}
2249_ACEOF
2250if ac_fn_cxx_try_compile "$LINENO"; then :
2251  ac_lo=0 ac_mid=0
2252  while :; do
2253    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254/* end confdefs.h.  */
2255$4
2256int
2257main ()
2258{
2259static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2260test_array [0] = 0
2261
2262  ;
2263  return 0;
2264}
2265_ACEOF
2266if ac_fn_cxx_try_compile "$LINENO"; then :
2267  ac_hi=$ac_mid; break
2268else
2269  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2270			if test $ac_lo -le $ac_mid; then
2271			  ac_lo= ac_hi=
2272			  break
2273			fi
2274			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277  done
2278else
2279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h.  */
2281$4
2282int
2283main ()
2284{
2285static int test_array [1 - 2 * !(($2) < 0)];
2286test_array [0] = 0
2287
2288  ;
2289  return 0;
2290}
2291_ACEOF
2292if ac_fn_cxx_try_compile "$LINENO"; then :
2293  ac_hi=-1 ac_mid=-1
2294  while :; do
2295    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h.  */
2297$4
2298int
2299main ()
2300{
2301static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2302test_array [0] = 0
2303
2304  ;
2305  return 0;
2306}
2307_ACEOF
2308if ac_fn_cxx_try_compile "$LINENO"; then :
2309  ac_lo=$ac_mid; break
2310else
2311  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2312			if test $ac_mid -le $ac_hi; then
2313			  ac_lo= ac_hi=
2314			  break
2315			fi
2316			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319  done
2320else
2321  ac_lo= ac_hi=
2322fi
2323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326# Binary search between lo and hi bounds.
2327while test "x$ac_lo" != "x$ac_hi"; do
2328  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2330/* end confdefs.h.  */
2331$4
2332int
2333main ()
2334{
2335static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2336test_array [0] = 0
2337
2338  ;
2339  return 0;
2340}
2341_ACEOF
2342if ac_fn_cxx_try_compile "$LINENO"; then :
2343  ac_hi=$ac_mid
2344else
2345  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2346fi
2347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348done
2349case $ac_lo in #((
2350?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2351'') ac_retval=1 ;;
2352esac
2353  else
2354    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h.  */
2356$4
2357static long int longval () { return $2; }
2358static unsigned long int ulongval () { return $2; }
2359#include <stdio.h>
2360#include <stdlib.h>
2361int
2362main ()
2363{
2364
2365  FILE *f = fopen ("conftest.val", "w");
2366  if (! f)
2367    return 1;
2368  if (($2) < 0)
2369    {
2370      long int i = longval ();
2371      if (i != ($2))
2372	return 1;
2373      fprintf (f, "%ld", i);
2374    }
2375  else
2376    {
2377      unsigned long int i = ulongval ();
2378      if (i != ($2))
2379	return 1;
2380      fprintf (f, "%lu", i);
2381    }
2382  /* Do not output a trailing newline, as this causes \r\n confusion
2383     on some platforms.  */
2384  return ferror (f) || fclose (f) != 0;
2385
2386  ;
2387  return 0;
2388}
2389_ACEOF
2390if ac_fn_cxx_try_run "$LINENO"; then :
2391  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2392else
2393  ac_retval=1
2394fi
2395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2396  conftest.$ac_objext conftest.beam conftest.$ac_ext
2397rm -f conftest.val
2398
2399  fi
2400  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2401  as_fn_set_status $ac_retval
2402
2403} # ac_fn_cxx_compute_int
2404
2405# ac_fn_cxx_try_link LINENO
2406# -------------------------
2407# Try to link conftest.$ac_ext, and return whether this succeeded.
2408ac_fn_cxx_try_link ()
2409{
2410  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411  rm -f conftest.$ac_objext conftest$ac_exeext
2412  if { { ac_try="$ac_link"
2413case "(($ac_try" in
2414  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2415  *) ac_try_echo=$ac_try;;
2416esac
2417eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2418$as_echo "$ac_try_echo"; } >&5
2419  (eval "$ac_link") 2>conftest.err
2420  ac_status=$?
2421  if test -s conftest.err; then
2422    grep -v '^ *+' conftest.err >conftest.er1
2423    cat conftest.er1 >&5
2424    mv -f conftest.er1 conftest.err
2425  fi
2426  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2427  test $ac_status = 0; } && {
2428	 test -z "$ac_cxx_werror_flag" ||
2429	 test ! -s conftest.err
2430       } && test -s conftest$ac_exeext && {
2431	 test "$cross_compiling" = yes ||
2432	 $as_test_x conftest$ac_exeext
2433       }; then :
2434  ac_retval=0
2435else
2436  $as_echo "$as_me: failed program was:" >&5
2437sed 's/^/| /' conftest.$ac_ext >&5
2438
2439	ac_retval=1
2440fi
2441  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2442  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2443  # interfere with the next link command; also delete a directory that is
2444  # left behind by Apple's compiler.  We do this before executing the actions.
2445  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2446  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2447  as_fn_set_status $ac_retval
2448
2449} # ac_fn_cxx_try_link
2450
2451# ac_fn_cxx_check_func LINENO FUNC VAR
2452# ------------------------------------
2453# Tests whether FUNC exists, setting the cache variable VAR accordingly
2454ac_fn_cxx_check_func ()
2455{
2456  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2458$as_echo_n "checking for $2... " >&6; }
2459if eval "test \"\${$3+set}\"" = set; then :
2460  $as_echo_n "(cached) " >&6
2461else
2462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2463/* end confdefs.h.  */
2464/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2465   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2466#define $2 innocuous_$2
2467
2468/* System header to define __stub macros and hopefully few prototypes,
2469    which can conflict with char $2 (); below.
2470    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2471    <limits.h> exists even on freestanding compilers.  */
2472
2473#ifdef __STDC__
2474# include <limits.h>
2475#else
2476# include <assert.h>
2477#endif
2478
2479#undef $2
2480
2481/* Override any GCC internal prototype to avoid an error.
2482   Use char because int might match the return type of a GCC
2483   builtin and then its argument prototype would still apply.  */
2484#ifdef __cplusplus
2485extern "C"
2486#endif
2487char $2 ();
2488/* The GNU C library defines this for functions which it implements
2489    to always fail with ENOSYS.  Some functions are actually named
2490    something starting with __ and the normal name is an alias.  */
2491#if defined __stub_$2 || defined __stub___$2
2492choke me
2493#endif
2494
2495int
2496main ()
2497{
2498return $2 ();
2499  ;
2500  return 0;
2501}
2502_ACEOF
2503if ac_fn_cxx_try_link "$LINENO"; then :
2504  eval "$3=yes"
2505else
2506  eval "$3=no"
2507fi
2508rm -f core conftest.err conftest.$ac_objext \
2509    conftest$ac_exeext conftest.$ac_ext
2510fi
2511eval ac_res=\$$3
2512	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2513$as_echo "$ac_res" >&6; }
2514  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2515
2516} # ac_fn_cxx_check_func
2517
2518# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2519# -------------------------------------------------------
2520# Tests whether HEADER exists and can be compiled using the include files in
2521# INCLUDES, setting the cache variable VAR accordingly.
2522ac_fn_c_check_header_compile ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2526$as_echo_n "checking for $2... " >&6; }
2527if eval "test \"\${$3+set}\"" = set; then :
2528  $as_echo_n "(cached) " >&6
2529else
2530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531/* end confdefs.h.  */
2532$4
2533#include <$2>
2534_ACEOF
2535if ac_fn_c_try_compile "$LINENO"; then :
2536  eval "$3=yes"
2537else
2538  eval "$3=no"
2539fi
2540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2541fi
2542eval ac_res=\$$3
2543	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544$as_echo "$ac_res" >&6; }
2545  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2546
2547} # ac_fn_c_check_header_compile
2548cat >config.log <<_ACEOF
2549This file contains any messages produced by compilers while
2550running configure, to aid debugging if configure makes a mistake.
2551
2552It was created by OpenJDK $as_me jdk8, which was
2553generated by GNU Autoconf 2.67.  Invocation command line was
2554
2555  $ $0 $@
2556
2557_ACEOF
2558exec 5>>config.log
2559{
2560cat <<_ASUNAME
2561## --------- ##
2562## Platform. ##
2563## --------- ##
2564
2565hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2566uname -m = `(uname -m) 2>/dev/null || echo unknown`
2567uname -r = `(uname -r) 2>/dev/null || echo unknown`
2568uname -s = `(uname -s) 2>/dev/null || echo unknown`
2569uname -v = `(uname -v) 2>/dev/null || echo unknown`
2570
2571/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2572/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2573
2574/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2575/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2576/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2577/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2578/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2579/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2580/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2581
2582_ASUNAME
2583
2584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585for as_dir in $PATH
2586do
2587  IFS=$as_save_IFS
2588  test -z "$as_dir" && as_dir=.
2589    $as_echo "PATH: $as_dir"
2590  done
2591IFS=$as_save_IFS
2592
2593} >&5
2594
2595cat >&5 <<_ACEOF
2596
2597
2598## ----------- ##
2599## Core tests. ##
2600## ----------- ##
2601
2602_ACEOF
2603
2604
2605# Keep a trace of the command line.
2606# Strip out --no-create and --no-recursion so they do not pile up.
2607# Strip out --silent because we don't want to record it for future runs.
2608# Also quote any args containing shell meta-characters.
2609# Make two passes to allow for proper duplicate-argument suppression.
2610ac_configure_args=
2611ac_configure_args0=
2612ac_configure_args1=
2613ac_must_keep_next=false
2614for ac_pass in 1 2
2615do
2616  for ac_arg
2617  do
2618    case $ac_arg in
2619    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2620    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2621    | -silent | --silent | --silen | --sile | --sil)
2622      continue ;;
2623    *\'*)
2624      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2625    esac
2626    case $ac_pass in
2627    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2628    2)
2629      as_fn_append ac_configure_args1 " '$ac_arg'"
2630      if test $ac_must_keep_next = true; then
2631	ac_must_keep_next=false # Got value, back to normal.
2632      else
2633	case $ac_arg in
2634	  *=* | --config-cache | -C | -disable-* | --disable-* \
2635	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2636	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2637	  | -with-* | --with-* | -without-* | --without-* | --x)
2638	    case "$ac_configure_args0 " in
2639	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2640	    esac
2641	    ;;
2642	  -* ) ac_must_keep_next=true ;;
2643	esac
2644      fi
2645      as_fn_append ac_configure_args " '$ac_arg'"
2646      ;;
2647    esac
2648  done
2649done
2650{ ac_configure_args0=; unset ac_configure_args0;}
2651{ ac_configure_args1=; unset ac_configure_args1;}
2652
2653# When interrupted or exit'd, cleanup temporary files, and complete
2654# config.log.  We remove comments because anyway the quotes in there
2655# would cause problems or look ugly.
2656# WARNING: Use '\'' to represent an apostrophe within the trap.
2657# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2658trap 'exit_status=$?
2659  # Save into config.log some information that might help in debugging.
2660  {
2661    echo
2662
2663    $as_echo "## ---------------- ##
2664## Cache variables. ##
2665## ---------------- ##"
2666    echo
2667    # The following way of writing the cache mishandles newlines in values,
2668(
2669  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2670    eval ac_val=\$$ac_var
2671    case $ac_val in #(
2672    *${as_nl}*)
2673      case $ac_var in #(
2674      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2675$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2676      esac
2677      case $ac_var in #(
2678      _ | IFS | as_nl) ;; #(
2679      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2680      *) { eval $ac_var=; unset $ac_var;} ;;
2681      esac ;;
2682    esac
2683  done
2684  (set) 2>&1 |
2685    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2686    *${as_nl}ac_space=\ *)
2687      sed -n \
2688	"s/'\''/'\''\\\\'\'''\''/g;
2689	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2690      ;; #(
2691    *)
2692      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2693      ;;
2694    esac |
2695    sort
2696)
2697    echo
2698
2699    $as_echo "## ----------------- ##
2700## Output variables. ##
2701## ----------------- ##"
2702    echo
2703    for ac_var in $ac_subst_vars
2704    do
2705      eval ac_val=\$$ac_var
2706      case $ac_val in
2707      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2708      esac
2709      $as_echo "$ac_var='\''$ac_val'\''"
2710    done | sort
2711    echo
2712
2713    if test -n "$ac_subst_files"; then
2714      $as_echo "## ------------------- ##
2715## File substitutions. ##
2716## ------------------- ##"
2717      echo
2718      for ac_var in $ac_subst_files
2719      do
2720	eval ac_val=\$$ac_var
2721	case $ac_val in
2722	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2723	esac
2724	$as_echo "$ac_var='\''$ac_val'\''"
2725      done | sort
2726      echo
2727    fi
2728
2729    if test -s confdefs.h; then
2730      $as_echo "## ----------- ##
2731## confdefs.h. ##
2732## ----------- ##"
2733      echo
2734      cat confdefs.h
2735      echo
2736    fi
2737    test "$ac_signal" != 0 &&
2738      $as_echo "$as_me: caught signal $ac_signal"
2739    $as_echo "$as_me: exit $exit_status"
2740  } >&5
2741  rm -f core *.core core.conftest.* &&
2742    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2743    exit $exit_status
2744' 0
2745for ac_signal in 1 2 13 15; do
2746  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2747done
2748ac_signal=0
2749
2750# confdefs.h avoids OS command line length limits that DEFS can exceed.
2751rm -f -r conftest* confdefs.h
2752
2753$as_echo "/* confdefs.h */" > confdefs.h
2754
2755# Predefined preprocessor variables.
2756
2757cat >>confdefs.h <<_ACEOF
2758#define PACKAGE_NAME "$PACKAGE_NAME"
2759_ACEOF
2760
2761cat >>confdefs.h <<_ACEOF
2762#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2763_ACEOF
2764
2765cat >>confdefs.h <<_ACEOF
2766#define PACKAGE_VERSION "$PACKAGE_VERSION"
2767_ACEOF
2768
2769cat >>confdefs.h <<_ACEOF
2770#define PACKAGE_STRING "$PACKAGE_STRING"
2771_ACEOF
2772
2773cat >>confdefs.h <<_ACEOF
2774#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2775_ACEOF
2776
2777cat >>confdefs.h <<_ACEOF
2778#define PACKAGE_URL "$PACKAGE_URL"
2779_ACEOF
2780
2781
2782# Let the site file select an alternate cache file if it wants to.
2783# Prefer an explicitly selected file to automatically selected ones.
2784ac_site_file1=NONE
2785ac_site_file2=NONE
2786if test -n "$CONFIG_SITE"; then
2787  # We do not want a PATH search for config.site.
2788  case $CONFIG_SITE in #((
2789    -*)  ac_site_file1=./$CONFIG_SITE;;
2790    */*) ac_site_file1=$CONFIG_SITE;;
2791    *)   ac_site_file1=./$CONFIG_SITE;;
2792  esac
2793elif test "x$prefix" != xNONE; then
2794  ac_site_file1=$prefix/share/config.site
2795  ac_site_file2=$prefix/etc/config.site
2796else
2797  ac_site_file1=$ac_default_prefix/share/config.site
2798  ac_site_file2=$ac_default_prefix/etc/config.site
2799fi
2800for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2801do
2802  test "x$ac_site_file" = xNONE && continue
2803  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2804    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2805$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2806    sed 's/^/| /' "$ac_site_file" >&5
2807    . "$ac_site_file" \
2808      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2810as_fn_error $? "failed to load site script $ac_site_file
2811See \`config.log' for more details" "$LINENO" 5 ; }
2812  fi
2813done
2814
2815if test -r "$cache_file"; then
2816  # Some versions of bash will fail to source /dev/null (special files
2817  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2818  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2819    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2820$as_echo "$as_me: loading cache $cache_file" >&6;}
2821    case $cache_file in
2822      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2823      *)                      . "./$cache_file";;
2824    esac
2825  fi
2826else
2827  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2828$as_echo "$as_me: creating cache $cache_file" >&6;}
2829  >$cache_file
2830fi
2831
2832# Check that the precious variables saved in the cache have kept the same
2833# value.
2834ac_cache_corrupted=false
2835for ac_var in $ac_precious_vars; do
2836  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2837  eval ac_new_set=\$ac_env_${ac_var}_set
2838  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2839  eval ac_new_val=\$ac_env_${ac_var}_value
2840  case $ac_old_set,$ac_new_set in
2841    set,)
2842      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2843$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2844      ac_cache_corrupted=: ;;
2845    ,set)
2846      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2847$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2848      ac_cache_corrupted=: ;;
2849    ,);;
2850    *)
2851      if test "x$ac_old_val" != "x$ac_new_val"; then
2852	# differences in whitespace do not lead to failure.
2853	ac_old_val_w=`echo x $ac_old_val`
2854	ac_new_val_w=`echo x $ac_new_val`
2855	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2856	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2857$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2858	  ac_cache_corrupted=:
2859	else
2860	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2861$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2862	  eval $ac_var=\$ac_old_val
2863	fi
2864	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2865$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2866	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2867$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2868      fi;;
2869  esac
2870  # Pass precious variables to config.status.
2871  if test "$ac_new_set" = set; then
2872    case $ac_new_val in
2873    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2874    *) ac_arg=$ac_var=$ac_new_val ;;
2875    esac
2876    case " $ac_configure_args " in
2877      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2878      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2879    esac
2880  fi
2881done
2882if $ac_cache_corrupted; then
2883  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2885  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2886$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2887  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2888fi
2889## -------------------- ##
2890## Main body of script. ##
2891## -------------------- ##
2892
2893ac_ext=c
2894ac_cpp='$CPP $CPPFLAGS'
2895ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2896ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2897ac_compiler_gnu=$ac_cv_c_compiler_gnu
2898
2899
2900
2901ac_aux_dir=
2902for ac_dir in build-aux "$srcdir"/build-aux; do
2903  if test -f "$ac_dir/install-sh"; then
2904    ac_aux_dir=$ac_dir
2905    ac_install_sh="$ac_aux_dir/install-sh -c"
2906    break
2907  elif test -f "$ac_dir/install.sh"; then
2908    ac_aux_dir=$ac_dir
2909    ac_install_sh="$ac_aux_dir/install.sh -c"
2910    break
2911  elif test -f "$ac_dir/shtool"; then
2912    ac_aux_dir=$ac_dir
2913    ac_install_sh="$ac_aux_dir/shtool install -c"
2914    break
2915  fi
2916done
2917if test -z "$ac_aux_dir"; then
2918  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2919fi
2920
2921# These three variables are undocumented and unsupported,
2922# and are intended to be withdrawn in a future Autoconf release.
2923# They can cause serious problems if a builder's source tree is in a directory
2924# whose full name contains unusual characters.
2925ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2926ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2927ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2928
2929
2930# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2931#
2932# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2933#
2934# This program is free software; you can redistribute it and/or modify
2935# it under the terms of the GNU General Public License as published by
2936# the Free Software Foundation; either version 2 of the License, or
2937# (at your option) any later version.
2938#
2939# This program is distributed in the hope that it will be useful, but
2940# WITHOUT ANY WARRANTY; without even the implied warranty of
2941# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2942# General Public License for more details.
2943#
2944# You should have received a copy of the GNU General Public License
2945# along with this program; if not, write to the Free Software
2946# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2947#
2948# As a special exception to the GNU General Public License, if you
2949# distribute this file as part of a program that contains a
2950# configuration script generated by Autoconf, you may include it under
2951# the same distribution terms that you use for the rest of that program.
2952
2953# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2954# ----------------------------------
2955# PKG_PROG_PKG_CONFIG
2956
2957# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2958#
2959# Check to see whether a particular set of modules exists.  Similar
2960# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2961#
2962#
2963# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2964# this or PKG_CHECK_MODULES is called, or make sure to call
2965# PKG_CHECK_EXISTS manually
2966# --------------------------------------------------------------
2967
2968
2969
2970# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2971# ---------------------------------------------
2972# _PKG_CONFIG
2973
2974# _PKG_SHORT_ERRORS_SUPPORTED
2975# -----------------------------
2976# _PKG_SHORT_ERRORS_SUPPORTED
2977
2978
2979# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2980# [ACTION-IF-NOT-FOUND])
2981#
2982#
2983# Note that if there is a possibility the first call to
2984# PKG_CHECK_MODULES might not happen, you should be sure to include an
2985# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2986#
2987#
2988# --------------------------------------------------------------
2989# PKG_CHECK_MODULES
2990
2991
2992# Include these first...
2993#
2994# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
2995# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2996#
2997# This code is free software; you can redistribute it and/or modify it
2998# under the terms of the GNU General Public License version 2 only, as
2999# published by the Free Software Foundation.  Oracle designates this
3000# particular file as subject to the "Classpath" exception as provided
3001# by Oracle in the LICENSE file that accompanied this code.
3002#
3003# This code is distributed in the hope that it will be useful, but WITHOUT
3004# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3005# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3006# version 2 for more details (a copy is included in the LICENSE file that
3007# accompanied this code).
3008#
3009# You should have received a copy of the GNU General Public License version
3010# 2 along with this work; if not, write to the Free Software Foundation,
3011# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3012#
3013# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3014# or visit www.oracle.com if you need additional information or have any
3015# questions.
3016#
3017
3018
3019
3020# This will make sure the given variable points to a full and proper
3021# path. This means:
3022# 1) There will be no spaces in the path. On posix platforms,
3023#    spaces in the path will result in an error. On Windows,
3024#    the path will be rewritten using short-style to be space-free.
3025# 2) The path will be absolute, and it will be in unix-style (on
3026#     cygwin).
3027# $1: The name of the variable to fix
3028
3029
3030# This will make sure the given variable points to a executable
3031# with a full and proper path. This means:
3032# 1) There will be no spaces in the path. On posix platforms,
3033#    spaces in the path will result in an error. On Windows,
3034#    the path will be rewritten using short-style to be space-free.
3035# 2) The path will be absolute, and it will be in unix-style (on
3036#     cygwin).
3037# Any arguments given to the executable is preserved.
3038# If the input variable does not have a directory specification, then
3039# it need to be in the PATH.
3040# $1: The name of the variable to fix
3041
3042
3043
3044
3045
3046
3047# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3048# $1: variable to check
3049# $2: executable name to print in warning (optional)
3050
3051
3052# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3053# Arguments as AC_PATH_PROG:
3054# $1: variable to set
3055# $2: executable name to look for
3056
3057
3058# Setup the most fundamental tools that relies on not much else to set up,
3059# but is used by much of the early bootstrap code.
3060
3061
3062# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3063
3064
3065
3066
3067
3068
3069
3070#%%% Simple tools %%%
3071
3072# Check if we have found a usable version of make
3073# $1: the path to a potential make binary (or empty)
3074# $2: the description on how we found this
3075
3076
3077# Goes looking for a usable version of GNU make.
3078
3079
3080
3081
3082
3083
3084# Check if build directory is on local disk. If not possible to determine,
3085# we prefer to claim it's local.
3086# Argument 1: directory to test
3087# Argument 2: what to do if it is on local disk
3088# Argument 3: what to do otherwise (remote disk or failure)
3089
3090
3091# Check that source files have basic read permissions set. This might
3092# not be the case in cygwin in certain conditions.
3093
3094
3095
3096
3097#
3098# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3099# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3100#
3101# This code is free software; you can redistribute it and/or modify it
3102# under the terms of the GNU General Public License version 2 only, as
3103# published by the Free Software Foundation.  Oracle designates this
3104# particular file as subject to the "Classpath" exception as provided
3105# by Oracle in the LICENSE file that accompanied this code.
3106#
3107# This code is distributed in the hope that it will be useful, but WITHOUT
3108# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3109# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3110# version 2 for more details (a copy is included in the LICENSE file that
3111# accompanied this code).
3112#
3113# You should have received a copy of the GNU General Public License version
3114# 2 along with this work; if not, write to the Free Software Foundation,
3115# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3116#
3117# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3118# or visit www.oracle.com if you need additional information or have any
3119# questions.
3120#
3121
3122
3123
3124
3125
3126# Helper function which possibly converts a path using DOS-style short mode.
3127# If so, the updated path is stored in $new_path.
3128# $1: The path to check
3129
3130
3131# Helper function which possibly converts a path using DOS-style short mode.
3132# If so, the updated path is stored in $new_path.
3133# $1: The path to check
3134
3135
3136# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3137# and could probably be heavily simplified. However, all changes in this
3138# area tend to need lot of testing in different scenarios, and in lack of
3139# proper unit testing, cleaning this up has not been deemed worth the effort
3140# at the moment.
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3151
3152
3153
3154
3155#
3156# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3157# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3158#
3159# This code is free software; you can redistribute it and/or modify it
3160# under the terms of the GNU General Public License version 2 only, as
3161# published by the Free Software Foundation.  Oracle designates this
3162# particular file as subject to the "Classpath" exception as provided
3163# by Oracle in the LICENSE file that accompanied this code.
3164#
3165# This code is distributed in the hope that it will be useful, but WITHOUT
3166# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3167# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3168# version 2 for more details (a copy is included in the LICENSE file that
3169# accompanied this code).
3170#
3171# You should have received a copy of the GNU General Public License version
3172# 2 along with this work; if not, write to the Free Software Foundation,
3173# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3174#
3175# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3176# or visit www.oracle.com if you need additional information or have any
3177# questions.
3178#
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190# ... then the rest
3191#
3192# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3193# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3194#
3195# This code is free software; you can redistribute it and/or modify it
3196# under the terms of the GNU General Public License version 2 only, as
3197# published by the Free Software Foundation.  Oracle designates this
3198# particular file as subject to the "Classpath" exception as provided
3199# by Oracle in the LICENSE file that accompanied this code.
3200#
3201# This code is distributed in the hope that it will be useful, but WITHOUT
3202# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3203# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3204# version 2 for more details (a copy is included in the LICENSE file that
3205# accompanied this code).
3206#
3207# You should have received a copy of the GNU General Public License version
3208# 2 along with this work; if not, write to the Free Software Foundation,
3209# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3210#
3211# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3212# or visit www.oracle.com if you need additional information or have any
3213# questions.
3214#
3215
3216# Execute the check given as argument, and verify the result
3217# If the Boot JDK was previously found, do nothing
3218# $1 A command line (typically autoconf macro) to execute
3219
3220
3221# Test: Is bootjdk explicitely set by command line arguments?
3222
3223
3224# Test: Is bootjdk available from builddeps?
3225
3226
3227# Test: Is $JAVA_HOME set?
3228
3229
3230# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3231
3232
3233# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3234
3235
3236# Look for a jdk in the given path. If there are multiple, try to select the newest.
3237# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3238# $1 = Path to directory containing jdk installations.
3239# $2 = String to append to the found JDK directory to get the proper JDK home
3240
3241
3242# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3243# environmental variable as base for where to look.
3244# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3245
3246
3247# Test: Is there a JDK installed in default, well-known locations?
3248
3249
3250# Check that a command-line tool in the Boot JDK is correct
3251# $1 = name of variable to assign
3252# $2 = name of binary
3253
3254
3255###############################################################################
3256#
3257# We need a Boot JDK to bootstrap the build.
3258#
3259
3260
3261
3262
3263
3264#
3265# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3266# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3267#
3268# This code is free software; you can redistribute it and/or modify it
3269# under the terms of the GNU General Public License version 2 only, as
3270# published by the Free Software Foundation.  Oracle designates this
3271# particular file as subject to the "Classpath" exception as provided
3272# by Oracle in the LICENSE file that accompanied this code.
3273#
3274# This code is distributed in the hope that it will be useful, but WITHOUT
3275# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3276# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3277# version 2 for more details (a copy is included in the LICENSE file that
3278# accompanied this code).
3279#
3280# You should have received a copy of the GNU General Public License version
3281# 2 along with this work; if not, write to the Free Software Foundation,
3282# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3283#
3284# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3285# or visit www.oracle.com if you need additional information or have any
3286# questions.
3287#
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306#
3307# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3308# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3309#
3310# This code is free software; you can redistribute it and/or modify it
3311# under the terms of the GNU General Public License version 2 only, as
3312# published by the Free Software Foundation.  Oracle designates this
3313# particular file as subject to the "Classpath" exception as provided
3314# by Oracle in the LICENSE file that accompanied this code.
3315#
3316# This code is distributed in the hope that it will be useful, but WITHOUT
3317# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3318# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3319# version 2 for more details (a copy is included in the LICENSE file that
3320# accompanied this code).
3321#
3322# You should have received a copy of the GNU General Public License version
3323# 2 along with this work; if not, write to the Free Software Foundation,
3324# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3325#
3326# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3327# or visit www.oracle.com if you need additional information or have any
3328# questions.
3329#
3330
3331
3332
3333
3334
3335cygwin_help() {
3336    case $1 in
3337    unzip)
3338        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3339    zip)
3340        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3341    make)
3342        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3343    * )
3344       break ;;
3345    esac
3346}
3347
3348apt_help() {
3349    case $1 in
3350    devkit)
3351        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3352    openjdk)
3353        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3354    alsa)
3355        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3356    cups)
3357        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3358    freetype2)
3359        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3360    pulse)
3361        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3362    x11)
3363        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3364    ccache)
3365        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3366    * )
3367       break ;;
3368    esac
3369}
3370
3371yum_help() {
3372    case $1 in
3373    devkit)
3374        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3375    openjdk)
3376        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3377    alsa)
3378        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3379    cups)
3380        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3381    freetype2)
3382        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3383    pulse)
3384        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3385    x11)
3386        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3387    ccache)
3388        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3389    * )
3390       break ;;
3391    esac
3392}
3393
3394port_help() {
3395    PKGHANDLER_COMMAND=""
3396}
3397
3398pkgutil_help() {
3399    PKGHANDLER_COMMAND=""
3400}
3401
3402pkgadd_help() {
3403    PKGHANDLER_COMMAND=""
3404}
3405
3406
3407
3408#
3409# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3410# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3411#
3412# This code is free software; you can redistribute it and/or modify it
3413# under the terms of the GNU General Public License version 2 only, as
3414# published by the Free Software Foundation.  Oracle designates this
3415# particular file as subject to the "Classpath" exception as provided
3416# by Oracle in the LICENSE file that accompanied this code.
3417#
3418# This code is distributed in the hope that it will be useful, but WITHOUT
3419# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3420# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3421# version 2 for more details (a copy is included in the LICENSE file that
3422# accompanied this code).
3423#
3424# You should have received a copy of the GNU General Public License version
3425# 2 along with this work; if not, write to the Free Software Foundation,
3426# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3427#
3428# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3429# or visit www.oracle.com if you need additional information or have any
3430# questions.
3431#
3432
3433
3434
3435
3436
3437
3438
3439
3440###############################################################################
3441#
3442# Should we build only OpenJDK even if closed sources are present?
3443#
3444
3445
3446
3447
3448###############################################################################
3449#
3450# Setup version numbers
3451#
3452
3453
3454
3455
3456
3457
3458# Support for customization of the build process. Some build files
3459# will include counterparts from this location, if they exist. This allows
3460# for a degree of customization of the build targets and the rules/recipes
3461# to create them
3462
3463# Check whether --with-custom-make-dir was given.
3464if test "${with_custom_make_dir+set}" = set; then :
3465  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3466fi
3467
3468
3469
3470#
3471# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3472# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3473#
3474# This code is free software; you can redistribute it and/or modify it
3475# under the terms of the GNU General Public License version 2 only, as
3476# published by the Free Software Foundation.  Oracle designates this
3477# particular file as subject to the "Classpath" exception as provided
3478# by Oracle in the LICENSE file that accompanied this code.
3479#
3480# This code is distributed in the hope that it will be useful, but WITHOUT
3481# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3482# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3483# version 2 for more details (a copy is included in the LICENSE file that
3484# accompanied this code).
3485#
3486# You should have received a copy of the GNU General Public License version
3487# 2 along with this work; if not, write to the Free Software Foundation,
3488# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3489#
3490# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3491# or visit www.oracle.com if you need additional information or have any
3492# questions.
3493#
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509#
3510# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3511# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3512#
3513# This code is free software; you can redistribute it and/or modify it
3514# under the terms of the GNU General Public License version 2 only, as
3515# published by the Free Software Foundation.  Oracle designates this
3516# particular file as subject to the "Classpath" exception as provided
3517# by Oracle in the LICENSE file that accompanied this code.
3518#
3519# This code is distributed in the hope that it will be useful, but WITHOUT
3520# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3521# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3522# version 2 for more details (a copy is included in the LICENSE file that
3523# accompanied this code).
3524#
3525# You should have received a copy of the GNU General Public License version
3526# 2 along with this work; if not, write to the Free Software Foundation,
3527# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3528#
3529# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3530# or visit www.oracle.com if you need additional information or have any
3531# questions.
3532#
3533
3534# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3535# Converts autoconf style CPU name to OpenJDK style, into
3536# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3537
3538
3539# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3540# Converts autoconf style OS name to OpenJDK style, into
3541# VAR_OS and VAR_OS_API.
3542
3543
3544# Expects $host_os $host_cpu $build_os and $build_cpu
3545# and $with_target_bits to have been setup!
3546#
3547# Translate the standard triplet(quadruplet) definition
3548# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3549# OPENJDK_BUILD_OS, etc.
3550
3551
3552# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3553# accordingly. Must be done after setting up build and target system, but before
3554# doing anything else with these values.
3555
3556
3557    # Setup the legacy variables, for controlling the old makefiles.
3558    #
3559
3560
3561
3562
3563#%%% Build and target systems %%%
3564
3565
3566
3567
3568# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3569# Add -mX to various FLAGS variables.
3570
3571
3572
3573
3574
3575
3576#
3577# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3578# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3579#
3580# This code is free software; you can redistribute it and/or modify it
3581# under the terms of the GNU General Public License version 2 only, as
3582# published by the Free Software Foundation.  Oracle designates this
3583# particular file as subject to the "Classpath" exception as provided
3584# by Oracle in the LICENSE file that accompanied this code.
3585#
3586# This code is distributed in the hope that it will be useful, but WITHOUT
3587# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3588# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3589# version 2 for more details (a copy is included in the LICENSE file that
3590# accompanied this code).
3591#
3592# You should have received a copy of the GNU General Public License version
3593# 2 along with this work; if not, write to the Free Software Foundation,
3594# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3595#
3596# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3597# or visit www.oracle.com if you need additional information or have any
3598# questions.
3599#
3600
3601
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# $1 = compiler to test (CC or CXX)
3634# $2 = human readable name of compiler (C or C++)
3635
3636
3637
3638
3639
3640# $1 = compiler to test (CC or CXX)
3641# $2 = human readable name of compiler (C or C++)
3642# $3 = list of compiler names to search for
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655#
3656# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3657# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3658#
3659# This code is free software; you can redistribute it and/or modify it
3660# under the terms of the GNU General Public License version 2 only, as
3661# published by the Free Software Foundation.  Oracle designates this
3662# particular file as subject to the "Classpath" exception as provided
3663# by Oracle in the LICENSE file that accompanied this code.
3664#
3665# This code is distributed in the hope that it will be useful, but WITHOUT
3666# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3667# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3668# version 2 for more details (a copy is included in the LICENSE file that
3669# accompanied this code).
3670#
3671# You should have received a copy of the GNU General Public License version
3672# 2 along with this work; if not, write to the Free Software Foundation,
3673# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3674#
3675# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3676# or visit www.oracle.com if you need additional information or have any
3677# questions.
3678#
3679
3680
3681
3682
3683
3684
3685
3686# Check if the VS env variables were setup prior to running configure.
3687# If not, then find vcvarsall.bat and run it automatically, and integrate
3688# the set env variables into the spec file.
3689
3690
3691
3692
3693
3694
3695# This line needs to be here, verbatim, after all includes and the dummy hook
3696# definitions. It is replaced with custom functionality when building
3697# custom sources.
3698#CUSTOM_AUTOCONF_INCLUDE
3699
3700# Do not change or remove the following line, it is needed for consistency checks:
3701DATE_WHEN_GENERATED=1358165331
3702
3703###############################################################################
3704#
3705# Initialization / Boot-strapping
3706#
3707# The bootstrapping process needs to solve the "chicken or the egg" problem,
3708# thus it jumps back and forth, each time gaining something needed later on.
3709#
3710###############################################################################
3711
3712# Basic initialization that must happen first of all
3713
3714# Save the original command line. This is passed to us by the wrapper configure script.
3715
3716DATE_WHEN_CONFIGURED=`LANG=C date`
3717
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3719$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3720{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3721$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3722
3723
3724
3725# Start with tools that do not need have cross compilation support
3726# and can be expected to be found in the default PATH. These tools are
3727# used by configure. Nor are these tools expected to be found in the
3728# devkit from the builddeps server either, since they are
3729# needed to download the devkit.
3730
3731# First are all the simple required tools.
3732
3733    for ac_prog in basename
3734do
3735  # Extract the first word of "$ac_prog", so it can be a program name with args.
3736set dummy $ac_prog; ac_word=$2
3737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3738$as_echo_n "checking for $ac_word... " >&6; }
3739if test "${ac_cv_path_BASENAME+set}" = set; then :
3740  $as_echo_n "(cached) " >&6
3741else
3742  case $BASENAME in
3743  [\\/]* | ?:[\\/]*)
3744  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3745  ;;
3746  *)
3747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3748for as_dir in $PATH
3749do
3750  IFS=$as_save_IFS
3751  test -z "$as_dir" && as_dir=.
3752    for ac_exec_ext in '' $ac_executable_extensions; do
3753  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3754    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3756    break 2
3757  fi
3758done
3759  done
3760IFS=$as_save_IFS
3761
3762  ;;
3763esac
3764fi
3765BASENAME=$ac_cv_path_BASENAME
3766if test -n "$BASENAME"; then
3767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3768$as_echo "$BASENAME" >&6; }
3769else
3770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3771$as_echo "no" >&6; }
3772fi
3773
3774
3775  test -n "$BASENAME" && break
3776done
3777
3778
3779    if test "x$BASENAME" = x; then
3780        if test "xbasename" = x; then
3781          PROG_NAME=basename
3782        else
3783          PROG_NAME=basename
3784        fi
3785        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3786$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3787        as_fn_error $? "Cannot continue" "$LINENO" 5
3788    fi
3789
3790
3791
3792    for ac_prog in bash
3793do
3794  # Extract the first word of "$ac_prog", so it can be a program name with args.
3795set dummy $ac_prog; ac_word=$2
3796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3797$as_echo_n "checking for $ac_word... " >&6; }
3798if test "${ac_cv_path_BASH+set}" = set; then :
3799  $as_echo_n "(cached) " >&6
3800else
3801  case $BASH in
3802  [\\/]* | ?:[\\/]*)
3803  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3804  ;;
3805  *)
3806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3807for as_dir in $PATH
3808do
3809  IFS=$as_save_IFS
3810  test -z "$as_dir" && as_dir=.
3811    for ac_exec_ext in '' $ac_executable_extensions; do
3812  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3813    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3815    break 2
3816  fi
3817done
3818  done
3819IFS=$as_save_IFS
3820
3821  ;;
3822esac
3823fi
3824BASH=$ac_cv_path_BASH
3825if test -n "$BASH"; then
3826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3827$as_echo "$BASH" >&6; }
3828else
3829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3830$as_echo "no" >&6; }
3831fi
3832
3833
3834  test -n "$BASH" && break
3835done
3836
3837
3838    if test "x$BASH" = x; then
3839        if test "xbash" = x; then
3840          PROG_NAME=bash
3841        else
3842          PROG_NAME=bash
3843        fi
3844        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3845$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3846        as_fn_error $? "Cannot continue" "$LINENO" 5
3847    fi
3848
3849
3850
3851    for ac_prog in cat
3852do
3853  # Extract the first word of "$ac_prog", so it can be a program name with args.
3854set dummy $ac_prog; ac_word=$2
3855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3856$as_echo_n "checking for $ac_word... " >&6; }
3857if test "${ac_cv_path_CAT+set}" = set; then :
3858  $as_echo_n "(cached) " >&6
3859else
3860  case $CAT in
3861  [\\/]* | ?:[\\/]*)
3862  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3863  ;;
3864  *)
3865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3866for as_dir in $PATH
3867do
3868  IFS=$as_save_IFS
3869  test -z "$as_dir" && as_dir=.
3870    for ac_exec_ext in '' $ac_executable_extensions; do
3871  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3872    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3874    break 2
3875  fi
3876done
3877  done
3878IFS=$as_save_IFS
3879
3880  ;;
3881esac
3882fi
3883CAT=$ac_cv_path_CAT
3884if test -n "$CAT"; then
3885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3886$as_echo "$CAT" >&6; }
3887else
3888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3889$as_echo "no" >&6; }
3890fi
3891
3892
3893  test -n "$CAT" && break
3894done
3895
3896
3897    if test "x$CAT" = x; then
3898        if test "xcat" = x; then
3899          PROG_NAME=cat
3900        else
3901          PROG_NAME=cat
3902        fi
3903        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3904$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3905        as_fn_error $? "Cannot continue" "$LINENO" 5
3906    fi
3907
3908
3909
3910    for ac_prog in chmod
3911do
3912  # Extract the first word of "$ac_prog", so it can be a program name with args.
3913set dummy $ac_prog; ac_word=$2
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3915$as_echo_n "checking for $ac_word... " >&6; }
3916if test "${ac_cv_path_CHMOD+set}" = set; then :
3917  $as_echo_n "(cached) " >&6
3918else
3919  case $CHMOD in
3920  [\\/]* | ?:[\\/]*)
3921  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3922  ;;
3923  *)
3924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3925for as_dir in $PATH
3926do
3927  IFS=$as_save_IFS
3928  test -z "$as_dir" && as_dir=.
3929    for ac_exec_ext in '' $ac_executable_extensions; do
3930  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3931    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3933    break 2
3934  fi
3935done
3936  done
3937IFS=$as_save_IFS
3938
3939  ;;
3940esac
3941fi
3942CHMOD=$ac_cv_path_CHMOD
3943if test -n "$CHMOD"; then
3944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3945$as_echo "$CHMOD" >&6; }
3946else
3947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3948$as_echo "no" >&6; }
3949fi
3950
3951
3952  test -n "$CHMOD" && break
3953done
3954
3955
3956    if test "x$CHMOD" = x; then
3957        if test "xchmod" = x; then
3958          PROG_NAME=chmod
3959        else
3960          PROG_NAME=chmod
3961        fi
3962        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3963$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3964        as_fn_error $? "Cannot continue" "$LINENO" 5
3965    fi
3966
3967
3968
3969    for ac_prog in cmp
3970do
3971  # Extract the first word of "$ac_prog", so it can be a program name with args.
3972set dummy $ac_prog; ac_word=$2
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3974$as_echo_n "checking for $ac_word... " >&6; }
3975if test "${ac_cv_path_CMP+set}" = set; then :
3976  $as_echo_n "(cached) " >&6
3977else
3978  case $CMP in
3979  [\\/]* | ?:[\\/]*)
3980  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3981  ;;
3982  *)
3983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3984for as_dir in $PATH
3985do
3986  IFS=$as_save_IFS
3987  test -z "$as_dir" && as_dir=.
3988    for ac_exec_ext in '' $ac_executable_extensions; do
3989  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3990    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3992    break 2
3993  fi
3994done
3995  done
3996IFS=$as_save_IFS
3997
3998  ;;
3999esac
4000fi
4001CMP=$ac_cv_path_CMP
4002if test -n "$CMP"; then
4003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4004$as_echo "$CMP" >&6; }
4005else
4006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4007$as_echo "no" >&6; }
4008fi
4009
4010
4011  test -n "$CMP" && break
4012done
4013
4014
4015    if test "x$CMP" = x; then
4016        if test "xcmp" = x; then
4017          PROG_NAME=cmp
4018        else
4019          PROG_NAME=cmp
4020        fi
4021        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4022$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4023        as_fn_error $? "Cannot continue" "$LINENO" 5
4024    fi
4025
4026
4027
4028    for ac_prog in comm
4029do
4030  # Extract the first word of "$ac_prog", so it can be a program name with args.
4031set dummy $ac_prog; ac_word=$2
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4033$as_echo_n "checking for $ac_word... " >&6; }
4034if test "${ac_cv_path_COMM+set}" = set; then :
4035  $as_echo_n "(cached) " >&6
4036else
4037  case $COMM in
4038  [\\/]* | ?:[\\/]*)
4039  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4040  ;;
4041  *)
4042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4043for as_dir in $PATH
4044do
4045  IFS=$as_save_IFS
4046  test -z "$as_dir" && as_dir=.
4047    for ac_exec_ext in '' $ac_executable_extensions; do
4048  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4049    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4051    break 2
4052  fi
4053done
4054  done
4055IFS=$as_save_IFS
4056
4057  ;;
4058esac
4059fi
4060COMM=$ac_cv_path_COMM
4061if test -n "$COMM"; then
4062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4063$as_echo "$COMM" >&6; }
4064else
4065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4066$as_echo "no" >&6; }
4067fi
4068
4069
4070  test -n "$COMM" && break
4071done
4072
4073
4074    if test "x$COMM" = x; then
4075        if test "xcomm" = x; then
4076          PROG_NAME=comm
4077        else
4078          PROG_NAME=comm
4079        fi
4080        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4081$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4082        as_fn_error $? "Cannot continue" "$LINENO" 5
4083    fi
4084
4085
4086
4087    for ac_prog in cp
4088do
4089  # Extract the first word of "$ac_prog", so it can be a program name with args.
4090set dummy $ac_prog; ac_word=$2
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4092$as_echo_n "checking for $ac_word... " >&6; }
4093if test "${ac_cv_path_CP+set}" = set; then :
4094  $as_echo_n "(cached) " >&6
4095else
4096  case $CP in
4097  [\\/]* | ?:[\\/]*)
4098  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4099  ;;
4100  *)
4101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4102for as_dir in $PATH
4103do
4104  IFS=$as_save_IFS
4105  test -z "$as_dir" && as_dir=.
4106    for ac_exec_ext in '' $ac_executable_extensions; do
4107  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4108    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4110    break 2
4111  fi
4112done
4113  done
4114IFS=$as_save_IFS
4115
4116  ;;
4117esac
4118fi
4119CP=$ac_cv_path_CP
4120if test -n "$CP"; then
4121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4122$as_echo "$CP" >&6; }
4123else
4124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4125$as_echo "no" >&6; }
4126fi
4127
4128
4129  test -n "$CP" && break
4130done
4131
4132
4133    if test "x$CP" = x; then
4134        if test "xcp" = x; then
4135          PROG_NAME=cp
4136        else
4137          PROG_NAME=cp
4138        fi
4139        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4140$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4141        as_fn_error $? "Cannot continue" "$LINENO" 5
4142    fi
4143
4144
4145
4146    for ac_prog in cpio
4147do
4148  # Extract the first word of "$ac_prog", so it can be a program name with args.
4149set dummy $ac_prog; ac_word=$2
4150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4151$as_echo_n "checking for $ac_word... " >&6; }
4152if test "${ac_cv_path_CPIO+set}" = set; then :
4153  $as_echo_n "(cached) " >&6
4154else
4155  case $CPIO in
4156  [\\/]* | ?:[\\/]*)
4157  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4158  ;;
4159  *)
4160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4161for as_dir in $PATH
4162do
4163  IFS=$as_save_IFS
4164  test -z "$as_dir" && as_dir=.
4165    for ac_exec_ext in '' $ac_executable_extensions; do
4166  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4167    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4169    break 2
4170  fi
4171done
4172  done
4173IFS=$as_save_IFS
4174
4175  ;;
4176esac
4177fi
4178CPIO=$ac_cv_path_CPIO
4179if test -n "$CPIO"; then
4180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4181$as_echo "$CPIO" >&6; }
4182else
4183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4184$as_echo "no" >&6; }
4185fi
4186
4187
4188  test -n "$CPIO" && break
4189done
4190
4191
4192    if test "x$CPIO" = x; then
4193        if test "xcpio" = x; then
4194          PROG_NAME=cpio
4195        else
4196          PROG_NAME=cpio
4197        fi
4198        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4199$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4200        as_fn_error $? "Cannot continue" "$LINENO" 5
4201    fi
4202
4203
4204
4205    for ac_prog in cut
4206do
4207  # Extract the first word of "$ac_prog", so it can be a program name with args.
4208set dummy $ac_prog; ac_word=$2
4209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4210$as_echo_n "checking for $ac_word... " >&6; }
4211if test "${ac_cv_path_CUT+set}" = set; then :
4212  $as_echo_n "(cached) " >&6
4213else
4214  case $CUT in
4215  [\\/]* | ?:[\\/]*)
4216  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4217  ;;
4218  *)
4219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220for as_dir in $PATH
4221do
4222  IFS=$as_save_IFS
4223  test -z "$as_dir" && as_dir=.
4224    for ac_exec_ext in '' $ac_executable_extensions; do
4225  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4226    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4228    break 2
4229  fi
4230done
4231  done
4232IFS=$as_save_IFS
4233
4234  ;;
4235esac
4236fi
4237CUT=$ac_cv_path_CUT
4238if test -n "$CUT"; then
4239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4240$as_echo "$CUT" >&6; }
4241else
4242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4243$as_echo "no" >&6; }
4244fi
4245
4246
4247  test -n "$CUT" && break
4248done
4249
4250
4251    if test "x$CUT" = x; then
4252        if test "xcut" = x; then
4253          PROG_NAME=cut
4254        else
4255          PROG_NAME=cut
4256        fi
4257        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4258$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4259        as_fn_error $? "Cannot continue" "$LINENO" 5
4260    fi
4261
4262
4263
4264    for ac_prog in date
4265do
4266  # Extract the first word of "$ac_prog", so it can be a program name with args.
4267set dummy $ac_prog; ac_word=$2
4268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4269$as_echo_n "checking for $ac_word... " >&6; }
4270if test "${ac_cv_path_DATE+set}" = set; then :
4271  $as_echo_n "(cached) " >&6
4272else
4273  case $DATE in
4274  [\\/]* | ?:[\\/]*)
4275  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4276  ;;
4277  *)
4278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4279for as_dir in $PATH
4280do
4281  IFS=$as_save_IFS
4282  test -z "$as_dir" && as_dir=.
4283    for ac_exec_ext in '' $ac_executable_extensions; do
4284  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4285    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4287    break 2
4288  fi
4289done
4290  done
4291IFS=$as_save_IFS
4292
4293  ;;
4294esac
4295fi
4296DATE=$ac_cv_path_DATE
4297if test -n "$DATE"; then
4298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4299$as_echo "$DATE" >&6; }
4300else
4301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4302$as_echo "no" >&6; }
4303fi
4304
4305
4306  test -n "$DATE" && break
4307done
4308
4309
4310    if test "x$DATE" = x; then
4311        if test "xdate" = x; then
4312          PROG_NAME=date
4313        else
4314          PROG_NAME=date
4315        fi
4316        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4317$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4318        as_fn_error $? "Cannot continue" "$LINENO" 5
4319    fi
4320
4321
4322
4323    for ac_prog in gdiff diff
4324do
4325  # Extract the first word of "$ac_prog", so it can be a program name with args.
4326set dummy $ac_prog; ac_word=$2
4327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4328$as_echo_n "checking for $ac_word... " >&6; }
4329if test "${ac_cv_path_DIFF+set}" = set; then :
4330  $as_echo_n "(cached) " >&6
4331else
4332  case $DIFF in
4333  [\\/]* | ?:[\\/]*)
4334  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4335  ;;
4336  *)
4337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4338for as_dir in $PATH
4339do
4340  IFS=$as_save_IFS
4341  test -z "$as_dir" && as_dir=.
4342    for ac_exec_ext in '' $ac_executable_extensions; do
4343  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4344    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4346    break 2
4347  fi
4348done
4349  done
4350IFS=$as_save_IFS
4351
4352  ;;
4353esac
4354fi
4355DIFF=$ac_cv_path_DIFF
4356if test -n "$DIFF"; then
4357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4358$as_echo "$DIFF" >&6; }
4359else
4360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4361$as_echo "no" >&6; }
4362fi
4363
4364
4365  test -n "$DIFF" && break
4366done
4367
4368
4369    if test "x$DIFF" = x; then
4370        if test "xgdiff diff" = x; then
4371          PROG_NAME=diff
4372        else
4373          PROG_NAME=gdiff diff
4374        fi
4375        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4376$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4377        as_fn_error $? "Cannot continue" "$LINENO" 5
4378    fi
4379
4380
4381
4382    for ac_prog in dirname
4383do
4384  # Extract the first word of "$ac_prog", so it can be a program name with args.
4385set dummy $ac_prog; ac_word=$2
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4387$as_echo_n "checking for $ac_word... " >&6; }
4388if test "${ac_cv_path_DIRNAME+set}" = set; then :
4389  $as_echo_n "(cached) " >&6
4390else
4391  case $DIRNAME in
4392  [\\/]* | ?:[\\/]*)
4393  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4394  ;;
4395  *)
4396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4397for as_dir in $PATH
4398do
4399  IFS=$as_save_IFS
4400  test -z "$as_dir" && as_dir=.
4401    for ac_exec_ext in '' $ac_executable_extensions; do
4402  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4403    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4405    break 2
4406  fi
4407done
4408  done
4409IFS=$as_save_IFS
4410
4411  ;;
4412esac
4413fi
4414DIRNAME=$ac_cv_path_DIRNAME
4415if test -n "$DIRNAME"; then
4416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4417$as_echo "$DIRNAME" >&6; }
4418else
4419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4420$as_echo "no" >&6; }
4421fi
4422
4423
4424  test -n "$DIRNAME" && break
4425done
4426
4427
4428    if test "x$DIRNAME" = x; then
4429        if test "xdirname" = x; then
4430          PROG_NAME=dirname
4431        else
4432          PROG_NAME=dirname
4433        fi
4434        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4435$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4436        as_fn_error $? "Cannot continue" "$LINENO" 5
4437    fi
4438
4439
4440
4441    for ac_prog in echo
4442do
4443  # Extract the first word of "$ac_prog", so it can be a program name with args.
4444set dummy $ac_prog; ac_word=$2
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446$as_echo_n "checking for $ac_word... " >&6; }
4447if test "${ac_cv_path_ECHO+set}" = set; then :
4448  $as_echo_n "(cached) " >&6
4449else
4450  case $ECHO in
4451  [\\/]* | ?:[\\/]*)
4452  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4453  ;;
4454  *)
4455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4456for as_dir in $PATH
4457do
4458  IFS=$as_save_IFS
4459  test -z "$as_dir" && as_dir=.
4460    for ac_exec_ext in '' $ac_executable_extensions; do
4461  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4462    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4464    break 2
4465  fi
4466done
4467  done
4468IFS=$as_save_IFS
4469
4470  ;;
4471esac
4472fi
4473ECHO=$ac_cv_path_ECHO
4474if test -n "$ECHO"; then
4475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4476$as_echo "$ECHO" >&6; }
4477else
4478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479$as_echo "no" >&6; }
4480fi
4481
4482
4483  test -n "$ECHO" && break
4484done
4485
4486
4487    if test "x$ECHO" = x; then
4488        if test "xecho" = x; then
4489          PROG_NAME=echo
4490        else
4491          PROG_NAME=echo
4492        fi
4493        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4494$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4495        as_fn_error $? "Cannot continue" "$LINENO" 5
4496    fi
4497
4498
4499
4500    for ac_prog in expr
4501do
4502  # Extract the first word of "$ac_prog", so it can be a program name with args.
4503set dummy $ac_prog; ac_word=$2
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4505$as_echo_n "checking for $ac_word... " >&6; }
4506if test "${ac_cv_path_EXPR+set}" = set; then :
4507  $as_echo_n "(cached) " >&6
4508else
4509  case $EXPR in
4510  [\\/]* | ?:[\\/]*)
4511  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4512  ;;
4513  *)
4514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4515for as_dir in $PATH
4516do
4517  IFS=$as_save_IFS
4518  test -z "$as_dir" && as_dir=.
4519    for ac_exec_ext in '' $ac_executable_extensions; do
4520  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4521    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4523    break 2
4524  fi
4525done
4526  done
4527IFS=$as_save_IFS
4528
4529  ;;
4530esac
4531fi
4532EXPR=$ac_cv_path_EXPR
4533if test -n "$EXPR"; then
4534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4535$as_echo "$EXPR" >&6; }
4536else
4537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4538$as_echo "no" >&6; }
4539fi
4540
4541
4542  test -n "$EXPR" && break
4543done
4544
4545
4546    if test "x$EXPR" = x; then
4547        if test "xexpr" = x; then
4548          PROG_NAME=expr
4549        else
4550          PROG_NAME=expr
4551        fi
4552        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4553$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4554        as_fn_error $? "Cannot continue" "$LINENO" 5
4555    fi
4556
4557
4558
4559    for ac_prog in file
4560do
4561  # Extract the first word of "$ac_prog", so it can be a program name with args.
4562set dummy $ac_prog; ac_word=$2
4563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4564$as_echo_n "checking for $ac_word... " >&6; }
4565if test "${ac_cv_path_FILE+set}" = set; then :
4566  $as_echo_n "(cached) " >&6
4567else
4568  case $FILE in
4569  [\\/]* | ?:[\\/]*)
4570  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4571  ;;
4572  *)
4573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4574for as_dir in $PATH
4575do
4576  IFS=$as_save_IFS
4577  test -z "$as_dir" && as_dir=.
4578    for ac_exec_ext in '' $ac_executable_extensions; do
4579  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4580    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4582    break 2
4583  fi
4584done
4585  done
4586IFS=$as_save_IFS
4587
4588  ;;
4589esac
4590fi
4591FILE=$ac_cv_path_FILE
4592if test -n "$FILE"; then
4593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4594$as_echo "$FILE" >&6; }
4595else
4596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4597$as_echo "no" >&6; }
4598fi
4599
4600
4601  test -n "$FILE" && break
4602done
4603
4604
4605    if test "x$FILE" = x; then
4606        if test "xfile" = x; then
4607          PROG_NAME=file
4608        else
4609          PROG_NAME=file
4610        fi
4611        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4612$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4613        as_fn_error $? "Cannot continue" "$LINENO" 5
4614    fi
4615
4616
4617
4618    for ac_prog in find
4619do
4620  # Extract the first word of "$ac_prog", so it can be a program name with args.
4621set dummy $ac_prog; ac_word=$2
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4623$as_echo_n "checking for $ac_word... " >&6; }
4624if test "${ac_cv_path_FIND+set}" = set; then :
4625  $as_echo_n "(cached) " >&6
4626else
4627  case $FIND in
4628  [\\/]* | ?:[\\/]*)
4629  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4630  ;;
4631  *)
4632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4633for as_dir in $PATH
4634do
4635  IFS=$as_save_IFS
4636  test -z "$as_dir" && as_dir=.
4637    for ac_exec_ext in '' $ac_executable_extensions; do
4638  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4639    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4641    break 2
4642  fi
4643done
4644  done
4645IFS=$as_save_IFS
4646
4647  ;;
4648esac
4649fi
4650FIND=$ac_cv_path_FIND
4651if test -n "$FIND"; then
4652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4653$as_echo "$FIND" >&6; }
4654else
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4656$as_echo "no" >&6; }
4657fi
4658
4659
4660  test -n "$FIND" && break
4661done
4662
4663
4664    if test "x$FIND" = x; then
4665        if test "xfind" = x; then
4666          PROG_NAME=find
4667        else
4668          PROG_NAME=find
4669        fi
4670        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4671$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4672        as_fn_error $? "Cannot continue" "$LINENO" 5
4673    fi
4674
4675
4676
4677    for ac_prog in head
4678do
4679  # Extract the first word of "$ac_prog", so it can be a program name with args.
4680set dummy $ac_prog; ac_word=$2
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4682$as_echo_n "checking for $ac_word... " >&6; }
4683if test "${ac_cv_path_HEAD+set}" = set; then :
4684  $as_echo_n "(cached) " >&6
4685else
4686  case $HEAD in
4687  [\\/]* | ?:[\\/]*)
4688  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4689  ;;
4690  *)
4691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in $PATH
4693do
4694  IFS=$as_save_IFS
4695  test -z "$as_dir" && as_dir=.
4696    for ac_exec_ext in '' $ac_executable_extensions; do
4697  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4698    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4700    break 2
4701  fi
4702done
4703  done
4704IFS=$as_save_IFS
4705
4706  ;;
4707esac
4708fi
4709HEAD=$ac_cv_path_HEAD
4710if test -n "$HEAD"; then
4711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4712$as_echo "$HEAD" >&6; }
4713else
4714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715$as_echo "no" >&6; }
4716fi
4717
4718
4719  test -n "$HEAD" && break
4720done
4721
4722
4723    if test "x$HEAD" = x; then
4724        if test "xhead" = x; then
4725          PROG_NAME=head
4726        else
4727          PROG_NAME=head
4728        fi
4729        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4730$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4731        as_fn_error $? "Cannot continue" "$LINENO" 5
4732    fi
4733
4734
4735
4736    for ac_prog in ln
4737do
4738  # Extract the first word of "$ac_prog", so it can be a program name with args.
4739set dummy $ac_prog; ac_word=$2
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741$as_echo_n "checking for $ac_word... " >&6; }
4742if test "${ac_cv_path_LN+set}" = set; then :
4743  $as_echo_n "(cached) " >&6
4744else
4745  case $LN in
4746  [\\/]* | ?:[\\/]*)
4747  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4748  ;;
4749  *)
4750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751for as_dir in $PATH
4752do
4753  IFS=$as_save_IFS
4754  test -z "$as_dir" && as_dir=.
4755    for ac_exec_ext in '' $ac_executable_extensions; do
4756  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4757    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759    break 2
4760  fi
4761done
4762  done
4763IFS=$as_save_IFS
4764
4765  ;;
4766esac
4767fi
4768LN=$ac_cv_path_LN
4769if test -n "$LN"; then
4770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4771$as_echo "$LN" >&6; }
4772else
4773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774$as_echo "no" >&6; }
4775fi
4776
4777
4778  test -n "$LN" && break
4779done
4780
4781
4782    if test "x$LN" = x; then
4783        if test "xln" = x; then
4784          PROG_NAME=ln
4785        else
4786          PROG_NAME=ln
4787        fi
4788        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4789$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4790        as_fn_error $? "Cannot continue" "$LINENO" 5
4791    fi
4792
4793
4794
4795    for ac_prog in ls
4796do
4797  # Extract the first word of "$ac_prog", so it can be a program name with args.
4798set dummy $ac_prog; ac_word=$2
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4800$as_echo_n "checking for $ac_word... " >&6; }
4801if test "${ac_cv_path_LS+set}" = set; then :
4802  $as_echo_n "(cached) " >&6
4803else
4804  case $LS in
4805  [\\/]* | ?:[\\/]*)
4806  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4807  ;;
4808  *)
4809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4810for as_dir in $PATH
4811do
4812  IFS=$as_save_IFS
4813  test -z "$as_dir" && as_dir=.
4814    for ac_exec_ext in '' $ac_executable_extensions; do
4815  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4816    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4818    break 2
4819  fi
4820done
4821  done
4822IFS=$as_save_IFS
4823
4824  ;;
4825esac
4826fi
4827LS=$ac_cv_path_LS
4828if test -n "$LS"; then
4829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4830$as_echo "$LS" >&6; }
4831else
4832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
4834fi
4835
4836
4837  test -n "$LS" && break
4838done
4839
4840
4841    if test "x$LS" = x; then
4842        if test "xls" = x; then
4843          PROG_NAME=ls
4844        else
4845          PROG_NAME=ls
4846        fi
4847        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4848$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4849        as_fn_error $? "Cannot continue" "$LINENO" 5
4850    fi
4851
4852
4853
4854    for ac_prog in mkdir
4855do
4856  # Extract the first word of "$ac_prog", so it can be a program name with args.
4857set dummy $ac_prog; ac_word=$2
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4859$as_echo_n "checking for $ac_word... " >&6; }
4860if test "${ac_cv_path_MKDIR+set}" = set; then :
4861  $as_echo_n "(cached) " >&6
4862else
4863  case $MKDIR in
4864  [\\/]* | ?:[\\/]*)
4865  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4866  ;;
4867  *)
4868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869for as_dir in $PATH
4870do
4871  IFS=$as_save_IFS
4872  test -z "$as_dir" && as_dir=.
4873    for ac_exec_ext in '' $ac_executable_extensions; do
4874  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4875    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4877    break 2
4878  fi
4879done
4880  done
4881IFS=$as_save_IFS
4882
4883  ;;
4884esac
4885fi
4886MKDIR=$ac_cv_path_MKDIR
4887if test -n "$MKDIR"; then
4888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4889$as_echo "$MKDIR" >&6; }
4890else
4891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892$as_echo "no" >&6; }
4893fi
4894
4895
4896  test -n "$MKDIR" && break
4897done
4898
4899
4900    if test "x$MKDIR" = x; then
4901        if test "xmkdir" = x; then
4902          PROG_NAME=mkdir
4903        else
4904          PROG_NAME=mkdir
4905        fi
4906        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4907$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4908        as_fn_error $? "Cannot continue" "$LINENO" 5
4909    fi
4910
4911
4912
4913    for ac_prog in mktemp
4914do
4915  # Extract the first word of "$ac_prog", so it can be a program name with args.
4916set dummy $ac_prog; ac_word=$2
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4918$as_echo_n "checking for $ac_word... " >&6; }
4919if test "${ac_cv_path_MKTEMP+set}" = set; then :
4920  $as_echo_n "(cached) " >&6
4921else
4922  case $MKTEMP in
4923  [\\/]* | ?:[\\/]*)
4924  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4925  ;;
4926  *)
4927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4928for as_dir in $PATH
4929do
4930  IFS=$as_save_IFS
4931  test -z "$as_dir" && as_dir=.
4932    for ac_exec_ext in '' $ac_executable_extensions; do
4933  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4934    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4936    break 2
4937  fi
4938done
4939  done
4940IFS=$as_save_IFS
4941
4942  ;;
4943esac
4944fi
4945MKTEMP=$ac_cv_path_MKTEMP
4946if test -n "$MKTEMP"; then
4947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4948$as_echo "$MKTEMP" >&6; }
4949else
4950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951$as_echo "no" >&6; }
4952fi
4953
4954
4955  test -n "$MKTEMP" && break
4956done
4957
4958
4959    if test "x$MKTEMP" = x; then
4960        if test "xmktemp" = x; then
4961          PROG_NAME=mktemp
4962        else
4963          PROG_NAME=mktemp
4964        fi
4965        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4966$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4967        as_fn_error $? "Cannot continue" "$LINENO" 5
4968    fi
4969
4970
4971
4972    for ac_prog in mv
4973do
4974  # Extract the first word of "$ac_prog", so it can be a program name with args.
4975set dummy $ac_prog; ac_word=$2
4976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4977$as_echo_n "checking for $ac_word... " >&6; }
4978if test "${ac_cv_path_MV+set}" = set; then :
4979  $as_echo_n "(cached) " >&6
4980else
4981  case $MV in
4982  [\\/]* | ?:[\\/]*)
4983  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4984  ;;
4985  *)
4986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4987for as_dir in $PATH
4988do
4989  IFS=$as_save_IFS
4990  test -z "$as_dir" && as_dir=.
4991    for ac_exec_ext in '' $ac_executable_extensions; do
4992  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4993    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4995    break 2
4996  fi
4997done
4998  done
4999IFS=$as_save_IFS
5000
5001  ;;
5002esac
5003fi
5004MV=$ac_cv_path_MV
5005if test -n "$MV"; then
5006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5007$as_echo "$MV" >&6; }
5008else
5009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5010$as_echo "no" >&6; }
5011fi
5012
5013
5014  test -n "$MV" && break
5015done
5016
5017
5018    if test "x$MV" = x; then
5019        if test "xmv" = x; then
5020          PROG_NAME=mv
5021        else
5022          PROG_NAME=mv
5023        fi
5024        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5025$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5026        as_fn_error $? "Cannot continue" "$LINENO" 5
5027    fi
5028
5029
5030
5031    for ac_prog in printf
5032do
5033  # Extract the first word of "$ac_prog", so it can be a program name with args.
5034set dummy $ac_prog; ac_word=$2
5035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5036$as_echo_n "checking for $ac_word... " >&6; }
5037if test "${ac_cv_path_PRINTF+set}" = set; then :
5038  $as_echo_n "(cached) " >&6
5039else
5040  case $PRINTF in
5041  [\\/]* | ?:[\\/]*)
5042  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5043  ;;
5044  *)
5045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5046for as_dir in $PATH
5047do
5048  IFS=$as_save_IFS
5049  test -z "$as_dir" && as_dir=.
5050    for ac_exec_ext in '' $ac_executable_extensions; do
5051  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5052    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5054    break 2
5055  fi
5056done
5057  done
5058IFS=$as_save_IFS
5059
5060  ;;
5061esac
5062fi
5063PRINTF=$ac_cv_path_PRINTF
5064if test -n "$PRINTF"; then
5065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5066$as_echo "$PRINTF" >&6; }
5067else
5068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5069$as_echo "no" >&6; }
5070fi
5071
5072
5073  test -n "$PRINTF" && break
5074done
5075
5076
5077    if test "x$PRINTF" = x; then
5078        if test "xprintf" = x; then
5079          PROG_NAME=printf
5080        else
5081          PROG_NAME=printf
5082        fi
5083        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5084$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5085        as_fn_error $? "Cannot continue" "$LINENO" 5
5086    fi
5087
5088
5089
5090    for ac_prog in pwd
5091do
5092  # Extract the first word of "$ac_prog", so it can be a program name with args.
5093set dummy $ac_prog; ac_word=$2
5094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5095$as_echo_n "checking for $ac_word... " >&6; }
5096if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5097  $as_echo_n "(cached) " >&6
5098else
5099  case $THEPWDCMD in
5100  [\\/]* | ?:[\\/]*)
5101  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5102  ;;
5103  *)
5104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5105for as_dir in $PATH
5106do
5107  IFS=$as_save_IFS
5108  test -z "$as_dir" && as_dir=.
5109    for ac_exec_ext in '' $ac_executable_extensions; do
5110  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5111    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5113    break 2
5114  fi
5115done
5116  done
5117IFS=$as_save_IFS
5118
5119  ;;
5120esac
5121fi
5122THEPWDCMD=$ac_cv_path_THEPWDCMD
5123if test -n "$THEPWDCMD"; then
5124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5125$as_echo "$THEPWDCMD" >&6; }
5126else
5127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5128$as_echo "no" >&6; }
5129fi
5130
5131
5132  test -n "$THEPWDCMD" && break
5133done
5134
5135
5136    if test "x$THEPWDCMD" = x; then
5137        if test "xpwd" = x; then
5138          PROG_NAME=thepwdcmd
5139        else
5140          PROG_NAME=pwd
5141        fi
5142        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5143$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5144        as_fn_error $? "Cannot continue" "$LINENO" 5
5145    fi
5146
5147
5148
5149    for ac_prog in rm
5150do
5151  # Extract the first word of "$ac_prog", so it can be a program name with args.
5152set dummy $ac_prog; ac_word=$2
5153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5154$as_echo_n "checking for $ac_word... " >&6; }
5155if test "${ac_cv_path_RM+set}" = set; then :
5156  $as_echo_n "(cached) " >&6
5157else
5158  case $RM in
5159  [\\/]* | ?:[\\/]*)
5160  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5161  ;;
5162  *)
5163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5164for as_dir in $PATH
5165do
5166  IFS=$as_save_IFS
5167  test -z "$as_dir" && as_dir=.
5168    for ac_exec_ext in '' $ac_executable_extensions; do
5169  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5170    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5172    break 2
5173  fi
5174done
5175  done
5176IFS=$as_save_IFS
5177
5178  ;;
5179esac
5180fi
5181RM=$ac_cv_path_RM
5182if test -n "$RM"; then
5183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5184$as_echo "$RM" >&6; }
5185else
5186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5187$as_echo "no" >&6; }
5188fi
5189
5190
5191  test -n "$RM" && break
5192done
5193
5194
5195    if test "x$RM" = x; then
5196        if test "xrm" = x; then
5197          PROG_NAME=rm
5198        else
5199          PROG_NAME=rm
5200        fi
5201        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5202$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5203        as_fn_error $? "Cannot continue" "$LINENO" 5
5204    fi
5205
5206
5207
5208    for ac_prog in sh
5209do
5210  # Extract the first word of "$ac_prog", so it can be a program name with args.
5211set dummy $ac_prog; ac_word=$2
5212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5213$as_echo_n "checking for $ac_word... " >&6; }
5214if test "${ac_cv_path_SH+set}" = set; then :
5215  $as_echo_n "(cached) " >&6
5216else
5217  case $SH in
5218  [\\/]* | ?:[\\/]*)
5219  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5220  ;;
5221  *)
5222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in $PATH
5224do
5225  IFS=$as_save_IFS
5226  test -z "$as_dir" && as_dir=.
5227    for ac_exec_ext in '' $ac_executable_extensions; do
5228  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5229    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5231    break 2
5232  fi
5233done
5234  done
5235IFS=$as_save_IFS
5236
5237  ;;
5238esac
5239fi
5240SH=$ac_cv_path_SH
5241if test -n "$SH"; then
5242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5243$as_echo "$SH" >&6; }
5244else
5245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246$as_echo "no" >&6; }
5247fi
5248
5249
5250  test -n "$SH" && break
5251done
5252
5253
5254    if test "x$SH" = x; then
5255        if test "xsh" = x; then
5256          PROG_NAME=sh
5257        else
5258          PROG_NAME=sh
5259        fi
5260        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5261$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5262        as_fn_error $? "Cannot continue" "$LINENO" 5
5263    fi
5264
5265
5266
5267    for ac_prog in sort
5268do
5269  # Extract the first word of "$ac_prog", so it can be a program name with args.
5270set dummy $ac_prog; ac_word=$2
5271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5272$as_echo_n "checking for $ac_word... " >&6; }
5273if test "${ac_cv_path_SORT+set}" = set; then :
5274  $as_echo_n "(cached) " >&6
5275else
5276  case $SORT in
5277  [\\/]* | ?:[\\/]*)
5278  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5279  ;;
5280  *)
5281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5282for as_dir in $PATH
5283do
5284  IFS=$as_save_IFS
5285  test -z "$as_dir" && as_dir=.
5286    for ac_exec_ext in '' $ac_executable_extensions; do
5287  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5288    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5290    break 2
5291  fi
5292done
5293  done
5294IFS=$as_save_IFS
5295
5296  ;;
5297esac
5298fi
5299SORT=$ac_cv_path_SORT
5300if test -n "$SORT"; then
5301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5302$as_echo "$SORT" >&6; }
5303else
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5305$as_echo "no" >&6; }
5306fi
5307
5308
5309  test -n "$SORT" && break
5310done
5311
5312
5313    if test "x$SORT" = x; then
5314        if test "xsort" = x; then
5315          PROG_NAME=sort
5316        else
5317          PROG_NAME=sort
5318        fi
5319        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5320$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5321        as_fn_error $? "Cannot continue" "$LINENO" 5
5322    fi
5323
5324
5325
5326    for ac_prog in tail
5327do
5328  # Extract the first word of "$ac_prog", so it can be a program name with args.
5329set dummy $ac_prog; ac_word=$2
5330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5331$as_echo_n "checking for $ac_word... " >&6; }
5332if test "${ac_cv_path_TAIL+set}" = set; then :
5333  $as_echo_n "(cached) " >&6
5334else
5335  case $TAIL in
5336  [\\/]* | ?:[\\/]*)
5337  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5338  ;;
5339  *)
5340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5341for as_dir in $PATH
5342do
5343  IFS=$as_save_IFS
5344  test -z "$as_dir" && as_dir=.
5345    for ac_exec_ext in '' $ac_executable_extensions; do
5346  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5347    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5349    break 2
5350  fi
5351done
5352  done
5353IFS=$as_save_IFS
5354
5355  ;;
5356esac
5357fi
5358TAIL=$ac_cv_path_TAIL
5359if test -n "$TAIL"; then
5360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5361$as_echo "$TAIL" >&6; }
5362else
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5364$as_echo "no" >&6; }
5365fi
5366
5367
5368  test -n "$TAIL" && break
5369done
5370
5371
5372    if test "x$TAIL" = x; then
5373        if test "xtail" = x; then
5374          PROG_NAME=tail
5375        else
5376          PROG_NAME=tail
5377        fi
5378        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5379$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5380        as_fn_error $? "Cannot continue" "$LINENO" 5
5381    fi
5382
5383
5384
5385    for ac_prog in tar
5386do
5387  # Extract the first word of "$ac_prog", so it can be a program name with args.
5388set dummy $ac_prog; ac_word=$2
5389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5390$as_echo_n "checking for $ac_word... " >&6; }
5391if test "${ac_cv_path_TAR+set}" = set; then :
5392  $as_echo_n "(cached) " >&6
5393else
5394  case $TAR in
5395  [\\/]* | ?:[\\/]*)
5396  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5397  ;;
5398  *)
5399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5400for as_dir in $PATH
5401do
5402  IFS=$as_save_IFS
5403  test -z "$as_dir" && as_dir=.
5404    for ac_exec_ext in '' $ac_executable_extensions; do
5405  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5406    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5408    break 2
5409  fi
5410done
5411  done
5412IFS=$as_save_IFS
5413
5414  ;;
5415esac
5416fi
5417TAR=$ac_cv_path_TAR
5418if test -n "$TAR"; then
5419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5420$as_echo "$TAR" >&6; }
5421else
5422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5423$as_echo "no" >&6; }
5424fi
5425
5426
5427  test -n "$TAR" && break
5428done
5429
5430
5431    if test "x$TAR" = x; then
5432        if test "xtar" = x; then
5433          PROG_NAME=tar
5434        else
5435          PROG_NAME=tar
5436        fi
5437        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5438$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5439        as_fn_error $? "Cannot continue" "$LINENO" 5
5440    fi
5441
5442
5443
5444    for ac_prog in tee
5445do
5446  # Extract the first word of "$ac_prog", so it can be a program name with args.
5447set dummy $ac_prog; ac_word=$2
5448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5449$as_echo_n "checking for $ac_word... " >&6; }
5450if test "${ac_cv_path_TEE+set}" = set; then :
5451  $as_echo_n "(cached) " >&6
5452else
5453  case $TEE in
5454  [\\/]* | ?:[\\/]*)
5455  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5456  ;;
5457  *)
5458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5459for as_dir in $PATH
5460do
5461  IFS=$as_save_IFS
5462  test -z "$as_dir" && as_dir=.
5463    for ac_exec_ext in '' $ac_executable_extensions; do
5464  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5465    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5467    break 2
5468  fi
5469done
5470  done
5471IFS=$as_save_IFS
5472
5473  ;;
5474esac
5475fi
5476TEE=$ac_cv_path_TEE
5477if test -n "$TEE"; then
5478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5479$as_echo "$TEE" >&6; }
5480else
5481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5482$as_echo "no" >&6; }
5483fi
5484
5485
5486  test -n "$TEE" && break
5487done
5488
5489
5490    if test "x$TEE" = x; then
5491        if test "xtee" = x; then
5492          PROG_NAME=tee
5493        else
5494          PROG_NAME=tee
5495        fi
5496        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5497$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5498        as_fn_error $? "Cannot continue" "$LINENO" 5
5499    fi
5500
5501
5502
5503    for ac_prog in touch
5504do
5505  # Extract the first word of "$ac_prog", so it can be a program name with args.
5506set dummy $ac_prog; ac_word=$2
5507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5508$as_echo_n "checking for $ac_word... " >&6; }
5509if test "${ac_cv_path_TOUCH+set}" = set; then :
5510  $as_echo_n "(cached) " >&6
5511else
5512  case $TOUCH in
5513  [\\/]* | ?:[\\/]*)
5514  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5515  ;;
5516  *)
5517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5518for as_dir in $PATH
5519do
5520  IFS=$as_save_IFS
5521  test -z "$as_dir" && as_dir=.
5522    for ac_exec_ext in '' $ac_executable_extensions; do
5523  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5524    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5526    break 2
5527  fi
5528done
5529  done
5530IFS=$as_save_IFS
5531
5532  ;;
5533esac
5534fi
5535TOUCH=$ac_cv_path_TOUCH
5536if test -n "$TOUCH"; then
5537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5538$as_echo "$TOUCH" >&6; }
5539else
5540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5541$as_echo "no" >&6; }
5542fi
5543
5544
5545  test -n "$TOUCH" && break
5546done
5547
5548
5549    if test "x$TOUCH" = x; then
5550        if test "xtouch" = x; then
5551          PROG_NAME=touch
5552        else
5553          PROG_NAME=touch
5554        fi
5555        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5556$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5557        as_fn_error $? "Cannot continue" "$LINENO" 5
5558    fi
5559
5560
5561
5562    for ac_prog in tr
5563do
5564  # Extract the first word of "$ac_prog", so it can be a program name with args.
5565set dummy $ac_prog; ac_word=$2
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5567$as_echo_n "checking for $ac_word... " >&6; }
5568if test "${ac_cv_path_TR+set}" = set; then :
5569  $as_echo_n "(cached) " >&6
5570else
5571  case $TR in
5572  [\\/]* | ?:[\\/]*)
5573  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5574  ;;
5575  *)
5576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5577for as_dir in $PATH
5578do
5579  IFS=$as_save_IFS
5580  test -z "$as_dir" && as_dir=.
5581    for ac_exec_ext in '' $ac_executable_extensions; do
5582  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5583    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5585    break 2
5586  fi
5587done
5588  done
5589IFS=$as_save_IFS
5590
5591  ;;
5592esac
5593fi
5594TR=$ac_cv_path_TR
5595if test -n "$TR"; then
5596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5597$as_echo "$TR" >&6; }
5598else
5599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5600$as_echo "no" >&6; }
5601fi
5602
5603
5604  test -n "$TR" && break
5605done
5606
5607
5608    if test "x$TR" = x; then
5609        if test "xtr" = x; then
5610          PROG_NAME=tr
5611        else
5612          PROG_NAME=tr
5613        fi
5614        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5615$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5616        as_fn_error $? "Cannot continue" "$LINENO" 5
5617    fi
5618
5619
5620
5621    for ac_prog in uname
5622do
5623  # Extract the first word of "$ac_prog", so it can be a program name with args.
5624set dummy $ac_prog; ac_word=$2
5625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5626$as_echo_n "checking for $ac_word... " >&6; }
5627if test "${ac_cv_path_UNAME+set}" = set; then :
5628  $as_echo_n "(cached) " >&6
5629else
5630  case $UNAME in
5631  [\\/]* | ?:[\\/]*)
5632  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5633  ;;
5634  *)
5635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5636for as_dir in $PATH
5637do
5638  IFS=$as_save_IFS
5639  test -z "$as_dir" && as_dir=.
5640    for ac_exec_ext in '' $ac_executable_extensions; do
5641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5642    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5644    break 2
5645  fi
5646done
5647  done
5648IFS=$as_save_IFS
5649
5650  ;;
5651esac
5652fi
5653UNAME=$ac_cv_path_UNAME
5654if test -n "$UNAME"; then
5655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5656$as_echo "$UNAME" >&6; }
5657else
5658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5659$as_echo "no" >&6; }
5660fi
5661
5662
5663  test -n "$UNAME" && break
5664done
5665
5666
5667    if test "x$UNAME" = x; then
5668        if test "xuname" = x; then
5669          PROG_NAME=uname
5670        else
5671          PROG_NAME=uname
5672        fi
5673        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5674$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5675        as_fn_error $? "Cannot continue" "$LINENO" 5
5676    fi
5677
5678
5679
5680    for ac_prog in uniq
5681do
5682  # Extract the first word of "$ac_prog", so it can be a program name with args.
5683set dummy $ac_prog; ac_word=$2
5684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5685$as_echo_n "checking for $ac_word... " >&6; }
5686if test "${ac_cv_path_UNIQ+set}" = set; then :
5687  $as_echo_n "(cached) " >&6
5688else
5689  case $UNIQ in
5690  [\\/]* | ?:[\\/]*)
5691  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5692  ;;
5693  *)
5694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5695for as_dir in $PATH
5696do
5697  IFS=$as_save_IFS
5698  test -z "$as_dir" && as_dir=.
5699    for ac_exec_ext in '' $ac_executable_extensions; do
5700  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5701    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5703    break 2
5704  fi
5705done
5706  done
5707IFS=$as_save_IFS
5708
5709  ;;
5710esac
5711fi
5712UNIQ=$ac_cv_path_UNIQ
5713if test -n "$UNIQ"; then
5714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5715$as_echo "$UNIQ" >&6; }
5716else
5717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5718$as_echo "no" >&6; }
5719fi
5720
5721
5722  test -n "$UNIQ" && break
5723done
5724
5725
5726    if test "x$UNIQ" = x; then
5727        if test "xuniq" = x; then
5728          PROG_NAME=uniq
5729        else
5730          PROG_NAME=uniq
5731        fi
5732        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5733$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5734        as_fn_error $? "Cannot continue" "$LINENO" 5
5735    fi
5736
5737
5738
5739    for ac_prog in wc
5740do
5741  # Extract the first word of "$ac_prog", so it can be a program name with args.
5742set dummy $ac_prog; ac_word=$2
5743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5744$as_echo_n "checking for $ac_word... " >&6; }
5745if test "${ac_cv_path_WC+set}" = set; then :
5746  $as_echo_n "(cached) " >&6
5747else
5748  case $WC in
5749  [\\/]* | ?:[\\/]*)
5750  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5751  ;;
5752  *)
5753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5754for as_dir in $PATH
5755do
5756  IFS=$as_save_IFS
5757  test -z "$as_dir" && as_dir=.
5758    for ac_exec_ext in '' $ac_executable_extensions; do
5759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5760    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5762    break 2
5763  fi
5764done
5765  done
5766IFS=$as_save_IFS
5767
5768  ;;
5769esac
5770fi
5771WC=$ac_cv_path_WC
5772if test -n "$WC"; then
5773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5774$as_echo "$WC" >&6; }
5775else
5776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777$as_echo "no" >&6; }
5778fi
5779
5780
5781  test -n "$WC" && break
5782done
5783
5784
5785    if test "x$WC" = x; then
5786        if test "xwc" = x; then
5787          PROG_NAME=wc
5788        else
5789          PROG_NAME=wc
5790        fi
5791        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5792$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5793        as_fn_error $? "Cannot continue" "$LINENO" 5
5794    fi
5795
5796
5797
5798    for ac_prog in which
5799do
5800  # Extract the first word of "$ac_prog", so it can be a program name with args.
5801set dummy $ac_prog; ac_word=$2
5802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803$as_echo_n "checking for $ac_word... " >&6; }
5804if test "${ac_cv_path_WHICH+set}" = set; then :
5805  $as_echo_n "(cached) " >&6
5806else
5807  case $WHICH in
5808  [\\/]* | ?:[\\/]*)
5809  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5810  ;;
5811  *)
5812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813for as_dir in $PATH
5814do
5815  IFS=$as_save_IFS
5816  test -z "$as_dir" && as_dir=.
5817    for ac_exec_ext in '' $ac_executable_extensions; do
5818  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5819    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5821    break 2
5822  fi
5823done
5824  done
5825IFS=$as_save_IFS
5826
5827  ;;
5828esac
5829fi
5830WHICH=$ac_cv_path_WHICH
5831if test -n "$WHICH"; then
5832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5833$as_echo "$WHICH" >&6; }
5834else
5835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836$as_echo "no" >&6; }
5837fi
5838
5839
5840  test -n "$WHICH" && break
5841done
5842
5843
5844    if test "x$WHICH" = x; then
5845        if test "xwhich" = x; then
5846          PROG_NAME=which
5847        else
5848          PROG_NAME=which
5849        fi
5850        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5851$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5852        as_fn_error $? "Cannot continue" "$LINENO" 5
5853    fi
5854
5855
5856
5857    for ac_prog in xargs
5858do
5859  # Extract the first word of "$ac_prog", so it can be a program name with args.
5860set dummy $ac_prog; ac_word=$2
5861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5862$as_echo_n "checking for $ac_word... " >&6; }
5863if test "${ac_cv_path_XARGS+set}" = set; then :
5864  $as_echo_n "(cached) " >&6
5865else
5866  case $XARGS in
5867  [\\/]* | ?:[\\/]*)
5868  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5869  ;;
5870  *)
5871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5872for as_dir in $PATH
5873do
5874  IFS=$as_save_IFS
5875  test -z "$as_dir" && as_dir=.
5876    for ac_exec_ext in '' $ac_executable_extensions; do
5877  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5878    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5880    break 2
5881  fi
5882done
5883  done
5884IFS=$as_save_IFS
5885
5886  ;;
5887esac
5888fi
5889XARGS=$ac_cv_path_XARGS
5890if test -n "$XARGS"; then
5891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5892$as_echo "$XARGS" >&6; }
5893else
5894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5895$as_echo "no" >&6; }
5896fi
5897
5898
5899  test -n "$XARGS" && break
5900done
5901
5902
5903    if test "x$XARGS" = x; then
5904        if test "xxargs" = x; then
5905          PROG_NAME=xargs
5906        else
5907          PROG_NAME=xargs
5908        fi
5909        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5910$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5911        as_fn_error $? "Cannot continue" "$LINENO" 5
5912    fi
5913
5914
5915
5916# Then required tools that require some special treatment.
5917for ac_prog in gawk mawk nawk awk
5918do
5919  # Extract the first word of "$ac_prog", so it can be a program name with args.
5920set dummy $ac_prog; ac_word=$2
5921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5922$as_echo_n "checking for $ac_word... " >&6; }
5923if test "${ac_cv_prog_AWK+set}" = set; then :
5924  $as_echo_n "(cached) " >&6
5925else
5926  if test -n "$AWK"; then
5927  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5928else
5929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5930for as_dir in $PATH
5931do
5932  IFS=$as_save_IFS
5933  test -z "$as_dir" && as_dir=.
5934    for ac_exec_ext in '' $ac_executable_extensions; do
5935  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5936    ac_cv_prog_AWK="$ac_prog"
5937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5938    break 2
5939  fi
5940done
5941  done
5942IFS=$as_save_IFS
5943
5944fi
5945fi
5946AWK=$ac_cv_prog_AWK
5947if test -n "$AWK"; then
5948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5949$as_echo "$AWK" >&6; }
5950else
5951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5952$as_echo "no" >&6; }
5953fi
5954
5955
5956  test -n "$AWK" && break
5957done
5958
5959
5960    if test "x$AWK" = x; then
5961        if test "x" = x; then
5962          PROG_NAME=awk
5963        else
5964          PROG_NAME=
5965        fi
5966        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5967$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5968        as_fn_error $? "Cannot continue" "$LINENO" 5
5969    fi
5970
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5972$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5973if test "${ac_cv_path_GREP+set}" = set; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  if test -z "$GREP"; then
5977  ac_path_GREP_found=false
5978  # Loop through the user's path and test for each of PROGNAME-LIST
5979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5980for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5981do
5982  IFS=$as_save_IFS
5983  test -z "$as_dir" && as_dir=.
5984    for ac_prog in grep ggrep; do
5985    for ac_exec_ext in '' $ac_executable_extensions; do
5986      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5987      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5988# Check for GNU ac_path_GREP and select it if it is found.
5989  # Check for GNU $ac_path_GREP
5990case `"$ac_path_GREP" --version 2>&1` in
5991*GNU*)
5992  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5993*)
5994  ac_count=0
5995  $as_echo_n 0123456789 >"conftest.in"
5996  while :
5997  do
5998    cat "conftest.in" "conftest.in" >"conftest.tmp"
5999    mv "conftest.tmp" "conftest.in"
6000    cp "conftest.in" "conftest.nl"
6001    $as_echo 'GREP' >> "conftest.nl"
6002    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6003    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6004    as_fn_arith $ac_count + 1 && ac_count=$as_val
6005    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6006      # Best one so far, save it but keep looking for a better one
6007      ac_cv_path_GREP="$ac_path_GREP"
6008      ac_path_GREP_max=$ac_count
6009    fi
6010    # 10*(2^10) chars as input seems more than enough
6011    test $ac_count -gt 10 && break
6012  done
6013  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6014esac
6015
6016      $ac_path_GREP_found && break 3
6017    done
6018  done
6019  done
6020IFS=$as_save_IFS
6021  if test -z "$ac_cv_path_GREP"; then
6022    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6023  fi
6024else
6025  ac_cv_path_GREP=$GREP
6026fi
6027
6028fi
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6030$as_echo "$ac_cv_path_GREP" >&6; }
6031 GREP="$ac_cv_path_GREP"
6032
6033
6034
6035    if test "x$GREP" = x; then
6036        if test "x" = x; then
6037          PROG_NAME=grep
6038        else
6039          PROG_NAME=
6040        fi
6041        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6042$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6043        as_fn_error $? "Cannot continue" "$LINENO" 5
6044    fi
6045
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6047$as_echo_n "checking for egrep... " >&6; }
6048if test "${ac_cv_path_EGREP+set}" = set; then :
6049  $as_echo_n "(cached) " >&6
6050else
6051  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6052   then ac_cv_path_EGREP="$GREP -E"
6053   else
6054     if test -z "$EGREP"; then
6055  ac_path_EGREP_found=false
6056  # Loop through the user's path and test for each of PROGNAME-LIST
6057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6059do
6060  IFS=$as_save_IFS
6061  test -z "$as_dir" && as_dir=.
6062    for ac_prog in egrep; do
6063    for ac_exec_ext in '' $ac_executable_extensions; do
6064      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6065      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6066# Check for GNU ac_path_EGREP and select it if it is found.
6067  # Check for GNU $ac_path_EGREP
6068case `"$ac_path_EGREP" --version 2>&1` in
6069*GNU*)
6070  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6071*)
6072  ac_count=0
6073  $as_echo_n 0123456789 >"conftest.in"
6074  while :
6075  do
6076    cat "conftest.in" "conftest.in" >"conftest.tmp"
6077    mv "conftest.tmp" "conftest.in"
6078    cp "conftest.in" "conftest.nl"
6079    $as_echo 'EGREP' >> "conftest.nl"
6080    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6081    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6082    as_fn_arith $ac_count + 1 && ac_count=$as_val
6083    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6084      # Best one so far, save it but keep looking for a better one
6085      ac_cv_path_EGREP="$ac_path_EGREP"
6086      ac_path_EGREP_max=$ac_count
6087    fi
6088    # 10*(2^10) chars as input seems more than enough
6089    test $ac_count -gt 10 && break
6090  done
6091  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6092esac
6093
6094      $ac_path_EGREP_found && break 3
6095    done
6096  done
6097  done
6098IFS=$as_save_IFS
6099  if test -z "$ac_cv_path_EGREP"; then
6100    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6101  fi
6102else
6103  ac_cv_path_EGREP=$EGREP
6104fi
6105
6106   fi
6107fi
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6109$as_echo "$ac_cv_path_EGREP" >&6; }
6110 EGREP="$ac_cv_path_EGREP"
6111
6112
6113
6114    if test "x$EGREP" = x; then
6115        if test "x" = x; then
6116          PROG_NAME=egrep
6117        else
6118          PROG_NAME=
6119        fi
6120        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6121$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6122        as_fn_error $? "Cannot continue" "$LINENO" 5
6123    fi
6124
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6126$as_echo_n "checking for fgrep... " >&6; }
6127if test "${ac_cv_path_FGREP+set}" = set; then :
6128  $as_echo_n "(cached) " >&6
6129else
6130  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6131   then ac_cv_path_FGREP="$GREP -F"
6132   else
6133     if test -z "$FGREP"; then
6134  ac_path_FGREP_found=false
6135  # Loop through the user's path and test for each of PROGNAME-LIST
6136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6137for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6138do
6139  IFS=$as_save_IFS
6140  test -z "$as_dir" && as_dir=.
6141    for ac_prog in fgrep; do
6142    for ac_exec_ext in '' $ac_executable_extensions; do
6143      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6144      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6145# Check for GNU ac_path_FGREP and select it if it is found.
6146  # Check for GNU $ac_path_FGREP
6147case `"$ac_path_FGREP" --version 2>&1` in
6148*GNU*)
6149  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6150*)
6151  ac_count=0
6152  $as_echo_n 0123456789 >"conftest.in"
6153  while :
6154  do
6155    cat "conftest.in" "conftest.in" >"conftest.tmp"
6156    mv "conftest.tmp" "conftest.in"
6157    cp "conftest.in" "conftest.nl"
6158    $as_echo 'FGREP' >> "conftest.nl"
6159    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6160    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6161    as_fn_arith $ac_count + 1 && ac_count=$as_val
6162    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6163      # Best one so far, save it but keep looking for a better one
6164      ac_cv_path_FGREP="$ac_path_FGREP"
6165      ac_path_FGREP_max=$ac_count
6166    fi
6167    # 10*(2^10) chars as input seems more than enough
6168    test $ac_count -gt 10 && break
6169  done
6170  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6171esac
6172
6173      $ac_path_FGREP_found && break 3
6174    done
6175  done
6176  done
6177IFS=$as_save_IFS
6178  if test -z "$ac_cv_path_FGREP"; then
6179    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6180  fi
6181else
6182  ac_cv_path_FGREP=$FGREP
6183fi
6184
6185   fi
6186fi
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6188$as_echo "$ac_cv_path_FGREP" >&6; }
6189 FGREP="$ac_cv_path_FGREP"
6190
6191
6192
6193    if test "x$FGREP" = x; then
6194        if test "x" = x; then
6195          PROG_NAME=fgrep
6196        else
6197          PROG_NAME=
6198        fi
6199        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6200$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6201        as_fn_error $? "Cannot continue" "$LINENO" 5
6202    fi
6203
6204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6205$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6206if test "${ac_cv_path_SED+set}" = set; then :
6207  $as_echo_n "(cached) " >&6
6208else
6209            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6210     for ac_i in 1 2 3 4 5 6 7; do
6211       ac_script="$ac_script$as_nl$ac_script"
6212     done
6213     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6214     { ac_script=; unset ac_script;}
6215     if test -z "$SED"; then
6216  ac_path_SED_found=false
6217  # Loop through the user's path and test for each of PROGNAME-LIST
6218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6219for as_dir in $PATH
6220do
6221  IFS=$as_save_IFS
6222  test -z "$as_dir" && as_dir=.
6223    for ac_prog in sed gsed; do
6224    for ac_exec_ext in '' $ac_executable_extensions; do
6225      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6226      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6227# Check for GNU ac_path_SED and select it if it is found.
6228  # Check for GNU $ac_path_SED
6229case `"$ac_path_SED" --version 2>&1` in
6230*GNU*)
6231  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6232*)
6233  ac_count=0
6234  $as_echo_n 0123456789 >"conftest.in"
6235  while :
6236  do
6237    cat "conftest.in" "conftest.in" >"conftest.tmp"
6238    mv "conftest.tmp" "conftest.in"
6239    cp "conftest.in" "conftest.nl"
6240    $as_echo '' >> "conftest.nl"
6241    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6242    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6243    as_fn_arith $ac_count + 1 && ac_count=$as_val
6244    if test $ac_count -gt ${ac_path_SED_max-0}; then
6245      # Best one so far, save it but keep looking for a better one
6246      ac_cv_path_SED="$ac_path_SED"
6247      ac_path_SED_max=$ac_count
6248    fi
6249    # 10*(2^10) chars as input seems more than enough
6250    test $ac_count -gt 10 && break
6251  done
6252  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6253esac
6254
6255      $ac_path_SED_found && break 3
6256    done
6257  done
6258  done
6259IFS=$as_save_IFS
6260  if test -z "$ac_cv_path_SED"; then
6261    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6262  fi
6263else
6264  ac_cv_path_SED=$SED
6265fi
6266
6267fi
6268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6269$as_echo "$ac_cv_path_SED" >&6; }
6270 SED="$ac_cv_path_SED"
6271  rm -f conftest.sed
6272
6273
6274    if test "x$SED" = x; then
6275        if test "x" = x; then
6276          PROG_NAME=sed
6277        else
6278          PROG_NAME=
6279        fi
6280        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6281$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6282        as_fn_error $? "Cannot continue" "$LINENO" 5
6283    fi
6284
6285
6286for ac_prog in nawk gawk awk
6287do
6288  # Extract the first word of "$ac_prog", so it can be a program name with args.
6289set dummy $ac_prog; ac_word=$2
6290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6291$as_echo_n "checking for $ac_word... " >&6; }
6292if test "${ac_cv_path_NAWK+set}" = set; then :
6293  $as_echo_n "(cached) " >&6
6294else
6295  case $NAWK in
6296  [\\/]* | ?:[\\/]*)
6297  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6298  ;;
6299  *)
6300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301for as_dir in $PATH
6302do
6303  IFS=$as_save_IFS
6304  test -z "$as_dir" && as_dir=.
6305    for ac_exec_ext in '' $ac_executable_extensions; do
6306  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6307    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6309    break 2
6310  fi
6311done
6312  done
6313IFS=$as_save_IFS
6314
6315  ;;
6316esac
6317fi
6318NAWK=$ac_cv_path_NAWK
6319if test -n "$NAWK"; then
6320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6321$as_echo "$NAWK" >&6; }
6322else
6323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6324$as_echo "no" >&6; }
6325fi
6326
6327
6328  test -n "$NAWK" && break
6329done
6330
6331
6332    if test "x$NAWK" = x; then
6333        if test "x" = x; then
6334          PROG_NAME=nawk
6335        else
6336          PROG_NAME=
6337        fi
6338        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6339$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6340        as_fn_error $? "Cannot continue" "$LINENO" 5
6341    fi
6342
6343
6344# Always force rm.
6345RM="$RM -f"
6346
6347# These are not required on all platforms
6348# Extract the first word of "cygpath", so it can be a program name with args.
6349set dummy cygpath; ac_word=$2
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6351$as_echo_n "checking for $ac_word... " >&6; }
6352if test "${ac_cv_path_CYGPATH+set}" = set; then :
6353  $as_echo_n "(cached) " >&6
6354else
6355  case $CYGPATH in
6356  [\\/]* | ?:[\\/]*)
6357  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6358  ;;
6359  *)
6360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361for as_dir in $PATH
6362do
6363  IFS=$as_save_IFS
6364  test -z "$as_dir" && as_dir=.
6365    for ac_exec_ext in '' $ac_executable_extensions; do
6366  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6367    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6369    break 2
6370  fi
6371done
6372  done
6373IFS=$as_save_IFS
6374
6375  ;;
6376esac
6377fi
6378CYGPATH=$ac_cv_path_CYGPATH
6379if test -n "$CYGPATH"; then
6380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6381$as_echo "$CYGPATH" >&6; }
6382else
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6384$as_echo "no" >&6; }
6385fi
6386
6387
6388# Extract the first word of "readlink", so it can be a program name with args.
6389set dummy readlink; ac_word=$2
6390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391$as_echo_n "checking for $ac_word... " >&6; }
6392if test "${ac_cv_path_READLINK+set}" = set; then :
6393  $as_echo_n "(cached) " >&6
6394else
6395  case $READLINK in
6396  [\\/]* | ?:[\\/]*)
6397  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6398  ;;
6399  *)
6400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401for as_dir in $PATH
6402do
6403  IFS=$as_save_IFS
6404  test -z "$as_dir" && as_dir=.
6405    for ac_exec_ext in '' $ac_executable_extensions; do
6406  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6407    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6409    break 2
6410  fi
6411done
6412  done
6413IFS=$as_save_IFS
6414
6415  ;;
6416esac
6417fi
6418READLINK=$ac_cv_path_READLINK
6419if test -n "$READLINK"; then
6420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6421$as_echo "$READLINK" >&6; }
6422else
6423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424$as_echo "no" >&6; }
6425fi
6426
6427
6428# Extract the first word of "df", so it can be a program name with args.
6429set dummy df; ac_word=$2
6430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6431$as_echo_n "checking for $ac_word... " >&6; }
6432if test "${ac_cv_path_DF+set}" = set; then :
6433  $as_echo_n "(cached) " >&6
6434else
6435  case $DF in
6436  [\\/]* | ?:[\\/]*)
6437  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6438  ;;
6439  *)
6440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6441for as_dir in $PATH
6442do
6443  IFS=$as_save_IFS
6444  test -z "$as_dir" && as_dir=.
6445    for ac_exec_ext in '' $ac_executable_extensions; do
6446  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6447    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6449    break 2
6450  fi
6451done
6452  done
6453IFS=$as_save_IFS
6454
6455  ;;
6456esac
6457fi
6458DF=$ac_cv_path_DF
6459if test -n "$DF"; then
6460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6461$as_echo "$DF" >&6; }
6462else
6463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
6465fi
6466
6467
6468# Extract the first word of "SetFile", so it can be a program name with args.
6469set dummy SetFile; ac_word=$2
6470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6471$as_echo_n "checking for $ac_word... " >&6; }
6472if test "${ac_cv_path_SETFILE+set}" = set; then :
6473  $as_echo_n "(cached) " >&6
6474else
6475  case $SETFILE in
6476  [\\/]* | ?:[\\/]*)
6477  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6478  ;;
6479  *)
6480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6481for as_dir in $PATH
6482do
6483  IFS=$as_save_IFS
6484  test -z "$as_dir" && as_dir=.
6485    for ac_exec_ext in '' $ac_executable_extensions; do
6486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6487    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6489    break 2
6490  fi
6491done
6492  done
6493IFS=$as_save_IFS
6494
6495  ;;
6496esac
6497fi
6498SETFILE=$ac_cv_path_SETFILE
6499if test -n "$SETFILE"; then
6500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6501$as_echo "$SETFILE" >&6; }
6502else
6503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6504$as_echo "no" >&6; }
6505fi
6506
6507
6508
6509
6510# Now we can determine OpenJDK build and target platforms. This is required to
6511# have early on.
6512# Make sure we can run config.sub.
6513$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6514  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6515
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6517$as_echo_n "checking build system type... " >&6; }
6518if test "${ac_cv_build+set}" = set; then :
6519  $as_echo_n "(cached) " >&6
6520else
6521  ac_build_alias=$build_alias
6522test "x$ac_build_alias" = x &&
6523  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6524test "x$ac_build_alias" = x &&
6525  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6526ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6527  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6528
6529fi
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6531$as_echo "$ac_cv_build" >&6; }
6532case $ac_cv_build in
6533*-*-*) ;;
6534*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6535esac
6536build=$ac_cv_build
6537ac_save_IFS=$IFS; IFS='-'
6538set x $ac_cv_build
6539shift
6540build_cpu=$1
6541build_vendor=$2
6542shift; shift
6543# Remember, the first character of IFS is used to create $*,
6544# except with old shells:
6545build_os=$*
6546IFS=$ac_save_IFS
6547case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6548
6549
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6551$as_echo_n "checking host system type... " >&6; }
6552if test "${ac_cv_host+set}" = set; then :
6553  $as_echo_n "(cached) " >&6
6554else
6555  if test "x$host_alias" = x; then
6556  ac_cv_host=$ac_cv_build
6557else
6558  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6559    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6560fi
6561
6562fi
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6564$as_echo "$ac_cv_host" >&6; }
6565case $ac_cv_host in
6566*-*-*) ;;
6567*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6568esac
6569host=$ac_cv_host
6570ac_save_IFS=$IFS; IFS='-'
6571set x $ac_cv_host
6572shift
6573host_cpu=$1
6574host_vendor=$2
6575shift; shift
6576# Remember, the first character of IFS is used to create $*,
6577# except with old shells:
6578host_os=$*
6579IFS=$ac_save_IFS
6580case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6581
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6584$as_echo_n "checking target system type... " >&6; }
6585if test "${ac_cv_target+set}" = set; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  if test "x$target_alias" = x; then
6589  ac_cv_target=$ac_cv_host
6590else
6591  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6592    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6593fi
6594
6595fi
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6597$as_echo "$ac_cv_target" >&6; }
6598case $ac_cv_target in
6599*-*-*) ;;
6600*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6601esac
6602target=$ac_cv_target
6603ac_save_IFS=$IFS; IFS='-'
6604set x $ac_cv_target
6605shift
6606target_cpu=$1
6607target_vendor=$2
6608shift; shift
6609# Remember, the first character of IFS is used to create $*,
6610# except with old shells:
6611target_os=$*
6612IFS=$ac_save_IFS
6613case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6614
6615
6616# The aliases save the names the user supplied, while $host etc.
6617# will get canonicalized.
6618test -n "$target_alias" &&
6619  test "$program_prefix$program_suffix$program_transform_name" = \
6620    NONENONEs,x,x, &&
6621  program_prefix=${target_alias}-
6622
6623# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6624# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6625# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6626# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6627# to use the configure naming style.
6628
6629
6630
6631
6632
6633    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6634    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6635    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6636    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6637    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6638    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6639
6640
6641
6642    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6643
6644  case "$build_os" in
6645    *linux*)
6646      VAR_OS=linux
6647      VAR_OS_API=posix
6648      VAR_OS_ENV=linux
6649      ;;
6650    *solaris*)
6651      VAR_OS=solaris
6652      VAR_OS_API=posix
6653      VAR_OS_ENV=solaris
6654      ;;
6655    *darwin*)
6656      VAR_OS=macosx
6657      VAR_OS_API=posix
6658      VAR_OS_ENV=macosx
6659      ;;
6660    *bsd*)
6661      VAR_OS=bsd
6662      VAR_OS_API=posix
6663      VAR_OS_ENV=bsd
6664      ;;
6665    *cygwin*)
6666      VAR_OS=windows
6667      VAR_OS_API=winapi
6668      VAR_OS_ENV=windows.cygwin
6669      ;;
6670    *mingw*)
6671      VAR_OS=windows
6672      VAR_OS_API=winapi
6673      VAR_OS_ENV=windows.msys
6674      ;;
6675    *)
6676      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6677      ;;
6678  esac
6679
6680
6681  # First argument is the cpu name from the trip/quad
6682  case "$build_cpu" in
6683    x86_64)
6684      VAR_CPU=x86_64
6685      VAR_CPU_ARCH=x86
6686      VAR_CPU_BITS=64
6687      VAR_CPU_ENDIAN=little
6688      ;;
6689    i?86)
6690      VAR_CPU=x86
6691      VAR_CPU_ARCH=x86
6692      VAR_CPU_BITS=32
6693      VAR_CPU_ENDIAN=little
6694      ;;
6695    arm*)
6696      VAR_CPU=arm
6697      VAR_CPU_ARCH=arm
6698      VAR_CPU_BITS=32
6699      VAR_CPU_ENDIAN=little
6700      ;;
6701    powerpc)
6702      VAR_CPU=ppc
6703      VAR_CPU_ARCH=ppc
6704      VAR_CPU_BITS=32
6705      VAR_CPU_ENDIAN=big
6706       ;;
6707    powerpc64)
6708      VAR_CPU=ppc64
6709      VAR_CPU_ARCH=ppc
6710      VAR_CPU_BITS=64
6711      VAR_CPU_ENDIAN=big
6712       ;;
6713    sparc)
6714      VAR_CPU=sparc
6715      VAR_CPU_ARCH=sparc
6716      VAR_CPU_BITS=32
6717      VAR_CPU_ENDIAN=big
6718       ;;
6719    sparcv9)
6720      VAR_CPU=sparcv9
6721      VAR_CPU_ARCH=sparc
6722      VAR_CPU_BITS=64
6723      VAR_CPU_ENDIAN=big
6724       ;;
6725    *)
6726      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6727      ;;
6728  esac
6729
6730    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6731    OPENJDK_BUILD_OS="$VAR_OS"
6732    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6733    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6734    OPENJDK_BUILD_CPU="$VAR_CPU"
6735    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6736    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6737    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6738
6739
6740
6741
6742
6743
6744
6745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6746$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6748$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6749
6750    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6751
6752  case "$host_os" in
6753    *linux*)
6754      VAR_OS=linux
6755      VAR_OS_API=posix
6756      VAR_OS_ENV=linux
6757      ;;
6758    *solaris*)
6759      VAR_OS=solaris
6760      VAR_OS_API=posix
6761      VAR_OS_ENV=solaris
6762      ;;
6763    *darwin*)
6764      VAR_OS=macosx
6765      VAR_OS_API=posix
6766      VAR_OS_ENV=macosx
6767      ;;
6768    *bsd*)
6769      VAR_OS=bsd
6770      VAR_OS_API=posix
6771      VAR_OS_ENV=bsd
6772      ;;
6773    *cygwin*)
6774      VAR_OS=windows
6775      VAR_OS_API=winapi
6776      VAR_OS_ENV=windows.cygwin
6777      ;;
6778    *mingw*)
6779      VAR_OS=windows
6780      VAR_OS_API=winapi
6781      VAR_OS_ENV=windows.msys
6782      ;;
6783    *)
6784      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6785      ;;
6786  esac
6787
6788
6789  # First argument is the cpu name from the trip/quad
6790  case "$host_cpu" in
6791    x86_64)
6792      VAR_CPU=x86_64
6793      VAR_CPU_ARCH=x86
6794      VAR_CPU_BITS=64
6795      VAR_CPU_ENDIAN=little
6796      ;;
6797    i?86)
6798      VAR_CPU=x86
6799      VAR_CPU_ARCH=x86
6800      VAR_CPU_BITS=32
6801      VAR_CPU_ENDIAN=little
6802      ;;
6803    arm*)
6804      VAR_CPU=arm
6805      VAR_CPU_ARCH=arm
6806      VAR_CPU_BITS=32
6807      VAR_CPU_ENDIAN=little
6808      ;;
6809    powerpc)
6810      VAR_CPU=ppc
6811      VAR_CPU_ARCH=ppc
6812      VAR_CPU_BITS=32
6813      VAR_CPU_ENDIAN=big
6814       ;;
6815    powerpc64)
6816      VAR_CPU=ppc64
6817      VAR_CPU_ARCH=ppc
6818      VAR_CPU_BITS=64
6819      VAR_CPU_ENDIAN=big
6820       ;;
6821    sparc)
6822      VAR_CPU=sparc
6823      VAR_CPU_ARCH=sparc
6824      VAR_CPU_BITS=32
6825      VAR_CPU_ENDIAN=big
6826       ;;
6827    sparcv9)
6828      VAR_CPU=sparcv9
6829      VAR_CPU_ARCH=sparc
6830      VAR_CPU_BITS=64
6831      VAR_CPU_ENDIAN=big
6832       ;;
6833    *)
6834      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6835      ;;
6836  esac
6837
6838    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6839    OPENJDK_TARGET_OS="$VAR_OS"
6840    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6841    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6842    OPENJDK_TARGET_CPU="$VAR_CPU"
6843    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6844    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6845    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6846
6847
6848
6849
6850
6851
6852
6853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6854$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6856$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6857
6858
6859
6860# Check whether --with-target-bits was given.
6861if test "${with_target_bits+set}" = set; then :
6862  withval=$with_target_bits;
6863fi
6864
6865
6866  # We have three types of compiles:
6867  # native  == normal compilation, target system == build system
6868  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6869  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6870  #
6871  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6872    # We're doing a proper cross-compilation
6873    COMPILE_TYPE="cross"
6874  else
6875    COMPILE_TYPE="native"
6876  fi
6877
6878  if test "x$with_target_bits" != x; then
6879    if test "x$COMPILE_TYPE" = "xcross"; then
6880      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6881    fi
6882
6883    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6884      # A reduced build is requested
6885      COMPILE_TYPE="reduced"
6886      OPENJDK_TARGET_CPU_BITS=32
6887      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6888        OPENJDK_TARGET_CPU=x86
6889      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6890        OPENJDK_TARGET_CPU=sparc
6891      else
6892        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6893      fi
6894    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6895      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
6896    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6897      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6898$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6899    else
6900      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6901    fi
6902  fi
6903
6904
6905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6906$as_echo_n "checking compilation type... " >&6; }
6907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6908$as_echo "$COMPILE_TYPE" >&6; }
6909
6910
6911    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6912       REQUIRED_OS_NAME=SunOS
6913       REQUIRED_OS_VERSION=5.10
6914    fi
6915    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6916       REQUIRED_OS_NAME=Linux
6917       REQUIRED_OS_VERSION=2.6
6918    fi
6919    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6920        REQUIRED_OS_NAME=Windows
6921        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6922            REQUIRED_OS_VERSION=5.2
6923        else
6924            REQUIRED_OS_VERSION=5.1
6925        fi
6926    fi
6927    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6928        REQUIRED_OS_NAME=Darwin
6929        REQUIRED_OS_VERSION=11.2
6930    fi
6931
6932
6933
6934
6935
6936    # Also store the legacy naming of the cpu.
6937    # Ie i586 and amd64 instead of x86 and x86_64
6938    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6939    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6940      OPENJDK_TARGET_CPU_LEGACY="i586"
6941    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6942      # On all platforms except MacOSX replace x86_64 with amd64.
6943      OPENJDK_TARGET_CPU_LEGACY="amd64"
6944    fi
6945
6946
6947    # And the second legacy naming of the cpu.
6948    # Ie i386 and amd64 instead of x86 and x86_64.
6949    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6950    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6951      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6952    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6953      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6954    fi
6955
6956
6957    # This is the name of the cpu (but using i386 and amd64 instead of
6958    # x86 and x86_64, respectively), preceeded by a /, to be used when
6959    # locating libraries. On macosx, it's empty, though.
6960    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6961    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6962        OPENJDK_TARGET_CPU_LIBDIR=""
6963    fi
6964
6965
6966    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6967    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6968    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6969    OPENJDK_TARGET_CPU_ISADIR=""
6970    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6971      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6972          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6973      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6974          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6975      fi
6976    fi
6977
6978
6979    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6980    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6981    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6982      # On linux only, we replace x86 with i386.
6983      OPENJDK_TARGET_CPU_OSARCH="i386"
6984    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6985      # On all platforms except macosx, we replace x86_64 with amd64.
6986      OPENJDK_TARGET_CPU_OSARCH="amd64"
6987    fi
6988
6989
6990    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6991    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6992      OPENJDK_TARGET_CPU_JLI="i386"
6993    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6994      # On all platforms except macosx, we replace x86_64 with amd64.
6995      OPENJDK_TARGET_CPU_JLI="amd64"
6996    fi
6997    # Now setup the -D flags for building libjli.
6998    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6999    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7000      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7001        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7002      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7003        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7004      fi
7005    fi
7006
7007
7008    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7009    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7010        OPENJDK_TARGET_OS_API_DIR="solaris"
7011    fi
7012    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7013        OPENJDK_TARGET_OS_API_DIR="windows"
7014    fi
7015
7016
7017    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7018        A_LP64="LP64:="
7019        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7020        # unpack200.exe
7021        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7022            ADD_LP64="-D_LP64=1"
7023        fi
7024    fi
7025    LP64=$A_LP64
7026
7027
7028    if test "x$COMPILE_TYPE" = "xcross"; then
7029      # FIXME: ... or should this include reduced builds..?
7030      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7031    else
7032      DEFINE_CROSS_COMPILE_ARCH=""
7033    fi
7034
7035
7036
7037
7038# Continue setting up basic stuff. Most remaining code require fundamental tools.
7039
7040# Locate the directory of this script.
7041SCRIPT="$0"
7042
7043    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7044        # Follow a chain of symbolic links. Use readlink
7045        # where it exists, else fall back to horribly
7046        # complicated shell code.
7047        if test "x$READLINK_TESTED" != yes; then
7048            # On MacOSX there is a readlink tool with a different
7049            # purpose than the GNU readlink tool. Check the found readlink.
7050            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7051            if test "x$ISGNU" = x; then
7052                 # A readlink that we do not know how to use.
7053                 # Are there other non-GNU readlinks out there?
7054                 READLINK_TESTED=yes
7055                 READLINK=
7056            fi
7057        fi
7058
7059        if test "x$READLINK" != x; then
7060            SCRIPT=`$READLINK -f $SCRIPT`
7061        else
7062            # Save the current directory for restoring afterwards
7063            STARTDIR=$PWD
7064            COUNTER=0
7065            sym_link_dir=`$DIRNAME $SCRIPT`
7066            sym_link_file=`$BASENAME $SCRIPT`
7067            # Use the system pwd and not the shell builtin to resolve directory symlinks
7068            cd $sym_link_dir
7069            cd `$THEPWDCMD`
7070            sym_link_dir=`$THEPWDCMD`
7071            # Resolve file symlinks
7072            while test $COUNTER -lt 20; do
7073                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7074                if test "x$ISLINK" == x; then
7075                    # This is not a symbolic link! We are done!
7076                    break
7077                fi
7078                # Again resolve directory symlinks since the target of the just found
7079                # link could be in a different directory
7080                cd `$DIRNAME $ISLINK`
7081                sym_link_dir=`$THEPWDCMD`
7082                sym_link_file=`$BASENAME $ISLINK`
7083                let COUNTER=COUNTER+1
7084            done
7085            cd $STARTDIR
7086            SCRIPT=$sym_link_dir/$sym_link_file
7087        fi
7088    fi
7089
7090AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7091
7092# Where is the source? It is located two levels above the configure script.
7093CURDIR="$PWD"
7094cd "$AUTOCONF_DIR/../.."
7095SRC_ROOT="`$THEPWDCMD`"
7096
7097if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7098  PATH_SEP=";"
7099
7100  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7101  if test $SRC_ROOT_LENGTH -gt 100; then
7102      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7103  fi
7104
7105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7107$as_echo_n "checking cygwin release... " >&6; }
7108    CYGWIN_VERSION=`$UNAME -r`
7109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7110$as_echo "$CYGWIN_VERSION" >&6; }
7111    WINDOWS_ENV_VENDOR='cygwin'
7112    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7113
7114    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7115    if test "x$CYGWIN_VERSION_OK" = x; then
7116      { $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
7117$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;}
7118      as_fn_error $? "Cannot continue" "$LINENO" 5
7119    fi
7120    if test "x$CYGPATH" = x; then
7121        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7122    fi
7123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7124$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7125    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7126    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7127    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7128    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7130$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7131    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7132    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7133    if test "x$test_cygdrive_prefix" = x; then
7134        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7135    fi
7136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7138$as_echo_n "checking msys release... " >&6; }
7139    MSYS_VERSION=`$UNAME -r`
7140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7141$as_echo "$MSYS_VERSION" >&6; }
7142
7143    WINDOWS_ENV_VENDOR='msys'
7144    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7145
7146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7147$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7148    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7149    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7150
7151  windows_path="$MSYS_ROOT_PATH"
7152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7153    unix_path=`$CYGPATH -u "$windows_path"`
7154    MSYS_ROOT_PATH="$unix_path"
7155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7157    MSYS_ROOT_PATH="$unix_path"
7158  fi
7159
7160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7161$as_echo "$MSYS_ROOT_PATH" >&6; }
7162    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7163  else
7164    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7165  fi
7166
7167  # Test if windows or unix (cygwin/msys) find is first in path.
7168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7169$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7170  FIND_BINARY_OUTPUT=`find --version 2>&1`
7171  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7173$as_echo "unix style" >&6; }
7174  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7176$as_echo "Windows" >&6; }
7177    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7178$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7179    { $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
7180$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7181    as_fn_error $? "Cannot continue" "$LINENO" 5
7182  else
7183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7184$as_echo "unknown" >&6; }
7185    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7186$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7187  fi
7188
7189else
7190  PATH_SEP=":"
7191fi
7192
7193
7194
7195cd "$CURDIR"
7196
7197
7198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7199
7200  # Input might be given as Windows format, start by converting to
7201  # unix format.
7202  path="$SRC_ROOT"
7203  new_path=`$CYGPATH -u "$path"`
7204
7205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7208  # "foo.exe" is OK but "foo" is an error.
7209  #
7210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7211  # It is also a way to make sure we got the proper file name for the real test later on.
7212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7213  if test "x$test_shortpath" = x; then
7214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7215$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7216    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7217  fi
7218
7219  # Call helper function which possibly converts this using DOS-style short mode.
7220  # If so, the updated path is stored in $new_path.
7221
7222  input_path="$new_path"
7223  # Check if we need to convert this using DOS-style short mode. If the path
7224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7225  # take no chances and rewrite it.
7226  # Note: m4 eats our [], so we need to use [ and ] instead.
7227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7228  if test "x$has_forbidden_chars" != x; then
7229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7233      # Going to short mode and back again did indeed matter. Since short mode is
7234      # case insensitive, let's make it lowercase to improve readability.
7235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7236      # Now convert it back to Unix-stile (cygpath)
7237      input_path=`$CYGPATH -u "$shortmode_path"`
7238      new_path="$input_path"
7239    fi
7240  fi
7241
7242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7243  if test "x$test_cygdrive_prefix" = x; then
7244    # As a simple fix, exclude /usr/bin since it's not a real path.
7245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7247      # a path prefixed by /cygdrive for fixpath to work.
7248      new_path="$CYGWIN_ROOT_PATH$input_path"
7249    fi
7250  fi
7251
7252
7253  if test "x$path" != "x$new_path"; then
7254    SRC_ROOT="$new_path"
7255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7256$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7257  fi
7258
7259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7260
7261  path="$SRC_ROOT"
7262  has_colon=`$ECHO $path | $GREP ^.:`
7263  new_path="$path"
7264  if test "x$has_colon" = x; then
7265    # Not in mixed or Windows style, start by that.
7266    new_path=`cmd //c echo $path`
7267  fi
7268
7269
7270  input_path="$new_path"
7271  # Check if we need to convert this using DOS-style short mode. If the path
7272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7273  # take no chances and rewrite it.
7274  # Note: m4 eats our [], so we need to use [ and ] instead.
7275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7276  if test "x$has_forbidden_chars" != x; then
7277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7279  fi
7280
7281
7282  windows_path="$new_path"
7283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7284    unix_path=`$CYGPATH -u "$windows_path"`
7285    new_path="$unix_path"
7286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7288    new_path="$unix_path"
7289  fi
7290
7291  if test "x$path" != "x$new_path"; then
7292    SRC_ROOT="$new_path"
7293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7294$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7295  fi
7296
7297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7299
7300  else
7301    # We're on a posix platform. Hooray! :)
7302    path="$SRC_ROOT"
7303
7304    if test ! -f "$path" && test ! -d "$path"; then
7305      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7306    fi
7307
7308    has_space=`$ECHO "$path" | $GREP " "`
7309    if test "x$has_space" != x; then
7310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7311$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7313    fi
7314  fi
7315
7316
7317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7318
7319  # Input might be given as Windows format, start by converting to
7320  # unix format.
7321  path="$CURDIR"
7322  new_path=`$CYGPATH -u "$path"`
7323
7324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7327  # "foo.exe" is OK but "foo" is an error.
7328  #
7329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7330  # It is also a way to make sure we got the proper file name for the real test later on.
7331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7332  if test "x$test_shortpath" = x; then
7333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7334$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7335    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7336  fi
7337
7338  # Call helper function which possibly converts this using DOS-style short mode.
7339  # If so, the updated path is stored in $new_path.
7340
7341  input_path="$new_path"
7342  # Check if we need to convert this using DOS-style short mode. If the path
7343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7344  # take no chances and rewrite it.
7345  # Note: m4 eats our [], so we need to use [ and ] instead.
7346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7347  if test "x$has_forbidden_chars" != x; then
7348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7352      # Going to short mode and back again did indeed matter. Since short mode is
7353      # case insensitive, let's make it lowercase to improve readability.
7354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7355      # Now convert it back to Unix-stile (cygpath)
7356      input_path=`$CYGPATH -u "$shortmode_path"`
7357      new_path="$input_path"
7358    fi
7359  fi
7360
7361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7362  if test "x$test_cygdrive_prefix" = x; then
7363    # As a simple fix, exclude /usr/bin since it's not a real path.
7364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7366      # a path prefixed by /cygdrive for fixpath to work.
7367      new_path="$CYGWIN_ROOT_PATH$input_path"
7368    fi
7369  fi
7370
7371
7372  if test "x$path" != "x$new_path"; then
7373    CURDIR="$new_path"
7374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7375$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7376  fi
7377
7378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7379
7380  path="$CURDIR"
7381  has_colon=`$ECHO $path | $GREP ^.:`
7382  new_path="$path"
7383  if test "x$has_colon" = x; then
7384    # Not in mixed or Windows style, start by that.
7385    new_path=`cmd //c echo $path`
7386  fi
7387
7388
7389  input_path="$new_path"
7390  # Check if we need to convert this using DOS-style short mode. If the path
7391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7392  # take no chances and rewrite it.
7393  # Note: m4 eats our [], so we need to use [ and ] instead.
7394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7395  if test "x$has_forbidden_chars" != x; then
7396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7398  fi
7399
7400
7401  windows_path="$new_path"
7402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7403    unix_path=`$CYGPATH -u "$windows_path"`
7404    new_path="$unix_path"
7405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7407    new_path="$unix_path"
7408  fi
7409
7410  if test "x$path" != "x$new_path"; then
7411    CURDIR="$new_path"
7412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7413$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7414  fi
7415
7416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7418
7419  else
7420    # We're on a posix platform. Hooray! :)
7421    path="$CURDIR"
7422
7423    if test ! -f "$path" && test ! -d "$path"; then
7424      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7425    fi
7426
7427    has_space=`$ECHO "$path" | $GREP " "`
7428    if test "x$has_space" != x; then
7429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7430$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7431      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7432    fi
7433  fi
7434
7435
7436if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7437    # Add extra search paths on solaris for utilities like ar and as etc...
7438    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7439fi
7440
7441# You can force the sys-root if the sys-root encoded into the cross compiler tools
7442# is not correct.
7443
7444# Check whether --with-sys-root was given.
7445if test "${with_sys_root+set}" = set; then :
7446  withval=$with_sys_root;
7447fi
7448
7449
7450if test "x$with_sys_root" != x; then
7451  SYS_ROOT=$with_sys_root
7452else
7453  SYS_ROOT=/
7454fi
7455
7456
7457
7458# Check whether --with-tools-dir was given.
7459if test "${with_tools_dir+set}" = set; then :
7460  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7461fi
7462
7463
7464
7465# Check whether --with-devkit was given.
7466if test "${with_devkit+set}" = set; then :
7467  withval=$with_devkit;
7468    if test "x$with_sys_root" != x; then
7469      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7470    fi
7471    if test "x$with_tools_dir" != x; then
7472      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7473    fi
7474    TOOLS_DIR=$with_devkit/bin
7475    SYS_ROOT=$with_devkit/$host_alias/libc
7476
7477fi
7478
7479
7480
7481
7482# Setup default logging of stdout and stderr to build.log in the output root.
7483BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7484BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7485BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7486
7487
7488
7489
7490
7491# Check if it's a pure open build or if custom sources are to be used.
7492
7493  # Check whether --enable-openjdk-only was given.
7494if test "${enable_openjdk_only+set}" = set; then :
7495  enableval=$enable_openjdk_only;
7496else
7497  enable_openjdk_only="no"
7498fi
7499
7500
7501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7502$as_echo_n "checking for presence of closed sources... " >&6; }
7503  if test -d "$SRC_ROOT/jdk/src/closed"; then
7504    CLOSED_SOURCE_PRESENT=yes
7505  else
7506    CLOSED_SOURCE_PRESENT=no
7507  fi
7508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7509$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7510
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7512$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7513  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7515$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7516
7517  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7518    OPENJDK=true
7519    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7520      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7521$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7522    fi
7523  else
7524    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7525      OPENJDK=true
7526    else
7527      OPENJDK=false
7528    fi
7529  fi
7530
7531  if test "x$OPENJDK" = "xtrue"; then
7532    SET_OPENJDK="OPENJDK=true"
7533  fi
7534
7535
7536
7537
7538# These are needed to be able to create a configuration name (and thus the output directory)
7539
7540###############################################################################
7541#
7542# Check which variant of the JDK that we want to build.
7543# Currently we have:
7544#    normal:   standard edition
7545# but the custom make system may add other variants
7546#
7547# Effectively the JDK variant gives a name to a specific set of
7548# modules to compile into the JDK. In the future, these modules
7549# might even be Jigsaw modules.
7550#
7551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7552$as_echo_n "checking which variant of the JDK to build... " >&6; }
7553
7554# Check whether --with-jdk-variant was given.
7555if test "${with_jdk_variant+set}" = set; then :
7556  withval=$with_jdk_variant;
7557fi
7558
7559
7560if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7561    JDK_VARIANT="normal"
7562else
7563    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7564fi
7565
7566
7567
7568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7569$as_echo "$JDK_VARIANT" >&6; }
7570
7571
7572
7573###############################################################################
7574#
7575# Check which variants of the JVM that we want to build.
7576# Currently we have:
7577#    server: normal interpreter and a tiered C1/C2 compiler
7578#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7579#    minimal1: reduced form of client with optional VM services and features stripped out
7580#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7581#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7582#    zero: no machine code interpreter, no compiler
7583#    zeroshark: zero interpreter and shark/llvm compiler backend
7584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7585$as_echo_n "checking which variants of the JVM to build... " >&6; }
7586
7587# Check whether --with-jvm-variants was given.
7588if test "${with_jvm_variants+set}" = set; then :
7589  withval=$with_jvm_variants;
7590fi
7591
7592
7593if test "x$with_jvm_variants" = x; then
7594     with_jvm_variants="server"
7595fi
7596
7597JVM_VARIANTS=",$with_jvm_variants,"
7598TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7599
7600if test "x$TEST_VARIANTS" != "x,"; then
7601   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7602fi
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7604$as_echo "$with_jvm_variants" >&6; }
7605
7606JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7607JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7608JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7609JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7610JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7611JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7612
7613if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7614    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7615        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7616    fi
7617fi
7618if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7619    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7620        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7621    fi
7622fi
7623if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7624    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7625        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7626    fi
7627fi
7628
7629# Replace the commas with AND for use in the build directory name.
7630ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7631COUNT_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/'`
7632if test "x$COUNT_VARIANTS" != "x,1"; then
7633    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7634else
7635    BUILDING_MULTIPLE_JVM_VARIANTS=no
7636fi
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7647   MACOSX_UNIVERSAL="true"
7648fi
7649
7650
7651
7652
7653
7654###############################################################################
7655#
7656# Set the debug level
7657#    release: no debug information, all optimizations, no asserts.
7658#    fastdebug: debug information (-g), all optimizations, all asserts
7659#    slowdebug: debug information (-g), no optimizations, all asserts
7660#
7661DEBUG_LEVEL="release"
7662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7663$as_echo_n "checking which debug level to use... " >&6; }
7664# Check whether --enable-debug was given.
7665if test "${enable_debug+set}" = set; then :
7666  enableval=$enable_debug;
7667        ENABLE_DEBUG="${enableval}"
7668        DEBUG_LEVEL="fastdebug"
7669
7670else
7671  ENABLE_DEBUG="no"
7672fi
7673
7674
7675
7676# Check whether --with-debug-level was given.
7677if test "${with_debug_level+set}" = set; then :
7678  withval=$with_debug_level;
7679        DEBUG_LEVEL="${withval}"
7680        if test "x$ENABLE_DEBUG" = xyes; then
7681			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7682        fi
7683
7684fi
7685
7686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7687$as_echo "$DEBUG_LEVEL" >&6; }
7688
7689if test "x$DEBUG_LEVEL" != xrelease && \
7690   test "x$DEBUG_LEVEL" != xfastdebug && \
7691   test "x$DEBUG_LEVEL" != xslowdebug; then
7692   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7693fi
7694
7695
7696###############################################################################
7697#
7698# Setup legacy vars/targets and new vars to deal with different debug levels.
7699#
7700
7701case $DEBUG_LEVEL in
7702      release )
7703          VARIANT="OPT"
7704          FASTDEBUG="false"
7705          DEBUG_CLASSFILES="false"
7706          BUILD_VARIANT_RELEASE=""
7707          HOTSPOT_DEBUG_LEVEL="product"
7708          HOTSPOT_EXPORT="product"
7709           ;;
7710      fastdebug )
7711          VARIANT="DBG"
7712          FASTDEBUG="true"
7713          DEBUG_CLASSFILES="true"
7714          BUILD_VARIANT_RELEASE="-fastdebug"
7715          HOTSPOT_DEBUG_LEVEL="fastdebug"
7716          HOTSPOT_EXPORT="fastdebug"
7717           ;;
7718      slowdebug )
7719          VARIANT="DBG"
7720          FASTDEBUG="false"
7721          DEBUG_CLASSFILES="true"
7722          BUILD_VARIANT_RELEASE="-debug"
7723          HOTSPOT_DEBUG_LEVEL="jvmg"
7724          HOTSPOT_EXPORT="debug"
7725           ;;
7726esac
7727
7728#####
7729# Generate the legacy makefile targets for hotspot.
7730# The hotspot api for selecting the build artifacts, really, needs to be improved.
7731# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7732# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7733# But until then ...
7734HOTSPOT_TARGET=""
7735
7736if test "x$JVM_VARIANT_SERVER" = xtrue; then
7737    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7738fi
7739
7740if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7741    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7742fi
7743
7744if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7745    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7746fi
7747
7748if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7749    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7750fi
7751
7752if test "x$JVM_VARIANT_ZERO" = xtrue; then
7753    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7754fi
7755
7756if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7757    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7758fi
7759
7760HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7761
7762# On Macosx universal binaries are produced, but they only contain
7763# 64 bit intel. This invalidates control of which jvms are built
7764# from configure, but only server is valid anyway. Fix this
7765# when hotspot makefiles are rewritten.
7766if test "x$MACOSX_UNIVERSAL" = xtrue; then
7767    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7768fi
7769
7770#####
7771
7772
7773
7774
7775
7776
7777
7778
7779# With basic setup done, call the custom early hook.
7780
7781
7782# To properly create a configuration name, we need to have the OpenJDK target
7783# and options (variants and debug level) parsed.
7784
7785
7786
7787# Check whether --with-conf-name was given.
7788if test "${with_conf_name+set}" = set; then :
7789  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7790fi
7791
7792
7793# Test from where we are running configure, in or outside of src root.
7794# To enable comparison of directories, CURDIR needs to be symlink free
7795# just like SRC_ROOT already is
7796NOSYM_CURDIR="$CURDIR"
7797
7798    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7799        # Follow a chain of symbolic links. Use readlink
7800        # where it exists, else fall back to horribly
7801        # complicated shell code.
7802        if test "x$READLINK_TESTED" != yes; then
7803            # On MacOSX there is a readlink tool with a different
7804            # purpose than the GNU readlink tool. Check the found readlink.
7805            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7806            if test "x$ISGNU" = x; then
7807                 # A readlink that we do not know how to use.
7808                 # Are there other non-GNU readlinks out there?
7809                 READLINK_TESTED=yes
7810                 READLINK=
7811            fi
7812        fi
7813
7814        if test "x$READLINK" != x; then
7815            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7816        else
7817            # Save the current directory for restoring afterwards
7818            STARTDIR=$PWD
7819            COUNTER=0
7820            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7821            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7822            # Use the system pwd and not the shell builtin to resolve directory symlinks
7823            cd $sym_link_dir
7824            cd `$THEPWDCMD`
7825            sym_link_dir=`$THEPWDCMD`
7826            # Resolve file symlinks
7827            while test $COUNTER -lt 20; do
7828                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7829                if test "x$ISLINK" == x; then
7830                    # This is not a symbolic link! We are done!
7831                    break
7832                fi
7833                # Again resolve directory symlinks since the target of the just found
7834                # link could be in a different directory
7835                cd `$DIRNAME $ISLINK`
7836                sym_link_dir=`$THEPWDCMD`
7837                sym_link_file=`$BASENAME $ISLINK`
7838                let COUNTER=COUNTER+1
7839            done
7840            cd $STARTDIR
7841            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7842        fi
7843    fi
7844
7845if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7846        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7847        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7848    # We are running configure from the src root.
7849    # Create a default ./build/target-variant-debuglevel output root.
7850    if test "x${CONF_NAME}" = x; then
7851        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7852    fi
7853    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7854    $MKDIR -p "$OUTPUT_ROOT"
7855    if test ! -d "$OUTPUT_ROOT"; then
7856        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7857    fi
7858else
7859    # We are running configure from outside of the src dir.
7860    # Then use the current directory as output dir!
7861    # If configuration is situated in normal build directory, just use the build
7862    # directory name as configuration name, otherwise use the complete path.
7863    if test "x${CONF_NAME}" = x; then
7864        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7865    fi
7866    OUTPUT_ROOT="$CURDIR"
7867
7868    # WARNING: This might be a bad thing to do. You need to be sure you want to
7869    # have a configuration in this directory. Do some sanity checks!
7870
7871    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7872      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7873      # other files
7874      files_present=`$LS $OUTPUT_ROOT`
7875      # Configure has already touched config.log and confdefs.h in the current dir when this check
7876      # is performed.
7877      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7878                                             | $TR -d '\n'`
7879      if test "x$filtered_files" != x; then
7880        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7881$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7882        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7883$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7884        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7885$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7886        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7887$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7888        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7889$as_echo "$as_me: seriously mess up just about everything." >&6;}
7890        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7891$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7892        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7893$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7894        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7895      fi
7896    fi
7897fi
7898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7899$as_echo_n "checking what configuration name to use... " >&6; }
7900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7901$as_echo "$CONF_NAME" >&6; }
7902
7903
7904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7905
7906  # Input might be given as Windows format, start by converting to
7907  # unix format.
7908  path="$OUTPUT_ROOT"
7909  new_path=`$CYGPATH -u "$path"`
7910
7911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7914  # "foo.exe" is OK but "foo" is an error.
7915  #
7916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7917  # It is also a way to make sure we got the proper file name for the real test later on.
7918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7919  if test "x$test_shortpath" = x; then
7920    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7921$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7922    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7923  fi
7924
7925  # Call helper function which possibly converts this using DOS-style short mode.
7926  # If so, the updated path is stored in $new_path.
7927
7928  input_path="$new_path"
7929  # Check if we need to convert this using DOS-style short mode. If the path
7930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7931  # take no chances and rewrite it.
7932  # Note: m4 eats our [], so we need to use [ and ] instead.
7933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7934  if test "x$has_forbidden_chars" != x; then
7935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7939      # Going to short mode and back again did indeed matter. Since short mode is
7940      # case insensitive, let's make it lowercase to improve readability.
7941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7942      # Now convert it back to Unix-stile (cygpath)
7943      input_path=`$CYGPATH -u "$shortmode_path"`
7944      new_path="$input_path"
7945    fi
7946  fi
7947
7948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7949  if test "x$test_cygdrive_prefix" = x; then
7950    # As a simple fix, exclude /usr/bin since it's not a real path.
7951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7953      # a path prefixed by /cygdrive for fixpath to work.
7954      new_path="$CYGWIN_ROOT_PATH$input_path"
7955    fi
7956  fi
7957
7958
7959  if test "x$path" != "x$new_path"; then
7960    OUTPUT_ROOT="$new_path"
7961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7962$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7963  fi
7964
7965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7966
7967  path="$OUTPUT_ROOT"
7968  has_colon=`$ECHO $path | $GREP ^.:`
7969  new_path="$path"
7970  if test "x$has_colon" = x; then
7971    # Not in mixed or Windows style, start by that.
7972    new_path=`cmd //c echo $path`
7973  fi
7974
7975
7976  input_path="$new_path"
7977  # Check if we need to convert this using DOS-style short mode. If the path
7978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7979  # take no chances and rewrite it.
7980  # Note: m4 eats our [], so we need to use [ and ] instead.
7981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7982  if test "x$has_forbidden_chars" != x; then
7983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7985  fi
7986
7987
7988  windows_path="$new_path"
7989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7990    unix_path=`$CYGPATH -u "$windows_path"`
7991    new_path="$unix_path"
7992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7994    new_path="$unix_path"
7995  fi
7996
7997  if test "x$path" != "x$new_path"; then
7998    OUTPUT_ROOT="$new_path"
7999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8000$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8001  fi
8002
8003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8005
8006  else
8007    # We're on a posix platform. Hooray! :)
8008    path="$OUTPUT_ROOT"
8009
8010    if test ! -f "$path" && test ! -d "$path"; then
8011      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8012    fi
8013
8014    has_space=`$ECHO "$path" | $GREP " "`
8015    if test "x$has_space" != x; then
8016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8017$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8018      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8019    fi
8020  fi
8021
8022
8023SPEC=$OUTPUT_ROOT/spec.gmk
8024
8025CONF_NAME=$CONF_NAME
8026
8027OUTPUT_ROOT=$OUTPUT_ROOT
8028
8029
8030# Most of the probed defines are put into config.h
8031ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8032
8033# The spec.gmk file contains all variables for the make system.
8034ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8035
8036# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8037ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8038
8039# The bootcycle-spec.gmk file contains support for boot cycle builds.
8040ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8041
8042# The compare.sh is used to compare the build output to other builds.
8043ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8044
8045# Spec.sh is currently used by compare-objects.sh
8046ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8047
8048# The generated Makefile knows where the spec.gmk is and where the source is.
8049# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8050# which will look for generated configurations
8051ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8052
8053
8054# Save the arguments given to us
8055echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8056
8057
8058# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8059
8060    for ac_prog in apt-get yum port pkgutil pkgadd
8061do
8062  # Extract the first word of "$ac_prog", so it can be a program name with args.
8063set dummy $ac_prog; ac_word=$2
8064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8065$as_echo_n "checking for $ac_word... " >&6; }
8066if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8067  $as_echo_n "(cached) " >&6
8068else
8069  if test -n "$PKGHANDLER"; then
8070  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8071else
8072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8073for as_dir in $PATH
8074do
8075  IFS=$as_save_IFS
8076  test -z "$as_dir" && as_dir=.
8077    for ac_exec_ext in '' $ac_executable_extensions; do
8078  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8079    ac_cv_prog_PKGHANDLER="$ac_prog"
8080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8081    break 2
8082  fi
8083done
8084  done
8085IFS=$as_save_IFS
8086
8087fi
8088fi
8089PKGHANDLER=$ac_cv_prog_PKGHANDLER
8090if test -n "$PKGHANDLER"; then
8091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8092$as_echo "$PKGHANDLER" >&6; }
8093else
8094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8095$as_echo "no" >&6; }
8096fi
8097
8098
8099  test -n "$PKGHANDLER" && break
8100done
8101
8102
8103
8104# Setup tools that requires more complex handling, or that is not needed by the configure script.
8105
8106
8107  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8108  if test "x$MAKE" != x; then
8109    # User has supplied a make, test it.
8110    if test ! -f "$MAKE"; then
8111      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8112    fi
8113
8114  MAKE_CANDIDATE=""$MAKE""
8115  DESCRIPTION="user supplied MAKE=$MAKE"
8116  if test "x$MAKE_CANDIDATE" != x; then
8117    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8118$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8119    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8120    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8121    if test "x$IS_GNU_MAKE" = x; then
8122      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8123$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8124    else
8125      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8126      if test "x$IS_MODERN_MAKE" = x; then
8127        { $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
8128$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;}
8129      else
8130        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8131          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8132            MAKE_EXPECTED_ENV='cygwin'
8133          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8134            MAKE_EXPECTED_ENV='msys'
8135          else
8136            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8137          fi
8138          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8139          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8140        else
8141          # Not relevant for non-Windows
8142          IS_MAKE_CORRECT_ENV=true
8143        fi
8144        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8145          { $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
8146$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;}
8147        else
8148          FOUND_MAKE=$MAKE_CANDIDATE
8149
8150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8151
8152  # First separate the path from the arguments. This will split at the first
8153  # space.
8154  complete="$FOUND_MAKE"
8155  path="${complete%% *}"
8156  tmp="$complete EOL"
8157  arguments="${tmp#* }"
8158
8159  # Input might be given as Windows format, start by converting to
8160  # unix format.
8161  new_path=`$CYGPATH -u "$path"`
8162
8163  # Now try to locate executable using which
8164  new_path=`$WHICH "$new_path" 2> /dev/null`
8165  # bat and cmd files are not always considered executable in cygwin causing which
8166  # to not find them
8167  if test "x$new_path" = x \
8168           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8169           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8170    new_path=`$CYGPATH -u "$path"`
8171  fi
8172  if test "x$new_path" = x; then
8173    # Oops. Which didn't find the executable.
8174    # The splitting of arguments from the executable at a space might have been incorrect,
8175    # since paths with space are more likely in Windows. Give it another try with the whole
8176    # argument.
8177    path="$complete"
8178    arguments="EOL"
8179    new_path=`$CYGPATH -u "$path"`
8180    new_path=`$WHICH "$new_path" 2> /dev/null`
8181    # bat and cmd files are not always considered executable in cygwin causing which
8182    # to not find them
8183    if test "x$new_path" = x \
8184             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8185             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8186      new_path=`$CYGPATH -u "$path"`
8187    fi
8188    if test "x$new_path" = x; then
8189      # It's still not found. Now this is an unrecoverable error.
8190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8191$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8192      has_space=`$ECHO "$complete" | $GREP " "`
8193      if test "x$has_space" != x; then
8194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8196      fi
8197      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8198    fi
8199  fi
8200
8201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8204  # "foo.exe" is OK but "foo" is an error.
8205  #
8206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8207  # It is also a way to make sure we got the proper file name for the real test later on.
8208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8209  if test "x$test_shortpath" = x; then
8210    # Short path failed, file does not exist as specified.
8211    # Try adding .exe or .cmd
8212    if test -f "${new_path}.exe"; then
8213       input_to_shortpath="${new_path}.exe"
8214    elif test -f "${new_path}.cmd"; then
8215       input_to_shortpath="${new_path}.cmd"
8216    else
8217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8218$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8219      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8220$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8221      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8222    fi
8223  else
8224    input_to_shortpath="$new_path"
8225  fi
8226
8227  # Call helper function which possibly converts this using DOS-style short mode.
8228  # If so, the updated path is stored in $new_path.
8229  new_path="$input_to_shortpath"
8230
8231  input_path="$input_to_shortpath"
8232  # Check if we need to convert this using DOS-style short mode. If the path
8233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8234  # take no chances and rewrite it.
8235  # Note: m4 eats our [], so we need to use [ and ] instead.
8236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8237  if test "x$has_forbidden_chars" != x; then
8238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8242      # Going to short mode and back again did indeed matter. Since short mode is
8243      # case insensitive, let's make it lowercase to improve readability.
8244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8245      # Now convert it back to Unix-stile (cygpath)
8246      input_path=`$CYGPATH -u "$shortmode_path"`
8247      new_path="$input_path"
8248    fi
8249  fi
8250
8251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8252  if test "x$test_cygdrive_prefix" = x; then
8253    # As a simple fix, exclude /usr/bin since it's not a real path.
8254    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8256      # a path prefixed by /cygdrive for fixpath to work.
8257      new_path="$CYGWIN_ROOT_PATH$input_path"
8258    fi
8259  fi
8260
8261  # remove trailing .exe if any
8262  new_path="${new_path/%.exe/}"
8263
8264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8265
8266  # First separate the path from the arguments. This will split at the first
8267  # space.
8268  complete="$FOUND_MAKE"
8269  path="${complete%% *}"
8270  tmp="$complete EOL"
8271  arguments="${tmp#* }"
8272
8273  # Input might be given as Windows format, start by converting to
8274  # unix format.
8275  new_path="$path"
8276
8277  windows_path="$new_path"
8278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8279    unix_path=`$CYGPATH -u "$windows_path"`
8280    new_path="$unix_path"
8281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8283    new_path="$unix_path"
8284  fi
8285
8286
8287  # Now try to locate executable using which
8288  new_path=`$WHICH "$new_path" 2> /dev/null`
8289
8290  if test "x$new_path" = x; then
8291    # Oops. Which didn't find the executable.
8292    # The splitting of arguments from the executable at a space might have been incorrect,
8293    # since paths with space are more likely in Windows. Give it another try with the whole
8294    # argument.
8295    path="$complete"
8296    arguments="EOL"
8297    new_path="$path"
8298
8299  windows_path="$new_path"
8300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8301    unix_path=`$CYGPATH -u "$windows_path"`
8302    new_path="$unix_path"
8303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8305    new_path="$unix_path"
8306  fi
8307
8308
8309    new_path=`$WHICH "$new_path" 2> /dev/null`
8310
8311    if test "x$new_path" = x; then
8312      # It's still not found. Now this is an unrecoverable error.
8313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8314$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8315      has_space=`$ECHO "$complete" | $GREP " "`
8316      if test "x$has_space" != x; then
8317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8319      fi
8320      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8321    fi
8322  fi
8323
8324  # Now new_path has a complete unix path to the binary
8325  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8326    # Keep paths in /bin as-is, but remove trailing .exe if any
8327    new_path="${new_path/%.exe/}"
8328    # Do not save /bin paths to all_fixpath_prefixes!
8329  else
8330    # Not in mixed or Windows style, start by that.
8331    new_path=`cmd //c echo $new_path`
8332
8333  input_path="$new_path"
8334  # Check if we need to convert this using DOS-style short mode. If the path
8335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8336  # take no chances and rewrite it.
8337  # Note: m4 eats our [], so we need to use [ and ] instead.
8338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8339  if test "x$has_forbidden_chars" != x; then
8340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8342  fi
8343
8344    # Output is in $new_path
8345
8346  windows_path="$new_path"
8347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8348    unix_path=`$CYGPATH -u "$windows_path"`
8349    new_path="$unix_path"
8350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8352    new_path="$unix_path"
8353  fi
8354
8355    # remove trailing .exe if any
8356    new_path="${new_path/%.exe/}"
8357
8358    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8359    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8360  fi
8361
8362  else
8363    # We're on a posix platform. Hooray! :)
8364    # First separate the path from the arguments. This will split at the first
8365    # space.
8366    complete="$FOUND_MAKE"
8367    path="${complete%% *}"
8368    tmp="$complete EOL"
8369    arguments="${tmp#* }"
8370
8371    # Cannot rely on the command "which" here since it doesn't always work.
8372    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8373    if test -z "$is_absolute_path"; then
8374      # Path to executable is not absolute. Find it.
8375      IFS_save="$IFS"
8376      IFS=:
8377      for p in $PATH; do
8378        if test -f "$p/$path" && test -x "$p/$path"; then
8379          new_path="$p/$path"
8380          break
8381        fi
8382      done
8383      IFS="$IFS_save"
8384    else
8385      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8386$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8387      new_path="$path"
8388    fi
8389
8390    if test "x$new_path" = x; then
8391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8392$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8393        has_space=`$ECHO "$complete" | $GREP " "`
8394        if test "x$has_space" != x; then
8395          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8396$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8397        fi
8398        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8399      fi
8400  fi
8401
8402      # Now join together the path and the arguments once again
8403      if test "x$arguments" != xEOL; then
8404        new_complete="$new_path ${arguments% *}"
8405      else
8406        new_complete="$new_path"
8407      fi
8408
8409  if test "x$complete" != "x$new_complete"; then
8410      FOUND_MAKE="$new_complete"
8411      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8412$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8413    fi
8414
8415        fi
8416      fi
8417    fi
8418  fi
8419
8420    if test "x$FOUND_MAKE" = x; then
8421      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8422    fi
8423  else
8424    # Try our hardest to locate a correct version of GNU make
8425    for ac_prog in gmake
8426do
8427  # Extract the first word of "$ac_prog", so it can be a program name with args.
8428set dummy $ac_prog; ac_word=$2
8429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8430$as_echo_n "checking for $ac_word... " >&6; }
8431if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8432  $as_echo_n "(cached) " >&6
8433else
8434  case $CHECK_GMAKE in
8435  [\\/]* | ?:[\\/]*)
8436  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8437  ;;
8438  *)
8439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8440for as_dir in $PATH
8441do
8442  IFS=$as_save_IFS
8443  test -z "$as_dir" && as_dir=.
8444    for ac_exec_ext in '' $ac_executable_extensions; do
8445  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8446    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8448    break 2
8449  fi
8450done
8451  done
8452IFS=$as_save_IFS
8453
8454  ;;
8455esac
8456fi
8457CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8458if test -n "$CHECK_GMAKE"; then
8459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8460$as_echo "$CHECK_GMAKE" >&6; }
8461else
8462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8463$as_echo "no" >&6; }
8464fi
8465
8466
8467  test -n "$CHECK_GMAKE" && break
8468done
8469
8470
8471  MAKE_CANDIDATE=""$CHECK_GMAKE""
8472  DESCRIPTION="gmake in PATH"
8473  if test "x$MAKE_CANDIDATE" != x; then
8474    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8475$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8476    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8477    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8478    if test "x$IS_GNU_MAKE" = x; then
8479      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8480$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8481    else
8482      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8483      if test "x$IS_MODERN_MAKE" = x; then
8484        { $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
8485$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;}
8486      else
8487        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8488          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8489            MAKE_EXPECTED_ENV='cygwin'
8490          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8491            MAKE_EXPECTED_ENV='msys'
8492          else
8493            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8494          fi
8495          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8496          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8497        else
8498          # Not relevant for non-Windows
8499          IS_MAKE_CORRECT_ENV=true
8500        fi
8501        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8502          { $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
8503$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;}
8504        else
8505          FOUND_MAKE=$MAKE_CANDIDATE
8506
8507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8508
8509  # First separate the path from the arguments. This will split at the first
8510  # space.
8511  complete="$FOUND_MAKE"
8512  path="${complete%% *}"
8513  tmp="$complete EOL"
8514  arguments="${tmp#* }"
8515
8516  # Input might be given as Windows format, start by converting to
8517  # unix format.
8518  new_path=`$CYGPATH -u "$path"`
8519
8520  # Now try to locate executable using which
8521  new_path=`$WHICH "$new_path" 2> /dev/null`
8522  # bat and cmd files are not always considered executable in cygwin causing which
8523  # to not find them
8524  if test "x$new_path" = x \
8525           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8526           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8527    new_path=`$CYGPATH -u "$path"`
8528  fi
8529  if test "x$new_path" = x; then
8530    # Oops. Which didn't find the executable.
8531    # The splitting of arguments from the executable at a space might have been incorrect,
8532    # since paths with space are more likely in Windows. Give it another try with the whole
8533    # argument.
8534    path="$complete"
8535    arguments="EOL"
8536    new_path=`$CYGPATH -u "$path"`
8537    new_path=`$WHICH "$new_path" 2> /dev/null`
8538    # bat and cmd files are not always considered executable in cygwin causing which
8539    # to not find them
8540    if test "x$new_path" = x \
8541             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8542             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8543      new_path=`$CYGPATH -u "$path"`
8544    fi
8545    if test "x$new_path" = x; then
8546      # It's still not found. Now this is an unrecoverable error.
8547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8548$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8549      has_space=`$ECHO "$complete" | $GREP " "`
8550      if test "x$has_space" != x; then
8551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8553      fi
8554      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8555    fi
8556  fi
8557
8558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8561  # "foo.exe" is OK but "foo" is an error.
8562  #
8563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8564  # It is also a way to make sure we got the proper file name for the real test later on.
8565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8566  if test "x$test_shortpath" = x; then
8567    # Short path failed, file does not exist as specified.
8568    # Try adding .exe or .cmd
8569    if test -f "${new_path}.exe"; then
8570       input_to_shortpath="${new_path}.exe"
8571    elif test -f "${new_path}.cmd"; then
8572       input_to_shortpath="${new_path}.cmd"
8573    else
8574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8575$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8576      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8577$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8578      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8579    fi
8580  else
8581    input_to_shortpath="$new_path"
8582  fi
8583
8584  # Call helper function which possibly converts this using DOS-style short mode.
8585  # If so, the updated path is stored in $new_path.
8586  new_path="$input_to_shortpath"
8587
8588  input_path="$input_to_shortpath"
8589  # Check if we need to convert this using DOS-style short mode. If the path
8590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8591  # take no chances and rewrite it.
8592  # Note: m4 eats our [], so we need to use [ and ] instead.
8593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8594  if test "x$has_forbidden_chars" != x; then
8595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8599      # Going to short mode and back again did indeed matter. Since short mode is
8600      # case insensitive, let's make it lowercase to improve readability.
8601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8602      # Now convert it back to Unix-stile (cygpath)
8603      input_path=`$CYGPATH -u "$shortmode_path"`
8604      new_path="$input_path"
8605    fi
8606  fi
8607
8608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8609  if test "x$test_cygdrive_prefix" = x; then
8610    # As a simple fix, exclude /usr/bin since it's not a real path.
8611    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8613      # a path prefixed by /cygdrive for fixpath to work.
8614      new_path="$CYGWIN_ROOT_PATH$input_path"
8615    fi
8616  fi
8617
8618  # remove trailing .exe if any
8619  new_path="${new_path/%.exe/}"
8620
8621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8622
8623  # First separate the path from the arguments. This will split at the first
8624  # space.
8625  complete="$FOUND_MAKE"
8626  path="${complete%% *}"
8627  tmp="$complete EOL"
8628  arguments="${tmp#* }"
8629
8630  # Input might be given as Windows format, start by converting to
8631  # unix format.
8632  new_path="$path"
8633
8634  windows_path="$new_path"
8635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8636    unix_path=`$CYGPATH -u "$windows_path"`
8637    new_path="$unix_path"
8638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8640    new_path="$unix_path"
8641  fi
8642
8643
8644  # Now try to locate executable using which
8645  new_path=`$WHICH "$new_path" 2> /dev/null`
8646
8647  if test "x$new_path" = x; then
8648    # Oops. Which didn't find the executable.
8649    # The splitting of arguments from the executable at a space might have been incorrect,
8650    # since paths with space are more likely in Windows. Give it another try with the whole
8651    # argument.
8652    path="$complete"
8653    arguments="EOL"
8654    new_path="$path"
8655
8656  windows_path="$new_path"
8657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8658    unix_path=`$CYGPATH -u "$windows_path"`
8659    new_path="$unix_path"
8660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8662    new_path="$unix_path"
8663  fi
8664
8665
8666    new_path=`$WHICH "$new_path" 2> /dev/null`
8667
8668    if test "x$new_path" = x; then
8669      # It's still not found. Now this is an unrecoverable error.
8670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8671$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8672      has_space=`$ECHO "$complete" | $GREP " "`
8673      if test "x$has_space" != x; then
8674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8676      fi
8677      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8678    fi
8679  fi
8680
8681  # Now new_path has a complete unix path to the binary
8682  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8683    # Keep paths in /bin as-is, but remove trailing .exe if any
8684    new_path="${new_path/%.exe/}"
8685    # Do not save /bin paths to all_fixpath_prefixes!
8686  else
8687    # Not in mixed or Windows style, start by that.
8688    new_path=`cmd //c echo $new_path`
8689
8690  input_path="$new_path"
8691  # Check if we need to convert this using DOS-style short mode. If the path
8692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8693  # take no chances and rewrite it.
8694  # Note: m4 eats our [], so we need to use [ and ] instead.
8695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8696  if test "x$has_forbidden_chars" != x; then
8697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8699  fi
8700
8701    # Output is in $new_path
8702
8703  windows_path="$new_path"
8704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8705    unix_path=`$CYGPATH -u "$windows_path"`
8706    new_path="$unix_path"
8707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8709    new_path="$unix_path"
8710  fi
8711
8712    # remove trailing .exe if any
8713    new_path="${new_path/%.exe/}"
8714
8715    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8716    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8717  fi
8718
8719  else
8720    # We're on a posix platform. Hooray! :)
8721    # First separate the path from the arguments. This will split at the first
8722    # space.
8723    complete="$FOUND_MAKE"
8724    path="${complete%% *}"
8725    tmp="$complete EOL"
8726    arguments="${tmp#* }"
8727
8728    # Cannot rely on the command "which" here since it doesn't always work.
8729    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8730    if test -z "$is_absolute_path"; then
8731      # Path to executable is not absolute. Find it.
8732      IFS_save="$IFS"
8733      IFS=:
8734      for p in $PATH; do
8735        if test -f "$p/$path" && test -x "$p/$path"; then
8736          new_path="$p/$path"
8737          break
8738        fi
8739      done
8740      IFS="$IFS_save"
8741    else
8742      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8743$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8744      new_path="$path"
8745    fi
8746
8747    if test "x$new_path" = x; then
8748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8749$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8750        has_space=`$ECHO "$complete" | $GREP " "`
8751        if test "x$has_space" != x; then
8752          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8753$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8754        fi
8755        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8756      fi
8757  fi
8758
8759      # Now join together the path and the arguments once again
8760      if test "x$arguments" != xEOL; then
8761        new_complete="$new_path ${arguments% *}"
8762      else
8763        new_complete="$new_path"
8764      fi
8765
8766  if test "x$complete" != "x$new_complete"; then
8767      FOUND_MAKE="$new_complete"
8768      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8769$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8770    fi
8771
8772        fi
8773      fi
8774    fi
8775  fi
8776
8777
8778    if test "x$FOUND_MAKE" = x; then
8779      for ac_prog in make
8780do
8781  # Extract the first word of "$ac_prog", so it can be a program name with args.
8782set dummy $ac_prog; ac_word=$2
8783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8784$as_echo_n "checking for $ac_word... " >&6; }
8785if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8786  $as_echo_n "(cached) " >&6
8787else
8788  case $CHECK_MAKE in
8789  [\\/]* | ?:[\\/]*)
8790  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8791  ;;
8792  *)
8793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8794for as_dir in $PATH
8795do
8796  IFS=$as_save_IFS
8797  test -z "$as_dir" && as_dir=.
8798    for ac_exec_ext in '' $ac_executable_extensions; do
8799  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8800    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8802    break 2
8803  fi
8804done
8805  done
8806IFS=$as_save_IFS
8807
8808  ;;
8809esac
8810fi
8811CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8812if test -n "$CHECK_MAKE"; then
8813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8814$as_echo "$CHECK_MAKE" >&6; }
8815else
8816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8817$as_echo "no" >&6; }
8818fi
8819
8820
8821  test -n "$CHECK_MAKE" && break
8822done
8823
8824
8825  MAKE_CANDIDATE=""$CHECK_MAKE""
8826  DESCRIPTION="make in PATH"
8827  if test "x$MAKE_CANDIDATE" != x; then
8828    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8829$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8830    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8831    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8832    if test "x$IS_GNU_MAKE" = x; then
8833      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8834$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8835    else
8836      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8837      if test "x$IS_MODERN_MAKE" = x; then
8838        { $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
8839$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;}
8840      else
8841        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8842          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8843            MAKE_EXPECTED_ENV='cygwin'
8844          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8845            MAKE_EXPECTED_ENV='msys'
8846          else
8847            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8848          fi
8849          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8850          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8851        else
8852          # Not relevant for non-Windows
8853          IS_MAKE_CORRECT_ENV=true
8854        fi
8855        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8856          { $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
8857$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;}
8858        else
8859          FOUND_MAKE=$MAKE_CANDIDATE
8860
8861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8862
8863  # First separate the path from the arguments. This will split at the first
8864  # space.
8865  complete="$FOUND_MAKE"
8866  path="${complete%% *}"
8867  tmp="$complete EOL"
8868  arguments="${tmp#* }"
8869
8870  # Input might be given as Windows format, start by converting to
8871  # unix format.
8872  new_path=`$CYGPATH -u "$path"`
8873
8874  # Now try to locate executable using which
8875  new_path=`$WHICH "$new_path" 2> /dev/null`
8876  # bat and cmd files are not always considered executable in cygwin causing which
8877  # to not find them
8878  if test "x$new_path" = x \
8879           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8880           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8881    new_path=`$CYGPATH -u "$path"`
8882  fi
8883  if test "x$new_path" = x; then
8884    # Oops. Which didn't find the executable.
8885    # The splitting of arguments from the executable at a space might have been incorrect,
8886    # since paths with space are more likely in Windows. Give it another try with the whole
8887    # argument.
8888    path="$complete"
8889    arguments="EOL"
8890    new_path=`$CYGPATH -u "$path"`
8891    new_path=`$WHICH "$new_path" 2> /dev/null`
8892    # bat and cmd files are not always considered executable in cygwin causing which
8893    # to not find them
8894    if test "x$new_path" = x \
8895             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8896             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8897      new_path=`$CYGPATH -u "$path"`
8898    fi
8899    if test "x$new_path" = x; then
8900      # It's still not found. Now this is an unrecoverable error.
8901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8902$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8903      has_space=`$ECHO "$complete" | $GREP " "`
8904      if test "x$has_space" != x; then
8905        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8906$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8907      fi
8908      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8909    fi
8910  fi
8911
8912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8915  # "foo.exe" is OK but "foo" is an error.
8916  #
8917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8918  # It is also a way to make sure we got the proper file name for the real test later on.
8919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8920  if test "x$test_shortpath" = x; then
8921    # Short path failed, file does not exist as specified.
8922    # Try adding .exe or .cmd
8923    if test -f "${new_path}.exe"; then
8924       input_to_shortpath="${new_path}.exe"
8925    elif test -f "${new_path}.cmd"; then
8926       input_to_shortpath="${new_path}.cmd"
8927    else
8928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8929$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8930      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8931$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8932      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8933    fi
8934  else
8935    input_to_shortpath="$new_path"
8936  fi
8937
8938  # Call helper function which possibly converts this using DOS-style short mode.
8939  # If so, the updated path is stored in $new_path.
8940  new_path="$input_to_shortpath"
8941
8942  input_path="$input_to_shortpath"
8943  # Check if we need to convert this using DOS-style short mode. If the path
8944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8945  # take no chances and rewrite it.
8946  # Note: m4 eats our [], so we need to use [ and ] instead.
8947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8948  if test "x$has_forbidden_chars" != x; then
8949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8953      # Going to short mode and back again did indeed matter. Since short mode is
8954      # case insensitive, let's make it lowercase to improve readability.
8955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8956      # Now convert it back to Unix-stile (cygpath)
8957      input_path=`$CYGPATH -u "$shortmode_path"`
8958      new_path="$input_path"
8959    fi
8960  fi
8961
8962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8963  if test "x$test_cygdrive_prefix" = x; then
8964    # As a simple fix, exclude /usr/bin since it's not a real path.
8965    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8967      # a path prefixed by /cygdrive for fixpath to work.
8968      new_path="$CYGWIN_ROOT_PATH$input_path"
8969    fi
8970  fi
8971
8972  # remove trailing .exe if any
8973  new_path="${new_path/%.exe/}"
8974
8975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8976
8977  # First separate the path from the arguments. This will split at the first
8978  # space.
8979  complete="$FOUND_MAKE"
8980  path="${complete%% *}"
8981  tmp="$complete EOL"
8982  arguments="${tmp#* }"
8983
8984  # Input might be given as Windows format, start by converting to
8985  # unix format.
8986  new_path="$path"
8987
8988  windows_path="$new_path"
8989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8990    unix_path=`$CYGPATH -u "$windows_path"`
8991    new_path="$unix_path"
8992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8994    new_path="$unix_path"
8995  fi
8996
8997
8998  # Now try to locate executable using which
8999  new_path=`$WHICH "$new_path" 2> /dev/null`
9000
9001  if test "x$new_path" = x; then
9002    # Oops. Which didn't find the executable.
9003    # The splitting of arguments from the executable at a space might have been incorrect,
9004    # since paths with space are more likely in Windows. Give it another try with the whole
9005    # argument.
9006    path="$complete"
9007    arguments="EOL"
9008    new_path="$path"
9009
9010  windows_path="$new_path"
9011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9012    unix_path=`$CYGPATH -u "$windows_path"`
9013    new_path="$unix_path"
9014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9016    new_path="$unix_path"
9017  fi
9018
9019
9020    new_path=`$WHICH "$new_path" 2> /dev/null`
9021
9022    if test "x$new_path" = x; then
9023      # It's still not found. Now this is an unrecoverable error.
9024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9025$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9026      has_space=`$ECHO "$complete" | $GREP " "`
9027      if test "x$has_space" != x; then
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9029$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9030      fi
9031      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9032    fi
9033  fi
9034
9035  # Now new_path has a complete unix path to the binary
9036  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9037    # Keep paths in /bin as-is, but remove trailing .exe if any
9038    new_path="${new_path/%.exe/}"
9039    # Do not save /bin paths to all_fixpath_prefixes!
9040  else
9041    # Not in mixed or Windows style, start by that.
9042    new_path=`cmd //c echo $new_path`
9043
9044  input_path="$new_path"
9045  # Check if we need to convert this using DOS-style short mode. If the path
9046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9047  # take no chances and rewrite it.
9048  # Note: m4 eats our [], so we need to use [ and ] instead.
9049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9050  if test "x$has_forbidden_chars" != x; then
9051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9053  fi
9054
9055    # Output is in $new_path
9056
9057  windows_path="$new_path"
9058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9059    unix_path=`$CYGPATH -u "$windows_path"`
9060    new_path="$unix_path"
9061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9063    new_path="$unix_path"
9064  fi
9065
9066    # remove trailing .exe if any
9067    new_path="${new_path/%.exe/}"
9068
9069    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9070    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9071  fi
9072
9073  else
9074    # We're on a posix platform. Hooray! :)
9075    # First separate the path from the arguments. This will split at the first
9076    # space.
9077    complete="$FOUND_MAKE"
9078    path="${complete%% *}"
9079    tmp="$complete EOL"
9080    arguments="${tmp#* }"
9081
9082    # Cannot rely on the command "which" here since it doesn't always work.
9083    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9084    if test -z "$is_absolute_path"; then
9085      # Path to executable is not absolute. Find it.
9086      IFS_save="$IFS"
9087      IFS=:
9088      for p in $PATH; do
9089        if test -f "$p/$path" && test -x "$p/$path"; then
9090          new_path="$p/$path"
9091          break
9092        fi
9093      done
9094      IFS="$IFS_save"
9095    else
9096      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9097$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9098      new_path="$path"
9099    fi
9100
9101    if test "x$new_path" = x; then
9102        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9103$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9104        has_space=`$ECHO "$complete" | $GREP " "`
9105        if test "x$has_space" != x; then
9106          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9107$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9108        fi
9109        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9110      fi
9111  fi
9112
9113      # Now join together the path and the arguments once again
9114      if test "x$arguments" != xEOL; then
9115        new_complete="$new_path ${arguments% *}"
9116      else
9117        new_complete="$new_path"
9118      fi
9119
9120  if test "x$complete" != "x$new_complete"; then
9121      FOUND_MAKE="$new_complete"
9122      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9123$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9124    fi
9125
9126        fi
9127      fi
9128    fi
9129  fi
9130
9131    fi
9132
9133    if test "x$FOUND_MAKE" = x; then
9134      if test "x$TOOLS_DIR" != x; then
9135        # We have a tools-dir, check that as well before giving up.
9136        OLD_PATH=$PATH
9137        PATH=$TOOLS_DIR:$PATH
9138        for ac_prog in gmake
9139do
9140  # Extract the first word of "$ac_prog", so it can be a program name with args.
9141set dummy $ac_prog; ac_word=$2
9142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9143$as_echo_n "checking for $ac_word... " >&6; }
9144if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9145  $as_echo_n "(cached) " >&6
9146else
9147  case $CHECK_TOOLSDIR_GMAKE in
9148  [\\/]* | ?:[\\/]*)
9149  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9150  ;;
9151  *)
9152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9153for as_dir in $PATH
9154do
9155  IFS=$as_save_IFS
9156  test -z "$as_dir" && as_dir=.
9157    for ac_exec_ext in '' $ac_executable_extensions; do
9158  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9159    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9161    break 2
9162  fi
9163done
9164  done
9165IFS=$as_save_IFS
9166
9167  ;;
9168esac
9169fi
9170CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9171if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9173$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9174else
9175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9176$as_echo "no" >&6; }
9177fi
9178
9179
9180  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9181done
9182
9183
9184  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9185  DESCRIPTION="gmake in tools-dir"
9186  if test "x$MAKE_CANDIDATE" != x; then
9187    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9188$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9189    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9190    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9191    if test "x$IS_GNU_MAKE" = x; then
9192      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9193$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9194    else
9195      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9196      if test "x$IS_MODERN_MAKE" = x; then
9197        { $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
9198$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;}
9199      else
9200        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9201          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9202            MAKE_EXPECTED_ENV='cygwin'
9203          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9204            MAKE_EXPECTED_ENV='msys'
9205          else
9206            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9207          fi
9208          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9209          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9210        else
9211          # Not relevant for non-Windows
9212          IS_MAKE_CORRECT_ENV=true
9213        fi
9214        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9215          { $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
9216$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;}
9217        else
9218          FOUND_MAKE=$MAKE_CANDIDATE
9219
9220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9221
9222  # First separate the path from the arguments. This will split at the first
9223  # space.
9224  complete="$FOUND_MAKE"
9225  path="${complete%% *}"
9226  tmp="$complete EOL"
9227  arguments="${tmp#* }"
9228
9229  # Input might be given as Windows format, start by converting to
9230  # unix format.
9231  new_path=`$CYGPATH -u "$path"`
9232
9233  # Now try to locate executable using which
9234  new_path=`$WHICH "$new_path" 2> /dev/null`
9235  # bat and cmd files are not always considered executable in cygwin causing which
9236  # to not find them
9237  if test "x$new_path" = x \
9238           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9239           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9240    new_path=`$CYGPATH -u "$path"`
9241  fi
9242  if test "x$new_path" = x; then
9243    # Oops. Which didn't find the executable.
9244    # The splitting of arguments from the executable at a space might have been incorrect,
9245    # since paths with space are more likely in Windows. Give it another try with the whole
9246    # argument.
9247    path="$complete"
9248    arguments="EOL"
9249    new_path=`$CYGPATH -u "$path"`
9250    new_path=`$WHICH "$new_path" 2> /dev/null`
9251    # bat and cmd files are not always considered executable in cygwin causing which
9252    # to not find them
9253    if test "x$new_path" = x \
9254             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9255             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9256      new_path=`$CYGPATH -u "$path"`
9257    fi
9258    if test "x$new_path" = x; then
9259      # It's still not found. Now this is an unrecoverable error.
9260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9261$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9262      has_space=`$ECHO "$complete" | $GREP " "`
9263      if test "x$has_space" != x; then
9264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9266      fi
9267      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9268    fi
9269  fi
9270
9271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9274  # "foo.exe" is OK but "foo" is an error.
9275  #
9276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9277  # It is also a way to make sure we got the proper file name for the real test later on.
9278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9279  if test "x$test_shortpath" = x; then
9280    # Short path failed, file does not exist as specified.
9281    # Try adding .exe or .cmd
9282    if test -f "${new_path}.exe"; then
9283       input_to_shortpath="${new_path}.exe"
9284    elif test -f "${new_path}.cmd"; then
9285       input_to_shortpath="${new_path}.cmd"
9286    else
9287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9288$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9289      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9290$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9291      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9292    fi
9293  else
9294    input_to_shortpath="$new_path"
9295  fi
9296
9297  # Call helper function which possibly converts this using DOS-style short mode.
9298  # If so, the updated path is stored in $new_path.
9299  new_path="$input_to_shortpath"
9300
9301  input_path="$input_to_shortpath"
9302  # Check if we need to convert this using DOS-style short mode. If the path
9303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9304  # take no chances and rewrite it.
9305  # Note: m4 eats our [], so we need to use [ and ] instead.
9306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9307  if test "x$has_forbidden_chars" != x; then
9308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9312      # Going to short mode and back again did indeed matter. Since short mode is
9313      # case insensitive, let's make it lowercase to improve readability.
9314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9315      # Now convert it back to Unix-stile (cygpath)
9316      input_path=`$CYGPATH -u "$shortmode_path"`
9317      new_path="$input_path"
9318    fi
9319  fi
9320
9321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9322  if test "x$test_cygdrive_prefix" = x; then
9323    # As a simple fix, exclude /usr/bin since it's not a real path.
9324    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9326      # a path prefixed by /cygdrive for fixpath to work.
9327      new_path="$CYGWIN_ROOT_PATH$input_path"
9328    fi
9329  fi
9330
9331  # remove trailing .exe if any
9332  new_path="${new_path/%.exe/}"
9333
9334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9335
9336  # First separate the path from the arguments. This will split at the first
9337  # space.
9338  complete="$FOUND_MAKE"
9339  path="${complete%% *}"
9340  tmp="$complete EOL"
9341  arguments="${tmp#* }"
9342
9343  # Input might be given as Windows format, start by converting to
9344  # unix format.
9345  new_path="$path"
9346
9347  windows_path="$new_path"
9348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9349    unix_path=`$CYGPATH -u "$windows_path"`
9350    new_path="$unix_path"
9351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9353    new_path="$unix_path"
9354  fi
9355
9356
9357  # Now try to locate executable using which
9358  new_path=`$WHICH "$new_path" 2> /dev/null`
9359
9360  if test "x$new_path" = x; then
9361    # Oops. Which didn't find the executable.
9362    # The splitting of arguments from the executable at a space might have been incorrect,
9363    # since paths with space are more likely in Windows. Give it another try with the whole
9364    # argument.
9365    path="$complete"
9366    arguments="EOL"
9367    new_path="$path"
9368
9369  windows_path="$new_path"
9370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9371    unix_path=`$CYGPATH -u "$windows_path"`
9372    new_path="$unix_path"
9373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9375    new_path="$unix_path"
9376  fi
9377
9378
9379    new_path=`$WHICH "$new_path" 2> /dev/null`
9380
9381    if test "x$new_path" = x; then
9382      # It's still not found. Now this is an unrecoverable error.
9383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9384$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9385      has_space=`$ECHO "$complete" | $GREP " "`
9386      if test "x$has_space" != x; then
9387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9389      fi
9390      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9391    fi
9392  fi
9393
9394  # Now new_path has a complete unix path to the binary
9395  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9396    # Keep paths in /bin as-is, but remove trailing .exe if any
9397    new_path="${new_path/%.exe/}"
9398    # Do not save /bin paths to all_fixpath_prefixes!
9399  else
9400    # Not in mixed or Windows style, start by that.
9401    new_path=`cmd //c echo $new_path`
9402
9403  input_path="$new_path"
9404  # Check if we need to convert this using DOS-style short mode. If the path
9405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9406  # take no chances and rewrite it.
9407  # Note: m4 eats our [], so we need to use [ and ] instead.
9408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9409  if test "x$has_forbidden_chars" != x; then
9410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9412  fi
9413
9414    # Output is in $new_path
9415
9416  windows_path="$new_path"
9417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9418    unix_path=`$CYGPATH -u "$windows_path"`
9419    new_path="$unix_path"
9420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9422    new_path="$unix_path"
9423  fi
9424
9425    # remove trailing .exe if any
9426    new_path="${new_path/%.exe/}"
9427
9428    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9429    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9430  fi
9431
9432  else
9433    # We're on a posix platform. Hooray! :)
9434    # First separate the path from the arguments. This will split at the first
9435    # space.
9436    complete="$FOUND_MAKE"
9437    path="${complete%% *}"
9438    tmp="$complete EOL"
9439    arguments="${tmp#* }"
9440
9441    # Cannot rely on the command "which" here since it doesn't always work.
9442    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9443    if test -z "$is_absolute_path"; then
9444      # Path to executable is not absolute. Find it.
9445      IFS_save="$IFS"
9446      IFS=:
9447      for p in $PATH; do
9448        if test -f "$p/$path" && test -x "$p/$path"; then
9449          new_path="$p/$path"
9450          break
9451        fi
9452      done
9453      IFS="$IFS_save"
9454    else
9455      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9456$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9457      new_path="$path"
9458    fi
9459
9460    if test "x$new_path" = x; then
9461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9462$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9463        has_space=`$ECHO "$complete" | $GREP " "`
9464        if test "x$has_space" != x; then
9465          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9466$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9467        fi
9468        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9469      fi
9470  fi
9471
9472      # Now join together the path and the arguments once again
9473      if test "x$arguments" != xEOL; then
9474        new_complete="$new_path ${arguments% *}"
9475      else
9476        new_complete="$new_path"
9477      fi
9478
9479  if test "x$complete" != "x$new_complete"; then
9480      FOUND_MAKE="$new_complete"
9481      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9482$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9483    fi
9484
9485        fi
9486      fi
9487    fi
9488  fi
9489
9490        if test "x$FOUND_MAKE" = x; then
9491          for ac_prog in make
9492do
9493  # Extract the first word of "$ac_prog", so it can be a program name with args.
9494set dummy $ac_prog; ac_word=$2
9495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9496$as_echo_n "checking for $ac_word... " >&6; }
9497if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9498  $as_echo_n "(cached) " >&6
9499else
9500  case $CHECK_TOOLSDIR_MAKE in
9501  [\\/]* | ?:[\\/]*)
9502  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9503  ;;
9504  *)
9505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9506for as_dir in $PATH
9507do
9508  IFS=$as_save_IFS
9509  test -z "$as_dir" && as_dir=.
9510    for ac_exec_ext in '' $ac_executable_extensions; do
9511  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9512    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9514    break 2
9515  fi
9516done
9517  done
9518IFS=$as_save_IFS
9519
9520  ;;
9521esac
9522fi
9523CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9524if test -n "$CHECK_TOOLSDIR_MAKE"; then
9525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9526$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9527else
9528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9529$as_echo "no" >&6; }
9530fi
9531
9532
9533  test -n "$CHECK_TOOLSDIR_MAKE" && break
9534done
9535
9536
9537  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9538  DESCRIPTION="make in tools-dir"
9539  if test "x$MAKE_CANDIDATE" != x; then
9540    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9541$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9542    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9543    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9544    if test "x$IS_GNU_MAKE" = x; then
9545      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9546$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9547    else
9548      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9549      if test "x$IS_MODERN_MAKE" = x; then
9550        { $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
9551$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;}
9552      else
9553        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9554          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9555            MAKE_EXPECTED_ENV='cygwin'
9556          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9557            MAKE_EXPECTED_ENV='msys'
9558          else
9559            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9560          fi
9561          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9562          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9563        else
9564          # Not relevant for non-Windows
9565          IS_MAKE_CORRECT_ENV=true
9566        fi
9567        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9568          { $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
9569$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;}
9570        else
9571          FOUND_MAKE=$MAKE_CANDIDATE
9572
9573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9574
9575  # First separate the path from the arguments. This will split at the first
9576  # space.
9577  complete="$FOUND_MAKE"
9578  path="${complete%% *}"
9579  tmp="$complete EOL"
9580  arguments="${tmp#* }"
9581
9582  # Input might be given as Windows format, start by converting to
9583  # unix format.
9584  new_path=`$CYGPATH -u "$path"`
9585
9586  # Now try to locate executable using which
9587  new_path=`$WHICH "$new_path" 2> /dev/null`
9588  # bat and cmd files are not always considered executable in cygwin causing which
9589  # to not find them
9590  if test "x$new_path" = x \
9591           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9592           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9593    new_path=`$CYGPATH -u "$path"`
9594  fi
9595  if test "x$new_path" = x; then
9596    # Oops. Which didn't find the executable.
9597    # The splitting of arguments from the executable at a space might have been incorrect,
9598    # since paths with space are more likely in Windows. Give it another try with the whole
9599    # argument.
9600    path="$complete"
9601    arguments="EOL"
9602    new_path=`$CYGPATH -u "$path"`
9603    new_path=`$WHICH "$new_path" 2> /dev/null`
9604    # bat and cmd files are not always considered executable in cygwin causing which
9605    # to not find them
9606    if test "x$new_path" = x \
9607             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9608             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9609      new_path=`$CYGPATH -u "$path"`
9610    fi
9611    if test "x$new_path" = x; then
9612      # It's still not found. Now this is an unrecoverable error.
9613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9614$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9615      has_space=`$ECHO "$complete" | $GREP " "`
9616      if test "x$has_space" != x; then
9617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9619      fi
9620      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9621    fi
9622  fi
9623
9624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9627  # "foo.exe" is OK but "foo" is an error.
9628  #
9629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9630  # It is also a way to make sure we got the proper file name for the real test later on.
9631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9632  if test "x$test_shortpath" = x; then
9633    # Short path failed, file does not exist as specified.
9634    # Try adding .exe or .cmd
9635    if test -f "${new_path}.exe"; then
9636       input_to_shortpath="${new_path}.exe"
9637    elif test -f "${new_path}.cmd"; then
9638       input_to_shortpath="${new_path}.cmd"
9639    else
9640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9641$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9642      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9643$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9644      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9645    fi
9646  else
9647    input_to_shortpath="$new_path"
9648  fi
9649
9650  # Call helper function which possibly converts this using DOS-style short mode.
9651  # If so, the updated path is stored in $new_path.
9652  new_path="$input_to_shortpath"
9653
9654  input_path="$input_to_shortpath"
9655  # Check if we need to convert this using DOS-style short mode. If the path
9656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9657  # take no chances and rewrite it.
9658  # Note: m4 eats our [], so we need to use [ and ] instead.
9659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9660  if test "x$has_forbidden_chars" != x; then
9661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9665      # Going to short mode and back again did indeed matter. Since short mode is
9666      # case insensitive, let's make it lowercase to improve readability.
9667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9668      # Now convert it back to Unix-stile (cygpath)
9669      input_path=`$CYGPATH -u "$shortmode_path"`
9670      new_path="$input_path"
9671    fi
9672  fi
9673
9674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9675  if test "x$test_cygdrive_prefix" = x; then
9676    # As a simple fix, exclude /usr/bin since it's not a real path.
9677    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9679      # a path prefixed by /cygdrive for fixpath to work.
9680      new_path="$CYGWIN_ROOT_PATH$input_path"
9681    fi
9682  fi
9683
9684  # remove trailing .exe if any
9685  new_path="${new_path/%.exe/}"
9686
9687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9688
9689  # First separate the path from the arguments. This will split at the first
9690  # space.
9691  complete="$FOUND_MAKE"
9692  path="${complete%% *}"
9693  tmp="$complete EOL"
9694  arguments="${tmp#* }"
9695
9696  # Input might be given as Windows format, start by converting to
9697  # unix format.
9698  new_path="$path"
9699
9700  windows_path="$new_path"
9701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9702    unix_path=`$CYGPATH -u "$windows_path"`
9703    new_path="$unix_path"
9704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9706    new_path="$unix_path"
9707  fi
9708
9709
9710  # Now try to locate executable using which
9711  new_path=`$WHICH "$new_path" 2> /dev/null`
9712
9713  if test "x$new_path" = x; then
9714    # Oops. Which didn't find the executable.
9715    # The splitting of arguments from the executable at a space might have been incorrect,
9716    # since paths with space are more likely in Windows. Give it another try with the whole
9717    # argument.
9718    path="$complete"
9719    arguments="EOL"
9720    new_path="$path"
9721
9722  windows_path="$new_path"
9723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9724    unix_path=`$CYGPATH -u "$windows_path"`
9725    new_path="$unix_path"
9726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9728    new_path="$unix_path"
9729  fi
9730
9731
9732    new_path=`$WHICH "$new_path" 2> /dev/null`
9733
9734    if test "x$new_path" = x; then
9735      # It's still not found. Now this is an unrecoverable error.
9736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9737$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9738      has_space=`$ECHO "$complete" | $GREP " "`
9739      if test "x$has_space" != x; then
9740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9742      fi
9743      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9744    fi
9745  fi
9746
9747  # Now new_path has a complete unix path to the binary
9748  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9749    # Keep paths in /bin as-is, but remove trailing .exe if any
9750    new_path="${new_path/%.exe/}"
9751    # Do not save /bin paths to all_fixpath_prefixes!
9752  else
9753    # Not in mixed or Windows style, start by that.
9754    new_path=`cmd //c echo $new_path`
9755
9756  input_path="$new_path"
9757  # Check if we need to convert this using DOS-style short mode. If the path
9758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9759  # take no chances and rewrite it.
9760  # Note: m4 eats our [], so we need to use [ and ] instead.
9761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9762  if test "x$has_forbidden_chars" != x; then
9763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9765  fi
9766
9767    # Output is in $new_path
9768
9769  windows_path="$new_path"
9770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9771    unix_path=`$CYGPATH -u "$windows_path"`
9772    new_path="$unix_path"
9773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9775    new_path="$unix_path"
9776  fi
9777
9778    # remove trailing .exe if any
9779    new_path="${new_path/%.exe/}"
9780
9781    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9782    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9783  fi
9784
9785  else
9786    # We're on a posix platform. Hooray! :)
9787    # First separate the path from the arguments. This will split at the first
9788    # space.
9789    complete="$FOUND_MAKE"
9790    path="${complete%% *}"
9791    tmp="$complete EOL"
9792    arguments="${tmp#* }"
9793
9794    # Cannot rely on the command "which" here since it doesn't always work.
9795    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9796    if test -z "$is_absolute_path"; then
9797      # Path to executable is not absolute. Find it.
9798      IFS_save="$IFS"
9799      IFS=:
9800      for p in $PATH; do
9801        if test -f "$p/$path" && test -x "$p/$path"; then
9802          new_path="$p/$path"
9803          break
9804        fi
9805      done
9806      IFS="$IFS_save"
9807    else
9808      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9809$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9810      new_path="$path"
9811    fi
9812
9813    if test "x$new_path" = x; then
9814        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9815$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9816        has_space=`$ECHO "$complete" | $GREP " "`
9817        if test "x$has_space" != x; then
9818          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9819$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9820        fi
9821        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9822      fi
9823  fi
9824
9825      # Now join together the path and the arguments once again
9826      if test "x$arguments" != xEOL; then
9827        new_complete="$new_path ${arguments% *}"
9828      else
9829        new_complete="$new_path"
9830      fi
9831
9832  if test "x$complete" != "x$new_complete"; then
9833      FOUND_MAKE="$new_complete"
9834      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9835$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9836    fi
9837
9838        fi
9839      fi
9840    fi
9841  fi
9842
9843        fi
9844        PATH=$OLD_PATH
9845      fi
9846    fi
9847
9848    if test "x$FOUND_MAKE" = x; then
9849      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
9850    fi
9851  fi
9852
9853  MAKE=$FOUND_MAKE
9854
9855  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9856$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9857
9858
9859
9860    # Test if find supports -delete
9861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9862$as_echo_n "checking if find supports -delete... " >&6; }
9863    FIND_DELETE="-delete"
9864
9865    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9866
9867    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9868
9869    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9870    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9871        # No, it does not.
9872        rm $DELETEDIR/TestIfFindSupportsDelete
9873        FIND_DELETE="-exec rm \{\} \+"
9874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9875$as_echo "no" >&6; }
9876    else
9877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9878$as_echo "yes" >&6; }
9879    fi
9880    rmdir $DELETEDIR
9881
9882
9883
9884# These tools might not be installed by default,
9885# need hint on how to install them.
9886
9887    for ac_prog in unzip
9888do
9889  # Extract the first word of "$ac_prog", so it can be a program name with args.
9890set dummy $ac_prog; ac_word=$2
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9892$as_echo_n "checking for $ac_word... " >&6; }
9893if test "${ac_cv_path_UNZIP+set}" = set; then :
9894  $as_echo_n "(cached) " >&6
9895else
9896  case $UNZIP in
9897  [\\/]* | ?:[\\/]*)
9898  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9899  ;;
9900  *)
9901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9902for as_dir in $PATH
9903do
9904  IFS=$as_save_IFS
9905  test -z "$as_dir" && as_dir=.
9906    for ac_exec_ext in '' $ac_executable_extensions; do
9907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9908    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9910    break 2
9911  fi
9912done
9913  done
9914IFS=$as_save_IFS
9915
9916  ;;
9917esac
9918fi
9919UNZIP=$ac_cv_path_UNZIP
9920if test -n "$UNZIP"; then
9921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9922$as_echo "$UNZIP" >&6; }
9923else
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
9926fi
9927
9928
9929  test -n "$UNZIP" && break
9930done
9931
9932
9933    if test "x$UNZIP" = x; then
9934        if test "xunzip" = x; then
9935          PROG_NAME=unzip
9936        else
9937          PROG_NAME=unzip
9938        fi
9939        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9940$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9941        as_fn_error $? "Cannot continue" "$LINENO" 5
9942    fi
9943
9944
9945
9946    for ac_prog in zip
9947do
9948  # Extract the first word of "$ac_prog", so it can be a program name with args.
9949set dummy $ac_prog; ac_word=$2
9950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9951$as_echo_n "checking for $ac_word... " >&6; }
9952if test "${ac_cv_path_ZIP+set}" = set; then :
9953  $as_echo_n "(cached) " >&6
9954else
9955  case $ZIP in
9956  [\\/]* | ?:[\\/]*)
9957  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9958  ;;
9959  *)
9960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9961for as_dir in $PATH
9962do
9963  IFS=$as_save_IFS
9964  test -z "$as_dir" && as_dir=.
9965    for ac_exec_ext in '' $ac_executable_extensions; do
9966  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9967    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9969    break 2
9970  fi
9971done
9972  done
9973IFS=$as_save_IFS
9974
9975  ;;
9976esac
9977fi
9978ZIP=$ac_cv_path_ZIP
9979if test -n "$ZIP"; then
9980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9981$as_echo "$ZIP" >&6; }
9982else
9983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; }
9985fi
9986
9987
9988  test -n "$ZIP" && break
9989done
9990
9991
9992    if test "x$ZIP" = x; then
9993        if test "xzip" = x; then
9994          PROG_NAME=zip
9995        else
9996          PROG_NAME=zip
9997        fi
9998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9999$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10000        as_fn_error $? "Cannot continue" "$LINENO" 5
10001    fi
10002
10003
10004
10005# Non-required basic tools
10006
10007# Extract the first word of "ldd", so it can be a program name with args.
10008set dummy ldd; ac_word=$2
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10010$as_echo_n "checking for $ac_word... " >&6; }
10011if test "${ac_cv_path_LDD+set}" = set; then :
10012  $as_echo_n "(cached) " >&6
10013else
10014  case $LDD in
10015  [\\/]* | ?:[\\/]*)
10016  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10017  ;;
10018  *)
10019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10020for as_dir in $PATH
10021do
10022  IFS=$as_save_IFS
10023  test -z "$as_dir" && as_dir=.
10024    for ac_exec_ext in '' $ac_executable_extensions; do
10025  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10026    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10028    break 2
10029  fi
10030done
10031  done
10032IFS=$as_save_IFS
10033
10034  ;;
10035esac
10036fi
10037LDD=$ac_cv_path_LDD
10038if test -n "$LDD"; then
10039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10040$as_echo "$LDD" >&6; }
10041else
10042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
10044fi
10045
10046
10047if test "x$LDD" = "x"; then
10048    # List shared lib dependencies is used for
10049    # debug output and checking for forbidden dependencies.
10050    # We can build without it.
10051    LDD="true"
10052fi
10053# Extract the first word of "otool", so it can be a program name with args.
10054set dummy otool; ac_word=$2
10055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10056$as_echo_n "checking for $ac_word... " >&6; }
10057if test "${ac_cv_path_OTOOL+set}" = set; then :
10058  $as_echo_n "(cached) " >&6
10059else
10060  case $OTOOL in
10061  [\\/]* | ?:[\\/]*)
10062  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10063  ;;
10064  *)
10065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10066for as_dir in $PATH
10067do
10068  IFS=$as_save_IFS
10069  test -z "$as_dir" && as_dir=.
10070    for ac_exec_ext in '' $ac_executable_extensions; do
10071  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10072    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10074    break 2
10075  fi
10076done
10077  done
10078IFS=$as_save_IFS
10079
10080  ;;
10081esac
10082fi
10083OTOOL=$ac_cv_path_OTOOL
10084if test -n "$OTOOL"; then
10085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10086$as_echo "$OTOOL" >&6; }
10087else
10088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
10090fi
10091
10092
10093if test "x$OTOOL" = "x"; then
10094   OTOOL="true"
10095fi
10096for ac_prog in readelf greadelf
10097do
10098  # Extract the first word of "$ac_prog", so it can be a program name with args.
10099set dummy $ac_prog; ac_word=$2
10100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10101$as_echo_n "checking for $ac_word... " >&6; }
10102if test "${ac_cv_path_READELF+set}" = set; then :
10103  $as_echo_n "(cached) " >&6
10104else
10105  case $READELF in
10106  [\\/]* | ?:[\\/]*)
10107  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10108  ;;
10109  *)
10110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10111for as_dir in $PATH
10112do
10113  IFS=$as_save_IFS
10114  test -z "$as_dir" && as_dir=.
10115    for ac_exec_ext in '' $ac_executable_extensions; do
10116  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10117    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10119    break 2
10120  fi
10121done
10122  done
10123IFS=$as_save_IFS
10124
10125  ;;
10126esac
10127fi
10128READELF=$ac_cv_path_READELF
10129if test -n "$READELF"; then
10130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10131$as_echo "$READELF" >&6; }
10132else
10133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10134$as_echo "no" >&6; }
10135fi
10136
10137
10138  test -n "$READELF" && break
10139done
10140
10141# Extract the first word of "hg", so it can be a program name with args.
10142set dummy hg; ac_word=$2
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144$as_echo_n "checking for $ac_word... " >&6; }
10145if test "${ac_cv_path_HG+set}" = set; then :
10146  $as_echo_n "(cached) " >&6
10147else
10148  case $HG in
10149  [\\/]* | ?:[\\/]*)
10150  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10151  ;;
10152  *)
10153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154for as_dir in $PATH
10155do
10156  IFS=$as_save_IFS
10157  test -z "$as_dir" && as_dir=.
10158    for ac_exec_ext in '' $ac_executable_extensions; do
10159  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10160    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162    break 2
10163  fi
10164done
10165  done
10166IFS=$as_save_IFS
10167
10168  ;;
10169esac
10170fi
10171HG=$ac_cv_path_HG
10172if test -n "$HG"; then
10173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10174$as_echo "$HG" >&6; }
10175else
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177$as_echo "no" >&6; }
10178fi
10179
10180
10181# Extract the first word of "stat", so it can be a program name with args.
10182set dummy stat; ac_word=$2
10183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10184$as_echo_n "checking for $ac_word... " >&6; }
10185if test "${ac_cv_path_STAT+set}" = set; then :
10186  $as_echo_n "(cached) " >&6
10187else
10188  case $STAT in
10189  [\\/]* | ?:[\\/]*)
10190  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10191  ;;
10192  *)
10193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10194for as_dir in $PATH
10195do
10196  IFS=$as_save_IFS
10197  test -z "$as_dir" && as_dir=.
10198    for ac_exec_ext in '' $ac_executable_extensions; do
10199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10200    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10202    break 2
10203  fi
10204done
10205  done
10206IFS=$as_save_IFS
10207
10208  ;;
10209esac
10210fi
10211STAT=$ac_cv_path_STAT
10212if test -n "$STAT"; then
10213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10214$as_echo "$STAT" >&6; }
10215else
10216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10217$as_echo "no" >&6; }
10218fi
10219
10220
10221# Extract the first word of "time", so it can be a program name with args.
10222set dummy time; ac_word=$2
10223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10224$as_echo_n "checking for $ac_word... " >&6; }
10225if test "${ac_cv_path_TIME+set}" = set; then :
10226  $as_echo_n "(cached) " >&6
10227else
10228  case $TIME in
10229  [\\/]* | ?:[\\/]*)
10230  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10231  ;;
10232  *)
10233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10234for as_dir in $PATH
10235do
10236  IFS=$as_save_IFS
10237  test -z "$as_dir" && as_dir=.
10238    for ac_exec_ext in '' $ac_executable_extensions; do
10239  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10240    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10242    break 2
10243  fi
10244done
10245  done
10246IFS=$as_save_IFS
10247
10248  ;;
10249esac
10250fi
10251TIME=$ac_cv_path_TIME
10252if test -n "$TIME"; then
10253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10254$as_echo "$TIME" >&6; }
10255else
10256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10257$as_echo "no" >&6; }
10258fi
10259
10260
10261
10262if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10263
10264    for ac_prog in comm
10265do
10266  # Extract the first word of "$ac_prog", so it can be a program name with args.
10267set dummy $ac_prog; ac_word=$2
10268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10269$as_echo_n "checking for $ac_word... " >&6; }
10270if test "${ac_cv_path_COMM+set}" = set; then :
10271  $as_echo_n "(cached) " >&6
10272else
10273  case $COMM in
10274  [\\/]* | ?:[\\/]*)
10275  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10276  ;;
10277  *)
10278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10279for as_dir in $PATH
10280do
10281  IFS=$as_save_IFS
10282  test -z "$as_dir" && as_dir=.
10283    for ac_exec_ext in '' $ac_executable_extensions; do
10284  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10285    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10287    break 2
10288  fi
10289done
10290  done
10291IFS=$as_save_IFS
10292
10293  ;;
10294esac
10295fi
10296COMM=$ac_cv_path_COMM
10297if test -n "$COMM"; then
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10299$as_echo "$COMM" >&6; }
10300else
10301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302$as_echo "no" >&6; }
10303fi
10304
10305
10306  test -n "$COMM" && break
10307done
10308
10309
10310    if test "x$COMM" = x; then
10311        if test "xcomm" = x; then
10312          PROG_NAME=comm
10313        else
10314          PROG_NAME=comm
10315        fi
10316        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10317$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10318        as_fn_error $? "Cannot continue" "$LINENO" 5
10319    fi
10320
10321
10322fi
10323
10324
10325# Check if pkg-config is available.
10326
10327
10328if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10329	if test -n "$ac_tool_prefix"; then
10330  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10331set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10333$as_echo_n "checking for $ac_word... " >&6; }
10334if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10335  $as_echo_n "(cached) " >&6
10336else
10337  case $PKG_CONFIG in
10338  [\\/]* | ?:[\\/]*)
10339  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10340  ;;
10341  *)
10342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10343for as_dir in $PATH
10344do
10345  IFS=$as_save_IFS
10346  test -z "$as_dir" && as_dir=.
10347    for ac_exec_ext in '' $ac_executable_extensions; do
10348  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10349    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10351    break 2
10352  fi
10353done
10354  done
10355IFS=$as_save_IFS
10356
10357  ;;
10358esac
10359fi
10360PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10361if test -n "$PKG_CONFIG"; then
10362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10363$as_echo "$PKG_CONFIG" >&6; }
10364else
10365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366$as_echo "no" >&6; }
10367fi
10368
10369
10370fi
10371if test -z "$ac_cv_path_PKG_CONFIG"; then
10372  ac_pt_PKG_CONFIG=$PKG_CONFIG
10373  # Extract the first word of "pkg-config", so it can be a program name with args.
10374set dummy pkg-config; ac_word=$2
10375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10376$as_echo_n "checking for $ac_word... " >&6; }
10377if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10378  $as_echo_n "(cached) " >&6
10379else
10380  case $ac_pt_PKG_CONFIG in
10381  [\\/]* | ?:[\\/]*)
10382  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10383  ;;
10384  *)
10385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10386for as_dir in $PATH
10387do
10388  IFS=$as_save_IFS
10389  test -z "$as_dir" && as_dir=.
10390    for ac_exec_ext in '' $ac_executable_extensions; do
10391  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10392    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10394    break 2
10395  fi
10396done
10397  done
10398IFS=$as_save_IFS
10399
10400  ;;
10401esac
10402fi
10403ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10404if test -n "$ac_pt_PKG_CONFIG"; then
10405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10406$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10407else
10408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409$as_echo "no" >&6; }
10410fi
10411
10412  if test "x$ac_pt_PKG_CONFIG" = x; then
10413    PKG_CONFIG=""
10414  else
10415    case $cross_compiling:$ac_tool_warned in
10416yes:)
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10418$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10419ac_tool_warned=yes ;;
10420esac
10421    PKG_CONFIG=$ac_pt_PKG_CONFIG
10422  fi
10423else
10424  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10425fi
10426
10427fi
10428if test -n "$PKG_CONFIG"; then
10429	_pkg_min_version=0.9.0
10430	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10431$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10432	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10433		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10434$as_echo "yes" >&6; }
10435	else
10436		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10437$as_echo "no" >&6; }
10438		PKG_CONFIG=""
10439	fi
10440
10441fi
10442
10443# After basic tools have been setup, we can check build os specific details.
10444
10445###############################################################################
10446
10447# Note that this is the build platform OS version!
10448
10449OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10450OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10451OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10452OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10453
10454
10455
10456
10457
10458# Setup builddeps, for automatic downloading of tools we need.
10459# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10460# boot-jdk setup, but we need to have basic tools setup first.
10461
10462
10463# Check whether --with-builddeps-conf was given.
10464if test "${with_builddeps_conf+set}" = set; then :
10465  withval=$with_builddeps_conf;
10466fi
10467
10468
10469
10470# Check whether --with-builddeps-server was given.
10471if test "${with_builddeps_server+set}" = set; then :
10472  withval=$with_builddeps_server;
10473fi
10474
10475
10476
10477# Check whether --with-builddeps-dir was given.
10478if test "${with_builddeps_dir+set}" = set; then :
10479  withval=$with_builddeps_dir;
10480else
10481  with_builddeps_dir=/localhome/builddeps
10482fi
10483
10484
10485
10486# Check whether --with-builddeps-group was given.
10487if test "${with_builddeps_group+set}" = set; then :
10488  withval=$with_builddeps_group;
10489fi
10490
10491
10492
10493
10494    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10495        if test "x$with_builddeps_conf" != x; then
10496            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10497$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10498            builddepsfile=$with_builddeps_conf
10499            if test -s $builddepsfile; then
10500                . $builddepsfile
10501                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10502$as_echo "loaded!" >&6; }
10503            else
10504               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10505           fi
10506        else
10507            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10508$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10509            builddepsfile=`mktemp`
10510            touch $builddepsfile
10511            # Put all found confs into a single file.
10512            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10513            # Source the file to acquire the variables
10514            if test -s $builddepsfile; then
10515                . $builddepsfile
10516                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10517$as_echo "found at least one!" >&6; }
10518            else
10519               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10520           fi
10521        fi
10522        # Create build and target names that use _ instead of "-" and ".".
10523        # This is necessary to use them in variable names.
10524        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10525        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10526        # Extract rewrite information for build and target
10527        eval rewritten_build=\${REWRITE_${build_var}}
10528        if test "x$rewritten_build" = x; then
10529            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10530            echo Build stays the same $rewritten_build
10531        else
10532            echo Rewriting build for builddeps into $rewritten_build
10533        fi
10534        eval rewritten_target=\${REWRITE_${target_var}}
10535        if test "x$rewritten_target" = x; then
10536            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10537            echo Target stays the same $rewritten_target
10538        else
10539            echo Rewriting target for builddeps into $rewritten_target
10540        fi
10541        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10542        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10543    fi
10544    for ac_prog in 7z unzip
10545do
10546  # Extract the first word of "$ac_prog", so it can be a program name with args.
10547set dummy $ac_prog; ac_word=$2
10548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10549$as_echo_n "checking for $ac_word... " >&6; }
10550if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10551  $as_echo_n "(cached) " >&6
10552else
10553  if test -n "$BDEPS_UNZIP"; then
10554  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10555else
10556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10557for as_dir in $PATH
10558do
10559  IFS=$as_save_IFS
10560  test -z "$as_dir" && as_dir=.
10561    for ac_exec_ext in '' $ac_executable_extensions; do
10562  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10563    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10565    break 2
10566  fi
10567done
10568  done
10569IFS=$as_save_IFS
10570
10571fi
10572fi
10573BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10574if test -n "$BDEPS_UNZIP"; then
10575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10576$as_echo "$BDEPS_UNZIP" >&6; }
10577else
10578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579$as_echo "no" >&6; }
10580fi
10581
10582
10583  test -n "$BDEPS_UNZIP" && break
10584done
10585
10586    if test "x$BDEPS_UNZIP" = x7z; then
10587        BDEPS_UNZIP="7z x"
10588    fi
10589
10590    for ac_prog in wget lftp ftp
10591do
10592  # Extract the first word of "$ac_prog", so it can be a program name with args.
10593set dummy $ac_prog; ac_word=$2
10594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10595$as_echo_n "checking for $ac_word... " >&6; }
10596if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10597  $as_echo_n "(cached) " >&6
10598else
10599  if test -n "$BDEPS_FTP"; then
10600  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10601else
10602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10603for as_dir in $PATH
10604do
10605  IFS=$as_save_IFS
10606  test -z "$as_dir" && as_dir=.
10607    for ac_exec_ext in '' $ac_executable_extensions; do
10608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10609    ac_cv_prog_BDEPS_FTP="$ac_prog"
10610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10611    break 2
10612  fi
10613done
10614  done
10615IFS=$as_save_IFS
10616
10617fi
10618fi
10619BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10620if test -n "$BDEPS_FTP"; then
10621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10622$as_echo "$BDEPS_FTP" >&6; }
10623else
10624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10625$as_echo "no" >&6; }
10626fi
10627
10628
10629  test -n "$BDEPS_FTP" && break
10630done
10631
10632
10633
10634###############################################################################
10635#
10636# Determine OpenJDK variants, options and version numbers.
10637#
10638###############################################################################
10639
10640# We need build & target for this.
10641
10642
10643###############################################################################
10644#
10645# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10646# We always build headless support.
10647#
10648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10649$as_echo_n "checking headful support... " >&6; }
10650# Check whether --enable-headful was given.
10651if test "${enable_headful+set}" = set; then :
10652  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10653else
10654  SUPPORT_HEADFUL=yes
10655fi
10656
10657
10658SUPPORT_HEADLESS=yes
10659BUILD_HEADLESS="BUILD_HEADLESS:=true"
10660
10661if test "x$SUPPORT_HEADFUL" = xyes; then
10662    # We are building both headful and headless.
10663    headful_msg="inlude support for both headful and headless"
10664fi
10665
10666if test "x$SUPPORT_HEADFUL" = xno; then
10667    # Thus we are building headless only.
10668    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10669    headful_msg="headless only"
10670fi
10671
10672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10673$as_echo "$headful_msg" >&6; }
10674
10675
10676
10677
10678
10679# Control wether Hotspot runs Queens test after build.
10680# Check whether --enable-hotspot-test-in-build was given.
10681if test "${enable_hotspot_test_in_build+set}" = set; then :
10682  enableval=$enable_hotspot_test_in_build;
10683else
10684  enable_hotspot_test_in_build=no
10685fi
10686
10687if test "x$enable_hotspot_test_in_build" = "xyes"; then
10688    TEST_IN_BUILD=true
10689else
10690    TEST_IN_BUILD=false
10691fi
10692
10693
10694###############################################################################
10695#
10696# Choose cacerts source file
10697#
10698
10699# Check whether --with-cacerts-file was given.
10700if test "${with_cacerts_file+set}" = set; then :
10701  withval=$with_cacerts_file;
10702fi
10703
10704if test "x$with_cacerts_file" != x; then
10705    CACERTS_FILE=$with_cacerts_file
10706else
10707    if test "x$OPENJDK" = "xtrue"; then
10708        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10709    else
10710        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10711    fi
10712fi
10713
10714
10715###############################################################################
10716#
10717# Enable or disable unlimited crypto
10718#
10719# Check whether --enable-unlimited-crypto was given.
10720if test "${enable_unlimited_crypto+set}" = set; then :
10721  enableval=$enable_unlimited_crypto;
10722else
10723  enable_unlimited_crypto=no
10724fi
10725
10726if test "x$enable_unlimited_crypto" = "xyes"; then
10727    UNLIMITED_CRYPTO=true
10728else
10729    UNLIMITED_CRYPTO=false
10730fi
10731
10732
10733###############################################################################
10734#
10735# Compress jars
10736#
10737COMPRESS_JARS=false
10738
10739
10740
10741
10742# Source the version numbers
10743. $AUTOCONF_DIR/version-numbers
10744
10745# Get the settings from parameters
10746
10747# Check whether --with-milestone was given.
10748if test "${with_milestone+set}" = set; then :
10749  withval=$with_milestone;
10750fi
10751
10752if test "x$with_milestone" = xyes; then
10753  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10754elif test "x$with_milestone" != x; then
10755    MILESTONE="$with_milestone"
10756else
10757  MILESTONE=internal
10758fi
10759
10760
10761# Check whether --with-build-number was given.
10762if test "${with_build_number+set}" = set; then :
10763  withval=$with_build_number;
10764fi
10765
10766if test "x$with_build_number" = xyes; then
10767  as_fn_error $? "Build number must have a value" "$LINENO" 5
10768elif test "x$with_build_number" != x; then
10769  JDK_BUILD_NUMBER="$with_build_number"
10770fi
10771if test "x$JDK_BUILD_NUMBER" = x; then
10772  JDK_BUILD_NUMBER=b00
10773fi
10774
10775
10776# Check whether --with-user-release-suffix was given.
10777if test "${with_user_release_suffix+set}" = set; then :
10778  withval=$with_user_release_suffix;
10779fi
10780
10781if test "x$with_user_release_suffix" = xyes; then
10782  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10783elif test "x$with_user_release_suffix" != x; then
10784  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10785else
10786  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10787  # Avoid [:alnum:] since it depends on the locale.
10788  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10789  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10790fi
10791
10792
10793# Now set the JDK version, milestone, build number etc.
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808COPYRIGHT_YEAR=`date +'%Y'`
10809
10810
10811if test "x$JDK_UPDATE_VERSION" != x; then
10812  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10813else
10814  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10815fi
10816
10817
10818COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10819
10820
10821
10822###############################################################################
10823#
10824# Setup BootJDK, used to bootstrap the build.
10825#
10826###############################################################################
10827
10828
10829BOOT_JDK_FOUND=no
10830
10831# Check whether --with-boot-jdk was given.
10832if test "${with_boot_jdk+set}" = set; then :
10833  withval=$with_boot_jdk;
10834fi
10835
10836
10837# We look for the Boot JDK through various means, going from more certain to
10838# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10839# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10840# must check if this is indeed valid; otherwise we'll continue looking.
10841
10842# Test: Is bootjdk explicitely set by command line arguments?
10843
10844  if test "x$BOOT_JDK_FOUND" = xno; then
10845    # Now execute the test
10846
10847if test "x$with_boot_jdk" != x; then
10848    BOOT_JDK=$with_boot_jdk
10849    BOOT_JDK_FOUND=maybe
10850    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10851$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10852fi
10853
10854
10855    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10856    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10857      # Do we have a bin/java?
10858      if test ! -x "$BOOT_JDK/bin/java"; then
10859        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10861        BOOT_JDK_FOUND=no
10862      else
10863        # Do we have a bin/javac?
10864        if test ! -x "$BOOT_JDK/bin/javac"; then
10865          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10867          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10868$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10869          BOOT_JDK_FOUND=no
10870        else
10871          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10872          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10873            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10875            BOOT_JDK_FOUND=no
10876          else
10877            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10878            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10879
10880            # Extra M4 quote needed to protect [] in grep expression.
10881            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10882            if test "x$FOUND_VERSION_78" = x; then
10883              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10885              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10886$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10887              BOOT_JDK_FOUND=no
10888            else
10889              # We're done! :-)
10890              BOOT_JDK_FOUND=yes
10891
10892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10893
10894  # Input might be given as Windows format, start by converting to
10895  # unix format.
10896  path="$BOOT_JDK"
10897  new_path=`$CYGPATH -u "$path"`
10898
10899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10902  # "foo.exe" is OK but "foo" is an error.
10903  #
10904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10905  # It is also a way to make sure we got the proper file name for the real test later on.
10906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10907  if test "x$test_shortpath" = x; then
10908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10910    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10911  fi
10912
10913  # Call helper function which possibly converts this using DOS-style short mode.
10914  # If so, the updated path is stored in $new_path.
10915
10916  input_path="$new_path"
10917  # Check if we need to convert this using DOS-style short mode. If the path
10918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10919  # take no chances and rewrite it.
10920  # Note: m4 eats our [], so we need to use [ and ] instead.
10921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10922  if test "x$has_forbidden_chars" != x; then
10923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10927      # Going to short mode and back again did indeed matter. Since short mode is
10928      # case insensitive, let's make it lowercase to improve readability.
10929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10930      # Now convert it back to Unix-stile (cygpath)
10931      input_path=`$CYGPATH -u "$shortmode_path"`
10932      new_path="$input_path"
10933    fi
10934  fi
10935
10936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10937  if test "x$test_cygdrive_prefix" = x; then
10938    # As a simple fix, exclude /usr/bin since it's not a real path.
10939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10941      # a path prefixed by /cygdrive for fixpath to work.
10942      new_path="$CYGWIN_ROOT_PATH$input_path"
10943    fi
10944  fi
10945
10946
10947  if test "x$path" != "x$new_path"; then
10948    BOOT_JDK="$new_path"
10949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10950$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10951  fi
10952
10953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10954
10955  path="$BOOT_JDK"
10956  has_colon=`$ECHO $path | $GREP ^.:`
10957  new_path="$path"
10958  if test "x$has_colon" = x; then
10959    # Not in mixed or Windows style, start by that.
10960    new_path=`cmd //c echo $path`
10961  fi
10962
10963
10964  input_path="$new_path"
10965  # Check if we need to convert this using DOS-style short mode. If the path
10966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10967  # take no chances and rewrite it.
10968  # Note: m4 eats our [], so we need to use [ and ] instead.
10969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10970  if test "x$has_forbidden_chars" != x; then
10971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10973  fi
10974
10975
10976  windows_path="$new_path"
10977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10978    unix_path=`$CYGPATH -u "$windows_path"`
10979    new_path="$unix_path"
10980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10982    new_path="$unix_path"
10983  fi
10984
10985  if test "x$path" != "x$new_path"; then
10986    BOOT_JDK="$new_path"
10987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10989  fi
10990
10991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10993
10994  else
10995    # We're on a posix platform. Hooray! :)
10996    path="$BOOT_JDK"
10997
10998    if test ! -f "$path" && test ! -d "$path"; then
10999      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11000    fi
11001
11002    has_space=`$ECHO "$path" | $GREP " "`
11003    if test "x$has_space" != x; then
11004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11005$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11006      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11007    fi
11008  fi
11009
11010              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11011$as_echo_n "checking for Boot JDK... " >&6; }
11012              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11013$as_echo "$BOOT_JDK" >&6; }
11014              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11015$as_echo_n "checking Boot JDK version... " >&6; }
11016              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11017              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11018$as_echo "$BOOT_JDK_VERSION" >&6; }
11019            fi # end check jdk version
11020          fi # end check rt.jar
11021        fi # end check javac
11022      fi # end check java
11023    fi # end check boot jdk found
11024  fi
11025
11026if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11027  # Having specified an argument which is incorrect will produce an instant failure;
11028  # we should not go on looking
11029  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11030fi
11031
11032# Test: Is bootjdk available from builddeps?
11033
11034  if test "x$BOOT_JDK_FOUND" = xno; then
11035    # Now execute the test
11036
11037
11038
11039    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11040        # Source the builddeps file again, to make sure it uses the latest variables!
11041        . $builddepsfile
11042        # Look for a target and build machine specific resource!
11043        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11044        if test "x$resource" = x; then
11045            # Ok, lets instead look for a target specific resource
11046            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11047        fi
11048        if test "x$resource" = x; then
11049            # Ok, lets instead look for a build specific resource
11050            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11051        fi
11052        if test "x$resource" = x; then
11053            # Ok, lets instead look for a generic resource
11054            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11055            resource=${builddep_bootjdk}
11056        fi
11057        if test "x$resource" != x; then
11058            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11059$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11060	    # If the resource in the builddeps.conf file is an existing directory,
11061	    # for example /java/linux/cups
11062	    if test -d ${resource}; then
11063	       depdir=${resource}
11064	    else
11065
11066# bootjdk is for example mymodule
11067# $resource is for example libs/general/libmymod_1_2_3.zip
11068# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11069# $with_builddeps_dir is for example /localhome/builddeps
11070# depdir is the name of the variable into which we store the depdir, eg MYMOD
11071# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11072# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11073    filename=`basename $resource`
11074    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11075    filebase=${filename%%.*}
11076    extension=${filename#*.}
11077    installdir=$with_builddeps_dir/$filebase
11078    if test ! -f $installdir/$filename.unpacked; then
11079        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11080$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11081        if test ! -d $installdir; then
11082            mkdir -p $installdir
11083        fi
11084        if test ! -d $installdir; then
11085            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11086        fi
11087        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11088        touch $tmpfile
11089        if test ! -f $tmpfile; then
11090            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11091        fi
11092
11093    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11094    # $tmpfile is the local file name for the downloaded file.
11095    VALID_TOOL=no
11096    if test "x$BDEPS_FTP" = xwget; then
11097       VALID_TOOL=yes
11098       wget -O $tmpfile $with_builddeps_server/$resource
11099    fi
11100    if test "x$BDEPS_FTP" = xlftp; then
11101       VALID_TOOL=yes
11102       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11103    fi
11104    if test "x$BDEPS_FTP" = xftp; then
11105        VALID_TOOL=yes
11106        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11107        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11108        FTPUSERPWD=${FTPSERVER%%@*}
11109        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11110            FTPUSER=${userpwd%%:*}
11111            FTPPWD=${userpwd#*@}
11112            FTPSERVER=${FTPSERVER#*@}
11113        else
11114            FTPUSER=ftp
11115            FTPPWD=ftp
11116        fi
11117        # the "pass" command does not work on some
11118        # ftp clients (read ftp.exe) but if it works,
11119        # passive mode is better!
11120        (\
11121            echo "user $FTPUSER $FTPPWD"        ;\
11122            echo "pass"                         ;\
11123            echo "bin"                          ;\
11124            echo "get $FTPPATH $tmpfile"              ;\
11125        ) | ftp -in $FTPSERVER
11126    fi
11127    if test "x$VALID_TOOL" != xyes; then
11128       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11129    fi
11130
11131        mv $tmpfile $installdir/$filename
11132        if test ! -s $installdir/$filename; then
11133            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11134        fi
11135        case "$extension" in
11136            zip)  echo "Unzipping $installdir/$filename..."
11137               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11138            ;;
11139            tar.gz) echo "Untaring $installdir/$filename..."
11140               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11141            ;;
11142            tgz) echo "Untaring $installdir/$filename..."
11143               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11144            ;;
11145            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11146            ;;
11147        esac
11148    fi
11149    if test -f $installdir/$filename.unpacked; then
11150        depdir=$installdir
11151    fi
11152
11153	    fi
11154            # Source the builddeps file again, because in the previous command, the depdir
11155            # was updated to point at the current build dependency install directory.
11156            . $builddepsfile
11157            # Now extract variables from the builddeps.conf files.
11158            theroot=${builddep_bootjdk_ROOT}
11159            thecflags=${builddep_bootjdk_CFLAGS}
11160            thelibs=${builddep_bootjdk_LIBS}
11161            if test "x$depdir" = x; then
11162                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11163            fi
11164            BOOT_JDK=$depdir
11165            if test "x$theroot" != x; then
11166               BOOT_JDK="$theroot"
11167            fi
11168            if test "x$thecflags" != x; then
11169               BOOT_JDK_CFLAGS="$thecflags"
11170            fi
11171            if test "x$thelibs" != x; then
11172               BOOT_JDK_LIBS="$thelibs"
11173            fi
11174            BOOT_JDK_FOUND=maybe
11175            else BOOT_JDK_FOUND=no
11176
11177        fi
11178        else BOOT_JDK_FOUND=no
11179
11180    fi
11181
11182
11183
11184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11186      # Do we have a bin/java?
11187      if test ! -x "$BOOT_JDK/bin/java"; then
11188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11190        BOOT_JDK_FOUND=no
11191      else
11192        # Do we have a bin/javac?
11193        if test ! -x "$BOOT_JDK/bin/javac"; then
11194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11198          BOOT_JDK_FOUND=no
11199        else
11200          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11201          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11204            BOOT_JDK_FOUND=no
11205          else
11206            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11207            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11208
11209            # Extra M4 quote needed to protect [] in grep expression.
11210            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11211            if test "x$FOUND_VERSION_78" = x; then
11212              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11214              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11215$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11216              BOOT_JDK_FOUND=no
11217            else
11218              # We're done! :-)
11219              BOOT_JDK_FOUND=yes
11220
11221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11222
11223  # Input might be given as Windows format, start by converting to
11224  # unix format.
11225  path="$BOOT_JDK"
11226  new_path=`$CYGPATH -u "$path"`
11227
11228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11231  # "foo.exe" is OK but "foo" is an error.
11232  #
11233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11234  # It is also a way to make sure we got the proper file name for the real test later on.
11235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11236  if test "x$test_shortpath" = x; then
11237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11238$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11239    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11240  fi
11241
11242  # Call helper function which possibly converts this using DOS-style short mode.
11243  # If so, the updated path is stored in $new_path.
11244
11245  input_path="$new_path"
11246  # Check if we need to convert this using DOS-style short mode. If the path
11247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11248  # take no chances and rewrite it.
11249  # Note: m4 eats our [], so we need to use [ and ] instead.
11250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11251  if test "x$has_forbidden_chars" != x; then
11252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11256      # Going to short mode and back again did indeed matter. Since short mode is
11257      # case insensitive, let's make it lowercase to improve readability.
11258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11259      # Now convert it back to Unix-stile (cygpath)
11260      input_path=`$CYGPATH -u "$shortmode_path"`
11261      new_path="$input_path"
11262    fi
11263  fi
11264
11265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11266  if test "x$test_cygdrive_prefix" = x; then
11267    # As a simple fix, exclude /usr/bin since it's not a real path.
11268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11270      # a path prefixed by /cygdrive for fixpath to work.
11271      new_path="$CYGWIN_ROOT_PATH$input_path"
11272    fi
11273  fi
11274
11275
11276  if test "x$path" != "x$new_path"; then
11277    BOOT_JDK="$new_path"
11278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11280  fi
11281
11282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11283
11284  path="$BOOT_JDK"
11285  has_colon=`$ECHO $path | $GREP ^.:`
11286  new_path="$path"
11287  if test "x$has_colon" = x; then
11288    # Not in mixed or Windows style, start by that.
11289    new_path=`cmd //c echo $path`
11290  fi
11291
11292
11293  input_path="$new_path"
11294  # Check if we need to convert this using DOS-style short mode. If the path
11295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11296  # take no chances and rewrite it.
11297  # Note: m4 eats our [], so we need to use [ and ] instead.
11298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11299  if test "x$has_forbidden_chars" != x; then
11300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11302  fi
11303
11304
11305  windows_path="$new_path"
11306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11307    unix_path=`$CYGPATH -u "$windows_path"`
11308    new_path="$unix_path"
11309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11311    new_path="$unix_path"
11312  fi
11313
11314  if test "x$path" != "x$new_path"; then
11315    BOOT_JDK="$new_path"
11316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11317$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11318  fi
11319
11320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11322
11323  else
11324    # We're on a posix platform. Hooray! :)
11325    path="$BOOT_JDK"
11326
11327    if test ! -f "$path" && test ! -d "$path"; then
11328      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11329    fi
11330
11331    has_space=`$ECHO "$path" | $GREP " "`
11332    if test "x$has_space" != x; then
11333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11335      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11336    fi
11337  fi
11338
11339              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11340$as_echo_n "checking for Boot JDK... " >&6; }
11341              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11342$as_echo "$BOOT_JDK" >&6; }
11343              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11344$as_echo_n "checking Boot JDK version... " >&6; }
11345              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11346              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11347$as_echo "$BOOT_JDK_VERSION" >&6; }
11348            fi # end check jdk version
11349          fi # end check rt.jar
11350        fi # end check javac
11351      fi # end check java
11352    fi # end check boot jdk found
11353  fi
11354
11355
11356# Test: Is $JAVA_HOME set?
11357
11358  if test "x$BOOT_JDK_FOUND" = xno; then
11359    # Now execute the test
11360
11361    if test "x$JAVA_HOME" != x; then
11362        JAVA_HOME_PROCESSED="$JAVA_HOME"
11363
11364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11365
11366  # Input might be given as Windows format, start by converting to
11367  # unix format.
11368  path="$JAVA_HOME_PROCESSED"
11369  new_path=`$CYGPATH -u "$path"`
11370
11371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11374  # "foo.exe" is OK but "foo" is an error.
11375  #
11376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11377  # It is also a way to make sure we got the proper file name for the real test later on.
11378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11379  if test "x$test_shortpath" = x; then
11380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11381$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11382    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11383  fi
11384
11385  # Call helper function which possibly converts this using DOS-style short mode.
11386  # If so, the updated path is stored in $new_path.
11387
11388  input_path="$new_path"
11389  # Check if we need to convert this using DOS-style short mode. If the path
11390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11391  # take no chances and rewrite it.
11392  # Note: m4 eats our [], so we need to use [ and ] instead.
11393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11394  if test "x$has_forbidden_chars" != x; then
11395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11399      # Going to short mode and back again did indeed matter. Since short mode is
11400      # case insensitive, let's make it lowercase to improve readability.
11401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11402      # Now convert it back to Unix-stile (cygpath)
11403      input_path=`$CYGPATH -u "$shortmode_path"`
11404      new_path="$input_path"
11405    fi
11406  fi
11407
11408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11409  if test "x$test_cygdrive_prefix" = x; then
11410    # As a simple fix, exclude /usr/bin since it's not a real path.
11411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11413      # a path prefixed by /cygdrive for fixpath to work.
11414      new_path="$CYGWIN_ROOT_PATH$input_path"
11415    fi
11416  fi
11417
11418
11419  if test "x$path" != "x$new_path"; then
11420    JAVA_HOME_PROCESSED="$new_path"
11421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11422$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11423  fi
11424
11425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11426
11427  path="$JAVA_HOME_PROCESSED"
11428  has_colon=`$ECHO $path | $GREP ^.:`
11429  new_path="$path"
11430  if test "x$has_colon" = x; then
11431    # Not in mixed or Windows style, start by that.
11432    new_path=`cmd //c echo $path`
11433  fi
11434
11435
11436  input_path="$new_path"
11437  # Check if we need to convert this using DOS-style short mode. If the path
11438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11439  # take no chances and rewrite it.
11440  # Note: m4 eats our [], so we need to use [ and ] instead.
11441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11442  if test "x$has_forbidden_chars" != x; then
11443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11445  fi
11446
11447
11448  windows_path="$new_path"
11449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11450    unix_path=`$CYGPATH -u "$windows_path"`
11451    new_path="$unix_path"
11452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11454    new_path="$unix_path"
11455  fi
11456
11457  if test "x$path" != "x$new_path"; then
11458    JAVA_HOME_PROCESSED="$new_path"
11459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11460$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11461  fi
11462
11463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11465
11466  else
11467    # We're on a posix platform. Hooray! :)
11468    path="$JAVA_HOME_PROCESSED"
11469
11470    if test ! -f "$path" && test ! -d "$path"; then
11471      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11472    fi
11473
11474    has_space=`$ECHO "$path" | $GREP " "`
11475    if test "x$has_space" != x; then
11476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11477$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11478      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11479    fi
11480  fi
11481
11482        if test ! -d "$JAVA_HOME_PROCESSED"; then
11483            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11484$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11485        else
11486          # Aha, the user has set a JAVA_HOME
11487          # let us use that as the Boot JDK.
11488          BOOT_JDK="$JAVA_HOME_PROCESSED"
11489          BOOT_JDK_FOUND=maybe
11490          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11491$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11492        fi
11493    fi
11494
11495
11496    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11497    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11498      # Do we have a bin/java?
11499      if test ! -x "$BOOT_JDK/bin/java"; then
11500        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11502        BOOT_JDK_FOUND=no
11503      else
11504        # Do we have a bin/javac?
11505        if test ! -x "$BOOT_JDK/bin/javac"; then
11506          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11508          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11509$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11510          BOOT_JDK_FOUND=no
11511        else
11512          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11513          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11514            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11516            BOOT_JDK_FOUND=no
11517          else
11518            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11519            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11520
11521            # Extra M4 quote needed to protect [] in grep expression.
11522            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11523            if test "x$FOUND_VERSION_78" = x; then
11524              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11526              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11527$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11528              BOOT_JDK_FOUND=no
11529            else
11530              # We're done! :-)
11531              BOOT_JDK_FOUND=yes
11532
11533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11534
11535  # Input might be given as Windows format, start by converting to
11536  # unix format.
11537  path="$BOOT_JDK"
11538  new_path=`$CYGPATH -u "$path"`
11539
11540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11543  # "foo.exe" is OK but "foo" is an error.
11544  #
11545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11546  # It is also a way to make sure we got the proper file name for the real test later on.
11547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11548  if test "x$test_shortpath" = x; then
11549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11551    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11552  fi
11553
11554  # Call helper function which possibly converts this using DOS-style short mode.
11555  # If so, the updated path is stored in $new_path.
11556
11557  input_path="$new_path"
11558  # Check if we need to convert this using DOS-style short mode. If the path
11559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11560  # take no chances and rewrite it.
11561  # Note: m4 eats our [], so we need to use [ and ] instead.
11562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11563  if test "x$has_forbidden_chars" != x; then
11564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11568      # Going to short mode and back again did indeed matter. Since short mode is
11569      # case insensitive, let's make it lowercase to improve readability.
11570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11571      # Now convert it back to Unix-stile (cygpath)
11572      input_path=`$CYGPATH -u "$shortmode_path"`
11573      new_path="$input_path"
11574    fi
11575  fi
11576
11577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11578  if test "x$test_cygdrive_prefix" = x; then
11579    # As a simple fix, exclude /usr/bin since it's not a real path.
11580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11582      # a path prefixed by /cygdrive for fixpath to work.
11583      new_path="$CYGWIN_ROOT_PATH$input_path"
11584    fi
11585  fi
11586
11587
11588  if test "x$path" != "x$new_path"; then
11589    BOOT_JDK="$new_path"
11590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11592  fi
11593
11594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11595
11596  path="$BOOT_JDK"
11597  has_colon=`$ECHO $path | $GREP ^.:`
11598  new_path="$path"
11599  if test "x$has_colon" = x; then
11600    # Not in mixed or Windows style, start by that.
11601    new_path=`cmd //c echo $path`
11602  fi
11603
11604
11605  input_path="$new_path"
11606  # Check if we need to convert this using DOS-style short mode. If the path
11607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11608  # take no chances and rewrite it.
11609  # Note: m4 eats our [], so we need to use [ and ] instead.
11610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11611  if test "x$has_forbidden_chars" != x; then
11612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11614  fi
11615
11616
11617  windows_path="$new_path"
11618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11619    unix_path=`$CYGPATH -u "$windows_path"`
11620    new_path="$unix_path"
11621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11623    new_path="$unix_path"
11624  fi
11625
11626  if test "x$path" != "x$new_path"; then
11627    BOOT_JDK="$new_path"
11628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11630  fi
11631
11632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11634
11635  else
11636    # We're on a posix platform. Hooray! :)
11637    path="$BOOT_JDK"
11638
11639    if test ! -f "$path" && test ! -d "$path"; then
11640      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11641    fi
11642
11643    has_space=`$ECHO "$path" | $GREP " "`
11644    if test "x$has_space" != x; then
11645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11647      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11648    fi
11649  fi
11650
11651              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11652$as_echo_n "checking for Boot JDK... " >&6; }
11653              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11654$as_echo "$BOOT_JDK" >&6; }
11655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11656$as_echo_n "checking Boot JDK version... " >&6; }
11657              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11659$as_echo "$BOOT_JDK_VERSION" >&6; }
11660            fi # end check jdk version
11661          fi # end check rt.jar
11662        fi # end check javac
11663      fi # end check java
11664    fi # end check boot jdk found
11665  fi
11666
11667
11668# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11669
11670  if test "x$BOOT_JDK_FOUND" = xno; then
11671    # Now execute the test
11672
11673    if test -x /usr/libexec/java_home; then
11674        BOOT_JDK=`/usr/libexec/java_home`
11675        BOOT_JDK_FOUND=maybe
11676        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11677$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11678    fi
11679
11680
11681    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11682    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11683      # Do we have a bin/java?
11684      if test ! -x "$BOOT_JDK/bin/java"; then
11685        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11687        BOOT_JDK_FOUND=no
11688      else
11689        # Do we have a bin/javac?
11690        if test ! -x "$BOOT_JDK/bin/javac"; then
11691          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11693          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11694$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11695          BOOT_JDK_FOUND=no
11696        else
11697          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11698          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11699            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11701            BOOT_JDK_FOUND=no
11702          else
11703            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11704            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11705
11706            # Extra M4 quote needed to protect [] in grep expression.
11707            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11708            if test "x$FOUND_VERSION_78" = x; then
11709              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11711              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11712$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11713              BOOT_JDK_FOUND=no
11714            else
11715              # We're done! :-)
11716              BOOT_JDK_FOUND=yes
11717
11718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11719
11720  # Input might be given as Windows format, start by converting to
11721  # unix format.
11722  path="$BOOT_JDK"
11723  new_path=`$CYGPATH -u "$path"`
11724
11725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11728  # "foo.exe" is OK but "foo" is an error.
11729  #
11730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11731  # It is also a way to make sure we got the proper file name for the real test later on.
11732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11733  if test "x$test_shortpath" = x; then
11734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11736    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11737  fi
11738
11739  # Call helper function which possibly converts this using DOS-style short mode.
11740  # If so, the updated path is stored in $new_path.
11741
11742  input_path="$new_path"
11743  # Check if we need to convert this using DOS-style short mode. If the path
11744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11745  # take no chances and rewrite it.
11746  # Note: m4 eats our [], so we need to use [ and ] instead.
11747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11748  if test "x$has_forbidden_chars" != x; then
11749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11753      # Going to short mode and back again did indeed matter. Since short mode is
11754      # case insensitive, let's make it lowercase to improve readability.
11755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11756      # Now convert it back to Unix-stile (cygpath)
11757      input_path=`$CYGPATH -u "$shortmode_path"`
11758      new_path="$input_path"
11759    fi
11760  fi
11761
11762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11763  if test "x$test_cygdrive_prefix" = x; then
11764    # As a simple fix, exclude /usr/bin since it's not a real path.
11765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11767      # a path prefixed by /cygdrive for fixpath to work.
11768      new_path="$CYGWIN_ROOT_PATH$input_path"
11769    fi
11770  fi
11771
11772
11773  if test "x$path" != "x$new_path"; then
11774    BOOT_JDK="$new_path"
11775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11776$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11777  fi
11778
11779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11780
11781  path="$BOOT_JDK"
11782  has_colon=`$ECHO $path | $GREP ^.:`
11783  new_path="$path"
11784  if test "x$has_colon" = x; then
11785    # Not in mixed or Windows style, start by that.
11786    new_path=`cmd //c echo $path`
11787  fi
11788
11789
11790  input_path="$new_path"
11791  # Check if we need to convert this using DOS-style short mode. If the path
11792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11793  # take no chances and rewrite it.
11794  # Note: m4 eats our [], so we need to use [ and ] instead.
11795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11796  if test "x$has_forbidden_chars" != x; then
11797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11799  fi
11800
11801
11802  windows_path="$new_path"
11803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11804    unix_path=`$CYGPATH -u "$windows_path"`
11805    new_path="$unix_path"
11806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11808    new_path="$unix_path"
11809  fi
11810
11811  if test "x$path" != "x$new_path"; then
11812    BOOT_JDK="$new_path"
11813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11814$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11815  fi
11816
11817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11819
11820  else
11821    # We're on a posix platform. Hooray! :)
11822    path="$BOOT_JDK"
11823
11824    if test ! -f "$path" && test ! -d "$path"; then
11825      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11826    fi
11827
11828    has_space=`$ECHO "$path" | $GREP " "`
11829    if test "x$has_space" != x; then
11830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11832      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11833    fi
11834  fi
11835
11836              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11837$as_echo_n "checking for Boot JDK... " >&6; }
11838              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11839$as_echo "$BOOT_JDK" >&6; }
11840              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11841$as_echo_n "checking Boot JDK version... " >&6; }
11842              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11843              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11844$as_echo "$BOOT_JDK_VERSION" >&6; }
11845            fi # end check jdk version
11846          fi # end check rt.jar
11847        fi # end check javac
11848      fi # end check java
11849    fi # end check boot jdk found
11850  fi
11851
11852
11853# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11854
11855  if test "x$BOOT_JDK_FOUND" = xno; then
11856    # Now execute the test
11857
11858    # Extract the first word of "javac", so it can be a program name with args.
11859set dummy javac; ac_word=$2
11860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11861$as_echo_n "checking for $ac_word... " >&6; }
11862if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11863  $as_echo_n "(cached) " >&6
11864else
11865  case $JAVAC_CHECK in
11866  [\\/]* | ?:[\\/]*)
11867  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11868  ;;
11869  *)
11870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11871for as_dir in $PATH
11872do
11873  IFS=$as_save_IFS
11874  test -z "$as_dir" && as_dir=.
11875    for ac_exec_ext in '' $ac_executable_extensions; do
11876  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11877    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11879    break 2
11880  fi
11881done
11882  done
11883IFS=$as_save_IFS
11884
11885  ;;
11886esac
11887fi
11888JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11889if test -n "$JAVAC_CHECK"; then
11890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11891$as_echo "$JAVAC_CHECK" >&6; }
11892else
11893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11894$as_echo "no" >&6; }
11895fi
11896
11897
11898    # Extract the first word of "java", so it can be a program name with args.
11899set dummy java; ac_word=$2
11900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11901$as_echo_n "checking for $ac_word... " >&6; }
11902if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11903  $as_echo_n "(cached) " >&6
11904else
11905  case $JAVA_CHECK in
11906  [\\/]* | ?:[\\/]*)
11907  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11908  ;;
11909  *)
11910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11911for as_dir in $PATH
11912do
11913  IFS=$as_save_IFS
11914  test -z "$as_dir" && as_dir=.
11915    for ac_exec_ext in '' $ac_executable_extensions; do
11916  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11917    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11919    break 2
11920  fi
11921done
11922  done
11923IFS=$as_save_IFS
11924
11925  ;;
11926esac
11927fi
11928JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11929if test -n "$JAVA_CHECK"; then
11930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11931$as_echo "$JAVA_CHECK" >&6; }
11932else
11933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11934$as_echo "no" >&6; }
11935fi
11936
11937
11938    BINARY="$JAVAC_CHECK"
11939    if test "x$JAVAC_CHECK" = x; then
11940        BINARY="$JAVA_CHECK"
11941    fi
11942    if test "x$BINARY" != x; then
11943        # So there is a java(c) binary, it might be part of a JDK.
11944        # Lets find the JDK/JRE directory by following symbolic links.
11945        # Linux/GNU systems often have links from /usr/bin/java to
11946        # /etc/alternatives/java to the real JDK binary.
11947
11948    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11949        # Follow a chain of symbolic links. Use readlink
11950        # where it exists, else fall back to horribly
11951        # complicated shell code.
11952        if test "x$READLINK_TESTED" != yes; then
11953            # On MacOSX there is a readlink tool with a different
11954            # purpose than the GNU readlink tool. Check the found readlink.
11955            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11956            if test "x$ISGNU" = x; then
11957                 # A readlink that we do not know how to use.
11958                 # Are there other non-GNU readlinks out there?
11959                 READLINK_TESTED=yes
11960                 READLINK=
11961            fi
11962        fi
11963
11964        if test "x$READLINK" != x; then
11965            BINARY=`$READLINK -f $BINARY`
11966        else
11967            # Save the current directory for restoring afterwards
11968            STARTDIR=$PWD
11969            COUNTER=0
11970            sym_link_dir=`$DIRNAME $BINARY`
11971            sym_link_file=`$BASENAME $BINARY`
11972            # Use the system pwd and not the shell builtin to resolve directory symlinks
11973            cd $sym_link_dir
11974            cd `$THEPWDCMD`
11975            sym_link_dir=`$THEPWDCMD`
11976            # Resolve file symlinks
11977            while test $COUNTER -lt 20; do
11978                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11979                if test "x$ISLINK" == x; then
11980                    # This is not a symbolic link! We are done!
11981                    break
11982                fi
11983                # Again resolve directory symlinks since the target of the just found
11984                # link could be in a different directory
11985                cd `$DIRNAME $ISLINK`
11986                sym_link_dir=`$THEPWDCMD`
11987                sym_link_file=`$BASENAME $ISLINK`
11988                let COUNTER=COUNTER+1
11989            done
11990            cd $STARTDIR
11991            BINARY=$sym_link_dir/$sym_link_file
11992        fi
11993    fi
11994
11995        BOOT_JDK=`dirname "$BINARY"`
11996        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11997        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11998            # Looks like we found ourselves an JDK
11999            BOOT_JDK_FOUND=maybe
12000            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12001$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12002        fi
12003    fi
12004
12005
12006    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12007    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12008      # Do we have a bin/java?
12009      if test ! -x "$BOOT_JDK/bin/java"; then
12010        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12012        BOOT_JDK_FOUND=no
12013      else
12014        # Do we have a bin/javac?
12015        if test ! -x "$BOOT_JDK/bin/javac"; then
12016          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12018          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12019$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12020          BOOT_JDK_FOUND=no
12021        else
12022          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12023          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12024            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12026            BOOT_JDK_FOUND=no
12027          else
12028            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12029            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12030
12031            # Extra M4 quote needed to protect [] in grep expression.
12032            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12033            if test "x$FOUND_VERSION_78" = x; then
12034              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12036              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12037$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12038              BOOT_JDK_FOUND=no
12039            else
12040              # We're done! :-)
12041              BOOT_JDK_FOUND=yes
12042
12043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12044
12045  # Input might be given as Windows format, start by converting to
12046  # unix format.
12047  path="$BOOT_JDK"
12048  new_path=`$CYGPATH -u "$path"`
12049
12050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12053  # "foo.exe" is OK but "foo" is an error.
12054  #
12055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12056  # It is also a way to make sure we got the proper file name for the real test later on.
12057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12058  if test "x$test_shortpath" = x; then
12059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12061    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12062  fi
12063
12064  # Call helper function which possibly converts this using DOS-style short mode.
12065  # If so, the updated path is stored in $new_path.
12066
12067  input_path="$new_path"
12068  # Check if we need to convert this using DOS-style short mode. If the path
12069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12070  # take no chances and rewrite it.
12071  # Note: m4 eats our [], so we need to use [ and ] instead.
12072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12073  if test "x$has_forbidden_chars" != x; then
12074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12078      # Going to short mode and back again did indeed matter. Since short mode is
12079      # case insensitive, let's make it lowercase to improve readability.
12080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12081      # Now convert it back to Unix-stile (cygpath)
12082      input_path=`$CYGPATH -u "$shortmode_path"`
12083      new_path="$input_path"
12084    fi
12085  fi
12086
12087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12088  if test "x$test_cygdrive_prefix" = x; then
12089    # As a simple fix, exclude /usr/bin since it's not a real path.
12090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12092      # a path prefixed by /cygdrive for fixpath to work.
12093      new_path="$CYGWIN_ROOT_PATH$input_path"
12094    fi
12095  fi
12096
12097
12098  if test "x$path" != "x$new_path"; then
12099    BOOT_JDK="$new_path"
12100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12102  fi
12103
12104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12105
12106  path="$BOOT_JDK"
12107  has_colon=`$ECHO $path | $GREP ^.:`
12108  new_path="$path"
12109  if test "x$has_colon" = x; then
12110    # Not in mixed or Windows style, start by that.
12111    new_path=`cmd //c echo $path`
12112  fi
12113
12114
12115  input_path="$new_path"
12116  # Check if we need to convert this using DOS-style short mode. If the path
12117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12118  # take no chances and rewrite it.
12119  # Note: m4 eats our [], so we need to use [ and ] instead.
12120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12121  if test "x$has_forbidden_chars" != x; then
12122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12124  fi
12125
12126
12127  windows_path="$new_path"
12128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12129    unix_path=`$CYGPATH -u "$windows_path"`
12130    new_path="$unix_path"
12131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12133    new_path="$unix_path"
12134  fi
12135
12136  if test "x$path" != "x$new_path"; then
12137    BOOT_JDK="$new_path"
12138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12140  fi
12141
12142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12144
12145  else
12146    # We're on a posix platform. Hooray! :)
12147    path="$BOOT_JDK"
12148
12149    if test ! -f "$path" && test ! -d "$path"; then
12150      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12151    fi
12152
12153    has_space=`$ECHO "$path" | $GREP " "`
12154    if test "x$has_space" != x; then
12155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12156$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12157      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12158    fi
12159  fi
12160
12161              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12162$as_echo_n "checking for Boot JDK... " >&6; }
12163              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12164$as_echo "$BOOT_JDK" >&6; }
12165              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12166$as_echo_n "checking Boot JDK version... " >&6; }
12167              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12168              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12169$as_echo "$BOOT_JDK_VERSION" >&6; }
12170            fi # end check jdk version
12171          fi # end check rt.jar
12172        fi # end check javac
12173      fi # end check java
12174    fi # end check boot jdk found
12175  fi
12176
12177
12178# Test: Is there a JDK installed in default, well-known locations?
12179
12180  if test "x$BOOT_JDK_FOUND" = xno; then
12181    # Now execute the test
12182
12183  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12184
12185  if test "x$BOOT_JDK_FOUND" = xno; then
12186    # Now execute the test
12187
12188  if test "x$ProgramW6432" != x; then
12189    VIRTUAL_DIR="$ProgramW6432/Java"
12190
12191  windows_path="$VIRTUAL_DIR"
12192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12193    unix_path=`$CYGPATH -u "$windows_path"`
12194    VIRTUAL_DIR="$unix_path"
12195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12197    VIRTUAL_DIR="$unix_path"
12198  fi
12199
12200
12201  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12202  BOOT_JDK_SUFFIX=""
12203  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12204  if test "x$ALL_JDKS_FOUND" != x; then
12205    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12206
12207  if test "x$BOOT_JDK_FOUND" = xno; then
12208    # Now execute the test
12209
12210        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12211        if test -d "$BOOT_JDK"; then
12212          BOOT_JDK_FOUND=maybe
12213          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12214$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12215        fi
12216
12217
12218    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12219    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12220      # Do we have a bin/java?
12221      if test ! -x "$BOOT_JDK/bin/java"; then
12222        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12224        BOOT_JDK_FOUND=no
12225      else
12226        # Do we have a bin/javac?
12227        if test ! -x "$BOOT_JDK/bin/javac"; then
12228          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12230          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12231$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12232          BOOT_JDK_FOUND=no
12233        else
12234          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12235          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12236            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12238            BOOT_JDK_FOUND=no
12239          else
12240            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12242
12243            # Extra M4 quote needed to protect [] in grep expression.
12244            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12245            if test "x$FOUND_VERSION_78" = x; then
12246              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12248              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12249$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12250              BOOT_JDK_FOUND=no
12251            else
12252              # We're done! :-)
12253              BOOT_JDK_FOUND=yes
12254
12255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12256
12257  # Input might be given as Windows format, start by converting to
12258  # unix format.
12259  path="$BOOT_JDK"
12260  new_path=`$CYGPATH -u "$path"`
12261
12262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12265  # "foo.exe" is OK but "foo" is an error.
12266  #
12267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12268  # It is also a way to make sure we got the proper file name for the real test later on.
12269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12270  if test "x$test_shortpath" = x; then
12271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12273    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12274  fi
12275
12276  # Call helper function which possibly converts this using DOS-style short mode.
12277  # If so, the updated path is stored in $new_path.
12278
12279  input_path="$new_path"
12280  # Check if we need to convert this using DOS-style short mode. If the path
12281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12282  # take no chances and rewrite it.
12283  # Note: m4 eats our [], so we need to use [ and ] instead.
12284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12285  if test "x$has_forbidden_chars" != x; then
12286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12290      # Going to short mode and back again did indeed matter. Since short mode is
12291      # case insensitive, let's make it lowercase to improve readability.
12292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12293      # Now convert it back to Unix-stile (cygpath)
12294      input_path=`$CYGPATH -u "$shortmode_path"`
12295      new_path="$input_path"
12296    fi
12297  fi
12298
12299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12300  if test "x$test_cygdrive_prefix" = x; then
12301    # As a simple fix, exclude /usr/bin since it's not a real path.
12302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12304      # a path prefixed by /cygdrive for fixpath to work.
12305      new_path="$CYGWIN_ROOT_PATH$input_path"
12306    fi
12307  fi
12308
12309
12310  if test "x$path" != "x$new_path"; then
12311    BOOT_JDK="$new_path"
12312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12314  fi
12315
12316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12317
12318  path="$BOOT_JDK"
12319  has_colon=`$ECHO $path | $GREP ^.:`
12320  new_path="$path"
12321  if test "x$has_colon" = x; then
12322    # Not in mixed or Windows style, start by that.
12323    new_path=`cmd //c echo $path`
12324  fi
12325
12326
12327  input_path="$new_path"
12328  # Check if we need to convert this using DOS-style short mode. If the path
12329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12330  # take no chances and rewrite it.
12331  # Note: m4 eats our [], so we need to use [ and ] instead.
12332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12333  if test "x$has_forbidden_chars" != x; then
12334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12336  fi
12337
12338
12339  windows_path="$new_path"
12340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12341    unix_path=`$CYGPATH -u "$windows_path"`
12342    new_path="$unix_path"
12343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12345    new_path="$unix_path"
12346  fi
12347
12348  if test "x$path" != "x$new_path"; then
12349    BOOT_JDK="$new_path"
12350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12352  fi
12353
12354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12356
12357  else
12358    # We're on a posix platform. Hooray! :)
12359    path="$BOOT_JDK"
12360
12361    if test ! -f "$path" && test ! -d "$path"; then
12362      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12363    fi
12364
12365    has_space=`$ECHO "$path" | $GREP " "`
12366    if test "x$has_space" != x; then
12367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12369      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12370    fi
12371  fi
12372
12373              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12374$as_echo_n "checking for Boot JDK... " >&6; }
12375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12376$as_echo "$BOOT_JDK" >&6; }
12377              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12378$as_echo_n "checking Boot JDK version... " >&6; }
12379              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12380              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12381$as_echo "$BOOT_JDK_VERSION" >&6; }
12382            fi # end check jdk version
12383          fi # end check rt.jar
12384        fi # end check javac
12385      fi # end check java
12386    fi # end check boot jdk found
12387  fi
12388
12389    done
12390  fi
12391
12392  fi
12393
12394
12395    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12396    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12397      # Do we have a bin/java?
12398      if test ! -x "$BOOT_JDK/bin/java"; then
12399        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12401        BOOT_JDK_FOUND=no
12402      else
12403        # Do we have a bin/javac?
12404        if test ! -x "$BOOT_JDK/bin/javac"; then
12405          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12407          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12408$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12409          BOOT_JDK_FOUND=no
12410        else
12411          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12412          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12413            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12415            BOOT_JDK_FOUND=no
12416          else
12417            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12418            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12419
12420            # Extra M4 quote needed to protect [] in grep expression.
12421            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12422            if test "x$FOUND_VERSION_78" = x; then
12423              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12425              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12426$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12427              BOOT_JDK_FOUND=no
12428            else
12429              # We're done! :-)
12430              BOOT_JDK_FOUND=yes
12431
12432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12433
12434  # Input might be given as Windows format, start by converting to
12435  # unix format.
12436  path="$BOOT_JDK"
12437  new_path=`$CYGPATH -u "$path"`
12438
12439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12442  # "foo.exe" is OK but "foo" is an error.
12443  #
12444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12445  # It is also a way to make sure we got the proper file name for the real test later on.
12446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12447  if test "x$test_shortpath" = x; then
12448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12450    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12451  fi
12452
12453  # Call helper function which possibly converts this using DOS-style short mode.
12454  # If so, the updated path is stored in $new_path.
12455
12456  input_path="$new_path"
12457  # Check if we need to convert this using DOS-style short mode. If the path
12458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12459  # take no chances and rewrite it.
12460  # Note: m4 eats our [], so we need to use [ and ] instead.
12461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12462  if test "x$has_forbidden_chars" != x; then
12463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12467      # Going to short mode and back again did indeed matter. Since short mode is
12468      # case insensitive, let's make it lowercase to improve readability.
12469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12470      # Now convert it back to Unix-stile (cygpath)
12471      input_path=`$CYGPATH -u "$shortmode_path"`
12472      new_path="$input_path"
12473    fi
12474  fi
12475
12476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12477  if test "x$test_cygdrive_prefix" = x; then
12478    # As a simple fix, exclude /usr/bin since it's not a real path.
12479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12481      # a path prefixed by /cygdrive for fixpath to work.
12482      new_path="$CYGWIN_ROOT_PATH$input_path"
12483    fi
12484  fi
12485
12486
12487  if test "x$path" != "x$new_path"; then
12488    BOOT_JDK="$new_path"
12489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12490$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12491  fi
12492
12493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12494
12495  path="$BOOT_JDK"
12496  has_colon=`$ECHO $path | $GREP ^.:`
12497  new_path="$path"
12498  if test "x$has_colon" = x; then
12499    # Not in mixed or Windows style, start by that.
12500    new_path=`cmd //c echo $path`
12501  fi
12502
12503
12504  input_path="$new_path"
12505  # Check if we need to convert this using DOS-style short mode. If the path
12506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12507  # take no chances and rewrite it.
12508  # Note: m4 eats our [], so we need to use [ and ] instead.
12509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12510  if test "x$has_forbidden_chars" != x; then
12511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12513  fi
12514
12515
12516  windows_path="$new_path"
12517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12518    unix_path=`$CYGPATH -u "$windows_path"`
12519    new_path="$unix_path"
12520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12522    new_path="$unix_path"
12523  fi
12524
12525  if test "x$path" != "x$new_path"; then
12526    BOOT_JDK="$new_path"
12527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12529  fi
12530
12531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12533
12534  else
12535    # We're on a posix platform. Hooray! :)
12536    path="$BOOT_JDK"
12537
12538    if test ! -f "$path" && test ! -d "$path"; then
12539      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12540    fi
12541
12542    has_space=`$ECHO "$path" | $GREP " "`
12543    if test "x$has_space" != x; then
12544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12545$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12546      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12547    fi
12548  fi
12549
12550              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12551$as_echo_n "checking for Boot JDK... " >&6; }
12552              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12553$as_echo "$BOOT_JDK" >&6; }
12554              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12555$as_echo_n "checking Boot JDK version... " >&6; }
12556              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12557              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12558$as_echo "$BOOT_JDK_VERSION" >&6; }
12559            fi # end check jdk version
12560          fi # end check rt.jar
12561        fi # end check javac
12562      fi # end check java
12563    fi # end check boot jdk found
12564  fi
12565
12566
12567  if test "x$BOOT_JDK_FOUND" = xno; then
12568    # Now execute the test
12569
12570  if test "x$PROGRAMW6432" != x; then
12571    VIRTUAL_DIR="$PROGRAMW6432/Java"
12572
12573  windows_path="$VIRTUAL_DIR"
12574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12575    unix_path=`$CYGPATH -u "$windows_path"`
12576    VIRTUAL_DIR="$unix_path"
12577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12579    VIRTUAL_DIR="$unix_path"
12580  fi
12581
12582
12583  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12584  BOOT_JDK_SUFFIX=""
12585  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12586  if test "x$ALL_JDKS_FOUND" != x; then
12587    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12588
12589  if test "x$BOOT_JDK_FOUND" = xno; then
12590    # Now execute the test
12591
12592        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12593        if test -d "$BOOT_JDK"; then
12594          BOOT_JDK_FOUND=maybe
12595          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12596$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12597        fi
12598
12599
12600    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12601    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12602      # Do we have a bin/java?
12603      if test ! -x "$BOOT_JDK/bin/java"; then
12604        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12606        BOOT_JDK_FOUND=no
12607      else
12608        # Do we have a bin/javac?
12609        if test ! -x "$BOOT_JDK/bin/javac"; then
12610          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12612          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12613$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12614          BOOT_JDK_FOUND=no
12615        else
12616          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12617          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12618            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12620            BOOT_JDK_FOUND=no
12621          else
12622            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12623            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12624
12625            # Extra M4 quote needed to protect [] in grep expression.
12626            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12627            if test "x$FOUND_VERSION_78" = x; then
12628              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12630              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12631$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12632              BOOT_JDK_FOUND=no
12633            else
12634              # We're done! :-)
12635              BOOT_JDK_FOUND=yes
12636
12637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12638
12639  # Input might be given as Windows format, start by converting to
12640  # unix format.
12641  path="$BOOT_JDK"
12642  new_path=`$CYGPATH -u "$path"`
12643
12644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12647  # "foo.exe" is OK but "foo" is an error.
12648  #
12649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12650  # It is also a way to make sure we got the proper file name for the real test later on.
12651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12652  if test "x$test_shortpath" = x; then
12653    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12655    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12656  fi
12657
12658  # Call helper function which possibly converts this using DOS-style short mode.
12659  # If so, the updated path is stored in $new_path.
12660
12661  input_path="$new_path"
12662  # Check if we need to convert this using DOS-style short mode. If the path
12663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12664  # take no chances and rewrite it.
12665  # Note: m4 eats our [], so we need to use [ and ] instead.
12666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12667  if test "x$has_forbidden_chars" != x; then
12668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12672      # Going to short mode and back again did indeed matter. Since short mode is
12673      # case insensitive, let's make it lowercase to improve readability.
12674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12675      # Now convert it back to Unix-stile (cygpath)
12676      input_path=`$CYGPATH -u "$shortmode_path"`
12677      new_path="$input_path"
12678    fi
12679  fi
12680
12681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12682  if test "x$test_cygdrive_prefix" = x; then
12683    # As a simple fix, exclude /usr/bin since it's not a real path.
12684    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12686      # a path prefixed by /cygdrive for fixpath to work.
12687      new_path="$CYGWIN_ROOT_PATH$input_path"
12688    fi
12689  fi
12690
12691
12692  if test "x$path" != "x$new_path"; then
12693    BOOT_JDK="$new_path"
12694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12696  fi
12697
12698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12699
12700  path="$BOOT_JDK"
12701  has_colon=`$ECHO $path | $GREP ^.:`
12702  new_path="$path"
12703  if test "x$has_colon" = x; then
12704    # Not in mixed or Windows style, start by that.
12705    new_path=`cmd //c echo $path`
12706  fi
12707
12708
12709  input_path="$new_path"
12710  # Check if we need to convert this using DOS-style short mode. If the path
12711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12712  # take no chances and rewrite it.
12713  # Note: m4 eats our [], so we need to use [ and ] instead.
12714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12715  if test "x$has_forbidden_chars" != x; then
12716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12718  fi
12719
12720
12721  windows_path="$new_path"
12722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12723    unix_path=`$CYGPATH -u "$windows_path"`
12724    new_path="$unix_path"
12725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12727    new_path="$unix_path"
12728  fi
12729
12730  if test "x$path" != "x$new_path"; then
12731    BOOT_JDK="$new_path"
12732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12733$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12734  fi
12735
12736  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12737  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12738
12739  else
12740    # We're on a posix platform. Hooray! :)
12741    path="$BOOT_JDK"
12742
12743    if test ! -f "$path" && test ! -d "$path"; then
12744      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12745    fi
12746
12747    has_space=`$ECHO "$path" | $GREP " "`
12748    if test "x$has_space" != x; then
12749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12750$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12751      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12752    fi
12753  fi
12754
12755              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12756$as_echo_n "checking for Boot JDK... " >&6; }
12757              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12758$as_echo "$BOOT_JDK" >&6; }
12759              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12760$as_echo_n "checking Boot JDK version... " >&6; }
12761              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12762              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12763$as_echo "$BOOT_JDK_VERSION" >&6; }
12764            fi # end check jdk version
12765          fi # end check rt.jar
12766        fi # end check javac
12767      fi # end check java
12768    fi # end check boot jdk found
12769  fi
12770
12771    done
12772  fi
12773
12774  fi
12775
12776
12777    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12778    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12779      # Do we have a bin/java?
12780      if test ! -x "$BOOT_JDK/bin/java"; then
12781        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12783        BOOT_JDK_FOUND=no
12784      else
12785        # Do we have a bin/javac?
12786        if test ! -x "$BOOT_JDK/bin/javac"; then
12787          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12789          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12790$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12791          BOOT_JDK_FOUND=no
12792        else
12793          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12794          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12795            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12797            BOOT_JDK_FOUND=no
12798          else
12799            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12800            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12801
12802            # Extra M4 quote needed to protect [] in grep expression.
12803            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12804            if test "x$FOUND_VERSION_78" = x; then
12805              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12807              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12808$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12809              BOOT_JDK_FOUND=no
12810            else
12811              # We're done! :-)
12812              BOOT_JDK_FOUND=yes
12813
12814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12815
12816  # Input might be given as Windows format, start by converting to
12817  # unix format.
12818  path="$BOOT_JDK"
12819  new_path=`$CYGPATH -u "$path"`
12820
12821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12824  # "foo.exe" is OK but "foo" is an error.
12825  #
12826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12827  # It is also a way to make sure we got the proper file name for the real test later on.
12828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12829  if test "x$test_shortpath" = x; then
12830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12832    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12833  fi
12834
12835  # Call helper function which possibly converts this using DOS-style short mode.
12836  # If so, the updated path is stored in $new_path.
12837
12838  input_path="$new_path"
12839  # Check if we need to convert this using DOS-style short mode. If the path
12840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12841  # take no chances and rewrite it.
12842  # Note: m4 eats our [], so we need to use [ and ] instead.
12843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12844  if test "x$has_forbidden_chars" != x; then
12845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12849      # Going to short mode and back again did indeed matter. Since short mode is
12850      # case insensitive, let's make it lowercase to improve readability.
12851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12852      # Now convert it back to Unix-stile (cygpath)
12853      input_path=`$CYGPATH -u "$shortmode_path"`
12854      new_path="$input_path"
12855    fi
12856  fi
12857
12858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12859  if test "x$test_cygdrive_prefix" = x; then
12860    # As a simple fix, exclude /usr/bin since it's not a real path.
12861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12863      # a path prefixed by /cygdrive for fixpath to work.
12864      new_path="$CYGWIN_ROOT_PATH$input_path"
12865    fi
12866  fi
12867
12868
12869  if test "x$path" != "x$new_path"; then
12870    BOOT_JDK="$new_path"
12871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12873  fi
12874
12875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12876
12877  path="$BOOT_JDK"
12878  has_colon=`$ECHO $path | $GREP ^.:`
12879  new_path="$path"
12880  if test "x$has_colon" = x; then
12881    # Not in mixed or Windows style, start by that.
12882    new_path=`cmd //c echo $path`
12883  fi
12884
12885
12886  input_path="$new_path"
12887  # Check if we need to convert this using DOS-style short mode. If the path
12888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12889  # take no chances and rewrite it.
12890  # Note: m4 eats our [], so we need to use [ and ] instead.
12891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12892  if test "x$has_forbidden_chars" != x; then
12893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12895  fi
12896
12897
12898  windows_path="$new_path"
12899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12900    unix_path=`$CYGPATH -u "$windows_path"`
12901    new_path="$unix_path"
12902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12904    new_path="$unix_path"
12905  fi
12906
12907  if test "x$path" != "x$new_path"; then
12908    BOOT_JDK="$new_path"
12909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12910$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12911  fi
12912
12913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12915
12916  else
12917    # We're on a posix platform. Hooray! :)
12918    path="$BOOT_JDK"
12919
12920    if test ! -f "$path" && test ! -d "$path"; then
12921      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12922    fi
12923
12924    has_space=`$ECHO "$path" | $GREP " "`
12925    if test "x$has_space" != x; then
12926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12928      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12929    fi
12930  fi
12931
12932              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12933$as_echo_n "checking for Boot JDK... " >&6; }
12934              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12935$as_echo "$BOOT_JDK" >&6; }
12936              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12937$as_echo_n "checking Boot JDK version... " >&6; }
12938              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12939              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12940$as_echo "$BOOT_JDK_VERSION" >&6; }
12941            fi # end check jdk version
12942          fi # end check rt.jar
12943        fi # end check javac
12944      fi # end check java
12945    fi # end check boot jdk found
12946  fi
12947
12948
12949  if test "x$BOOT_JDK_FOUND" = xno; then
12950    # Now execute the test
12951
12952  if test "x$PROGRAMFILES" != x; then
12953    VIRTUAL_DIR="$PROGRAMFILES/Java"
12954
12955  windows_path="$VIRTUAL_DIR"
12956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12957    unix_path=`$CYGPATH -u "$windows_path"`
12958    VIRTUAL_DIR="$unix_path"
12959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12961    VIRTUAL_DIR="$unix_path"
12962  fi
12963
12964
12965  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12966  BOOT_JDK_SUFFIX=""
12967  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12968  if test "x$ALL_JDKS_FOUND" != x; then
12969    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12970
12971  if test "x$BOOT_JDK_FOUND" = xno; then
12972    # Now execute the test
12973
12974        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12975        if test -d "$BOOT_JDK"; then
12976          BOOT_JDK_FOUND=maybe
12977          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12978$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12979        fi
12980
12981
12982    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12983    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12984      # Do we have a bin/java?
12985      if test ! -x "$BOOT_JDK/bin/java"; then
12986        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12988        BOOT_JDK_FOUND=no
12989      else
12990        # Do we have a bin/javac?
12991        if test ! -x "$BOOT_JDK/bin/javac"; then
12992          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12994          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12995$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12996          BOOT_JDK_FOUND=no
12997        else
12998          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12999          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13000            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13002            BOOT_JDK_FOUND=no
13003          else
13004            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13005            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13006
13007            # Extra M4 quote needed to protect [] in grep expression.
13008            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13009            if test "x$FOUND_VERSION_78" = x; then
13010              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13012              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13013$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13014              BOOT_JDK_FOUND=no
13015            else
13016              # We're done! :-)
13017              BOOT_JDK_FOUND=yes
13018
13019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13020
13021  # Input might be given as Windows format, start by converting to
13022  # unix format.
13023  path="$BOOT_JDK"
13024  new_path=`$CYGPATH -u "$path"`
13025
13026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13029  # "foo.exe" is OK but "foo" is an error.
13030  #
13031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13032  # It is also a way to make sure we got the proper file name for the real test later on.
13033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13034  if test "x$test_shortpath" = x; then
13035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13037    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13038  fi
13039
13040  # Call helper function which possibly converts this using DOS-style short mode.
13041  # If so, the updated path is stored in $new_path.
13042
13043  input_path="$new_path"
13044  # Check if we need to convert this using DOS-style short mode. If the path
13045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13046  # take no chances and rewrite it.
13047  # Note: m4 eats our [], so we need to use [ and ] instead.
13048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13049  if test "x$has_forbidden_chars" != x; then
13050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13054      # Going to short mode and back again did indeed matter. Since short mode is
13055      # case insensitive, let's make it lowercase to improve readability.
13056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13057      # Now convert it back to Unix-stile (cygpath)
13058      input_path=`$CYGPATH -u "$shortmode_path"`
13059      new_path="$input_path"
13060    fi
13061  fi
13062
13063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13064  if test "x$test_cygdrive_prefix" = x; then
13065    # As a simple fix, exclude /usr/bin since it's not a real path.
13066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13068      # a path prefixed by /cygdrive for fixpath to work.
13069      new_path="$CYGWIN_ROOT_PATH$input_path"
13070    fi
13071  fi
13072
13073
13074  if test "x$path" != "x$new_path"; then
13075    BOOT_JDK="$new_path"
13076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13077$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13078  fi
13079
13080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13081
13082  path="$BOOT_JDK"
13083  has_colon=`$ECHO $path | $GREP ^.:`
13084  new_path="$path"
13085  if test "x$has_colon" = x; then
13086    # Not in mixed or Windows style, start by that.
13087    new_path=`cmd //c echo $path`
13088  fi
13089
13090
13091  input_path="$new_path"
13092  # Check if we need to convert this using DOS-style short mode. If the path
13093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13094  # take no chances and rewrite it.
13095  # Note: m4 eats our [], so we need to use [ and ] instead.
13096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13097  if test "x$has_forbidden_chars" != x; then
13098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13100  fi
13101
13102
13103  windows_path="$new_path"
13104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13105    unix_path=`$CYGPATH -u "$windows_path"`
13106    new_path="$unix_path"
13107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13109    new_path="$unix_path"
13110  fi
13111
13112  if test "x$path" != "x$new_path"; then
13113    BOOT_JDK="$new_path"
13114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13115$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13116  fi
13117
13118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13120
13121  else
13122    # We're on a posix platform. Hooray! :)
13123    path="$BOOT_JDK"
13124
13125    if test ! -f "$path" && test ! -d "$path"; then
13126      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13127    fi
13128
13129    has_space=`$ECHO "$path" | $GREP " "`
13130    if test "x$has_space" != x; then
13131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13132$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13133      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13134    fi
13135  fi
13136
13137              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13138$as_echo_n "checking for Boot JDK... " >&6; }
13139              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13140$as_echo "$BOOT_JDK" >&6; }
13141              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13142$as_echo_n "checking Boot JDK version... " >&6; }
13143              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13144              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13145$as_echo "$BOOT_JDK_VERSION" >&6; }
13146            fi # end check jdk version
13147          fi # end check rt.jar
13148        fi # end check javac
13149      fi # end check java
13150    fi # end check boot jdk found
13151  fi
13152
13153    done
13154  fi
13155
13156  fi
13157
13158
13159    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13160    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13161      # Do we have a bin/java?
13162      if test ! -x "$BOOT_JDK/bin/java"; then
13163        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13165        BOOT_JDK_FOUND=no
13166      else
13167        # Do we have a bin/javac?
13168        if test ! -x "$BOOT_JDK/bin/javac"; then
13169          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13171          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13172$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13173          BOOT_JDK_FOUND=no
13174        else
13175          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13176          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13177            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13179            BOOT_JDK_FOUND=no
13180          else
13181            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13182            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13183
13184            # Extra M4 quote needed to protect [] in grep expression.
13185            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13186            if test "x$FOUND_VERSION_78" = x; then
13187              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13189              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13190$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13191              BOOT_JDK_FOUND=no
13192            else
13193              # We're done! :-)
13194              BOOT_JDK_FOUND=yes
13195
13196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13197
13198  # Input might be given as Windows format, start by converting to
13199  # unix format.
13200  path="$BOOT_JDK"
13201  new_path=`$CYGPATH -u "$path"`
13202
13203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13206  # "foo.exe" is OK but "foo" is an error.
13207  #
13208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13209  # It is also a way to make sure we got the proper file name for the real test later on.
13210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13211  if test "x$test_shortpath" = x; then
13212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13213$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13214    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13215  fi
13216
13217  # Call helper function which possibly converts this using DOS-style short mode.
13218  # If so, the updated path is stored in $new_path.
13219
13220  input_path="$new_path"
13221  # Check if we need to convert this using DOS-style short mode. If the path
13222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13223  # take no chances and rewrite it.
13224  # Note: m4 eats our [], so we need to use [ and ] instead.
13225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13226  if test "x$has_forbidden_chars" != x; then
13227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13231      # Going to short mode and back again did indeed matter. Since short mode is
13232      # case insensitive, let's make it lowercase to improve readability.
13233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13234      # Now convert it back to Unix-stile (cygpath)
13235      input_path=`$CYGPATH -u "$shortmode_path"`
13236      new_path="$input_path"
13237    fi
13238  fi
13239
13240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13241  if test "x$test_cygdrive_prefix" = x; then
13242    # As a simple fix, exclude /usr/bin since it's not a real path.
13243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13245      # a path prefixed by /cygdrive for fixpath to work.
13246      new_path="$CYGWIN_ROOT_PATH$input_path"
13247    fi
13248  fi
13249
13250
13251  if test "x$path" != "x$new_path"; then
13252    BOOT_JDK="$new_path"
13253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13255  fi
13256
13257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13258
13259  path="$BOOT_JDK"
13260  has_colon=`$ECHO $path | $GREP ^.:`
13261  new_path="$path"
13262  if test "x$has_colon" = x; then
13263    # Not in mixed or Windows style, start by that.
13264    new_path=`cmd //c echo $path`
13265  fi
13266
13267
13268  input_path="$new_path"
13269  # Check if we need to convert this using DOS-style short mode. If the path
13270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13271  # take no chances and rewrite it.
13272  # Note: m4 eats our [], so we need to use [ and ] instead.
13273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13274  if test "x$has_forbidden_chars" != x; then
13275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13277  fi
13278
13279
13280  windows_path="$new_path"
13281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13282    unix_path=`$CYGPATH -u "$windows_path"`
13283    new_path="$unix_path"
13284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13286    new_path="$unix_path"
13287  fi
13288
13289  if test "x$path" != "x$new_path"; then
13290    BOOT_JDK="$new_path"
13291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13293  fi
13294
13295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13297
13298  else
13299    # We're on a posix platform. Hooray! :)
13300    path="$BOOT_JDK"
13301
13302    if test ! -f "$path" && test ! -d "$path"; then
13303      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13304    fi
13305
13306    has_space=`$ECHO "$path" | $GREP " "`
13307    if test "x$has_space" != x; then
13308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13309$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13310      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13311    fi
13312  fi
13313
13314              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13315$as_echo_n "checking for Boot JDK... " >&6; }
13316              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13317$as_echo "$BOOT_JDK" >&6; }
13318              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13319$as_echo_n "checking Boot JDK version... " >&6; }
13320              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13321              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13322$as_echo "$BOOT_JDK_VERSION" >&6; }
13323            fi # end check jdk version
13324          fi # end check rt.jar
13325        fi # end check javac
13326      fi # end check java
13327    fi # end check boot jdk found
13328  fi
13329
13330
13331  if test "x$BOOT_JDK_FOUND" = xno; then
13332    # Now execute the test
13333
13334  if test "x$ProgramFiles" != x; then
13335    VIRTUAL_DIR="$ProgramFiles/Java"
13336
13337  windows_path="$VIRTUAL_DIR"
13338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13339    unix_path=`$CYGPATH -u "$windows_path"`
13340    VIRTUAL_DIR="$unix_path"
13341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13343    VIRTUAL_DIR="$unix_path"
13344  fi
13345
13346
13347  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13348  BOOT_JDK_SUFFIX=""
13349  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13350  if test "x$ALL_JDKS_FOUND" != x; then
13351    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13352
13353  if test "x$BOOT_JDK_FOUND" = xno; then
13354    # Now execute the test
13355
13356        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13357        if test -d "$BOOT_JDK"; then
13358          BOOT_JDK_FOUND=maybe
13359          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13360$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13361        fi
13362
13363
13364    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13365    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13366      # Do we have a bin/java?
13367      if test ! -x "$BOOT_JDK/bin/java"; then
13368        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13370        BOOT_JDK_FOUND=no
13371      else
13372        # Do we have a bin/javac?
13373        if test ! -x "$BOOT_JDK/bin/javac"; then
13374          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13376          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13377$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13378          BOOT_JDK_FOUND=no
13379        else
13380          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13381          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13382            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13384            BOOT_JDK_FOUND=no
13385          else
13386            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13387            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13388
13389            # Extra M4 quote needed to protect [] in grep expression.
13390            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13391            if test "x$FOUND_VERSION_78" = x; then
13392              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13394              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13395$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13396              BOOT_JDK_FOUND=no
13397            else
13398              # We're done! :-)
13399              BOOT_JDK_FOUND=yes
13400
13401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13402
13403  # Input might be given as Windows format, start by converting to
13404  # unix format.
13405  path="$BOOT_JDK"
13406  new_path=`$CYGPATH -u "$path"`
13407
13408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13411  # "foo.exe" is OK but "foo" is an error.
13412  #
13413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13414  # It is also a way to make sure we got the proper file name for the real test later on.
13415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13416  if test "x$test_shortpath" = x; then
13417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13418$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13419    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13420  fi
13421
13422  # Call helper function which possibly converts this using DOS-style short mode.
13423  # If so, the updated path is stored in $new_path.
13424
13425  input_path="$new_path"
13426  # Check if we need to convert this using DOS-style short mode. If the path
13427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13428  # take no chances and rewrite it.
13429  # Note: m4 eats our [], so we need to use [ and ] instead.
13430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13431  if test "x$has_forbidden_chars" != x; then
13432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13436      # Going to short mode and back again did indeed matter. Since short mode is
13437      # case insensitive, let's make it lowercase to improve readability.
13438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13439      # Now convert it back to Unix-stile (cygpath)
13440      input_path=`$CYGPATH -u "$shortmode_path"`
13441      new_path="$input_path"
13442    fi
13443  fi
13444
13445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13446  if test "x$test_cygdrive_prefix" = x; then
13447    # As a simple fix, exclude /usr/bin since it's not a real path.
13448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13450      # a path prefixed by /cygdrive for fixpath to work.
13451      new_path="$CYGWIN_ROOT_PATH$input_path"
13452    fi
13453  fi
13454
13455
13456  if test "x$path" != "x$new_path"; then
13457    BOOT_JDK="$new_path"
13458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13460  fi
13461
13462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13463
13464  path="$BOOT_JDK"
13465  has_colon=`$ECHO $path | $GREP ^.:`
13466  new_path="$path"
13467  if test "x$has_colon" = x; then
13468    # Not in mixed or Windows style, start by that.
13469    new_path=`cmd //c echo $path`
13470  fi
13471
13472
13473  input_path="$new_path"
13474  # Check if we need to convert this using DOS-style short mode. If the path
13475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13476  # take no chances and rewrite it.
13477  # Note: m4 eats our [], so we need to use [ and ] instead.
13478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13479  if test "x$has_forbidden_chars" != x; then
13480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13482  fi
13483
13484
13485  windows_path="$new_path"
13486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13487    unix_path=`$CYGPATH -u "$windows_path"`
13488    new_path="$unix_path"
13489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13491    new_path="$unix_path"
13492  fi
13493
13494  if test "x$path" != "x$new_path"; then
13495    BOOT_JDK="$new_path"
13496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13498  fi
13499
13500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13502
13503  else
13504    # We're on a posix platform. Hooray! :)
13505    path="$BOOT_JDK"
13506
13507    if test ! -f "$path" && test ! -d "$path"; then
13508      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13509    fi
13510
13511    has_space=`$ECHO "$path" | $GREP " "`
13512    if test "x$has_space" != x; then
13513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13515      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13516    fi
13517  fi
13518
13519              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13520$as_echo_n "checking for Boot JDK... " >&6; }
13521              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13522$as_echo "$BOOT_JDK" >&6; }
13523              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13524$as_echo_n "checking Boot JDK version... " >&6; }
13525              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13526              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13527$as_echo "$BOOT_JDK_VERSION" >&6; }
13528            fi # end check jdk version
13529          fi # end check rt.jar
13530        fi # end check javac
13531      fi # end check java
13532    fi # end check boot jdk found
13533  fi
13534
13535    done
13536  fi
13537
13538  fi
13539
13540
13541    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13542    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13543      # Do we have a bin/java?
13544      if test ! -x "$BOOT_JDK/bin/java"; then
13545        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13547        BOOT_JDK_FOUND=no
13548      else
13549        # Do we have a bin/javac?
13550        if test ! -x "$BOOT_JDK/bin/javac"; then
13551          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13553          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13554$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13555          BOOT_JDK_FOUND=no
13556        else
13557          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13558          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13559            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13561            BOOT_JDK_FOUND=no
13562          else
13563            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13564            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13565
13566            # Extra M4 quote needed to protect [] in grep expression.
13567            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13568            if test "x$FOUND_VERSION_78" = x; then
13569              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13571              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13572$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13573              BOOT_JDK_FOUND=no
13574            else
13575              # We're done! :-)
13576              BOOT_JDK_FOUND=yes
13577
13578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13579
13580  # Input might be given as Windows format, start by converting to
13581  # unix format.
13582  path="$BOOT_JDK"
13583  new_path=`$CYGPATH -u "$path"`
13584
13585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13588  # "foo.exe" is OK but "foo" is an error.
13589  #
13590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13591  # It is also a way to make sure we got the proper file name for the real test later on.
13592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13593  if test "x$test_shortpath" = x; then
13594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13596    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13597  fi
13598
13599  # Call helper function which possibly converts this using DOS-style short mode.
13600  # If so, the updated path is stored in $new_path.
13601
13602  input_path="$new_path"
13603  # Check if we need to convert this using DOS-style short mode. If the path
13604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13605  # take no chances and rewrite it.
13606  # Note: m4 eats our [], so we need to use [ and ] instead.
13607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13608  if test "x$has_forbidden_chars" != x; then
13609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13613      # Going to short mode and back again did indeed matter. Since short mode is
13614      # case insensitive, let's make it lowercase to improve readability.
13615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13616      # Now convert it back to Unix-stile (cygpath)
13617      input_path=`$CYGPATH -u "$shortmode_path"`
13618      new_path="$input_path"
13619    fi
13620  fi
13621
13622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13623  if test "x$test_cygdrive_prefix" = x; then
13624    # As a simple fix, exclude /usr/bin since it's not a real path.
13625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13627      # a path prefixed by /cygdrive for fixpath to work.
13628      new_path="$CYGWIN_ROOT_PATH$input_path"
13629    fi
13630  fi
13631
13632
13633  if test "x$path" != "x$new_path"; then
13634    BOOT_JDK="$new_path"
13635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13636$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13637  fi
13638
13639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13640
13641  path="$BOOT_JDK"
13642  has_colon=`$ECHO $path | $GREP ^.:`
13643  new_path="$path"
13644  if test "x$has_colon" = x; then
13645    # Not in mixed or Windows style, start by that.
13646    new_path=`cmd //c echo $path`
13647  fi
13648
13649
13650  input_path="$new_path"
13651  # Check if we need to convert this using DOS-style short mode. If the path
13652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13653  # take no chances and rewrite it.
13654  # Note: m4 eats our [], so we need to use [ and ] instead.
13655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13656  if test "x$has_forbidden_chars" != x; then
13657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13659  fi
13660
13661
13662  windows_path="$new_path"
13663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13664    unix_path=`$CYGPATH -u "$windows_path"`
13665    new_path="$unix_path"
13666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13668    new_path="$unix_path"
13669  fi
13670
13671  if test "x$path" != "x$new_path"; then
13672    BOOT_JDK="$new_path"
13673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13674$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13675  fi
13676
13677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13679
13680  else
13681    # We're on a posix platform. Hooray! :)
13682    path="$BOOT_JDK"
13683
13684    if test ! -f "$path" && test ! -d "$path"; then
13685      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13686    fi
13687
13688    has_space=`$ECHO "$path" | $GREP " "`
13689    if test "x$has_space" != x; then
13690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13691$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13692      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13693    fi
13694  fi
13695
13696              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13697$as_echo_n "checking for Boot JDK... " >&6; }
13698              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13699$as_echo "$BOOT_JDK" >&6; }
13700              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13701$as_echo_n "checking Boot JDK version... " >&6; }
13702              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13703              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13704$as_echo "$BOOT_JDK_VERSION" >&6; }
13705            fi # end check jdk version
13706          fi # end check rt.jar
13707        fi # end check javac
13708      fi # end check java
13709    fi # end check boot jdk found
13710  fi
13711
13712
13713  if test "x$BOOT_JDK_FOUND" = xno; then
13714    # Now execute the test
13715
13716  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13717  BOOT_JDK_SUFFIX=""
13718  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13719  if test "x$ALL_JDKS_FOUND" != x; then
13720    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13721
13722  if test "x$BOOT_JDK_FOUND" = xno; then
13723    # Now execute the test
13724
13725        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13726        if test -d "$BOOT_JDK"; then
13727          BOOT_JDK_FOUND=maybe
13728          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13729$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13730        fi
13731
13732
13733    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13734    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13735      # Do we have a bin/java?
13736      if test ! -x "$BOOT_JDK/bin/java"; then
13737        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13739        BOOT_JDK_FOUND=no
13740      else
13741        # Do we have a bin/javac?
13742        if test ! -x "$BOOT_JDK/bin/javac"; then
13743          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13745          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13746$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13747          BOOT_JDK_FOUND=no
13748        else
13749          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13750          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13751            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13753            BOOT_JDK_FOUND=no
13754          else
13755            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13756            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13757
13758            # Extra M4 quote needed to protect [] in grep expression.
13759            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13760            if test "x$FOUND_VERSION_78" = x; then
13761              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13763              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13764$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13765              BOOT_JDK_FOUND=no
13766            else
13767              # We're done! :-)
13768              BOOT_JDK_FOUND=yes
13769
13770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13771
13772  # Input might be given as Windows format, start by converting to
13773  # unix format.
13774  path="$BOOT_JDK"
13775  new_path=`$CYGPATH -u "$path"`
13776
13777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13780  # "foo.exe" is OK but "foo" is an error.
13781  #
13782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13783  # It is also a way to make sure we got the proper file name for the real test later on.
13784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13785  if test "x$test_shortpath" = x; then
13786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13787$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13788    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13789  fi
13790
13791  # Call helper function which possibly converts this using DOS-style short mode.
13792  # If so, the updated path is stored in $new_path.
13793
13794  input_path="$new_path"
13795  # Check if we need to convert this using DOS-style short mode. If the path
13796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13797  # take no chances and rewrite it.
13798  # Note: m4 eats our [], so we need to use [ and ] instead.
13799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13800  if test "x$has_forbidden_chars" != x; then
13801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13805      # Going to short mode and back again did indeed matter. Since short mode is
13806      # case insensitive, let's make it lowercase to improve readability.
13807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13808      # Now convert it back to Unix-stile (cygpath)
13809      input_path=`$CYGPATH -u "$shortmode_path"`
13810      new_path="$input_path"
13811    fi
13812  fi
13813
13814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13815  if test "x$test_cygdrive_prefix" = x; then
13816    # As a simple fix, exclude /usr/bin since it's not a real path.
13817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13819      # a path prefixed by /cygdrive for fixpath to work.
13820      new_path="$CYGWIN_ROOT_PATH$input_path"
13821    fi
13822  fi
13823
13824
13825  if test "x$path" != "x$new_path"; then
13826    BOOT_JDK="$new_path"
13827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13828$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13829  fi
13830
13831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13832
13833  path="$BOOT_JDK"
13834  has_colon=`$ECHO $path | $GREP ^.:`
13835  new_path="$path"
13836  if test "x$has_colon" = x; then
13837    # Not in mixed or Windows style, start by that.
13838    new_path=`cmd //c echo $path`
13839  fi
13840
13841
13842  input_path="$new_path"
13843  # Check if we need to convert this using DOS-style short mode. If the path
13844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13845  # take no chances and rewrite it.
13846  # Note: m4 eats our [], so we need to use [ and ] instead.
13847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13848  if test "x$has_forbidden_chars" != x; then
13849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13851  fi
13852
13853
13854  windows_path="$new_path"
13855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13856    unix_path=`$CYGPATH -u "$windows_path"`
13857    new_path="$unix_path"
13858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13860    new_path="$unix_path"
13861  fi
13862
13863  if test "x$path" != "x$new_path"; then
13864    BOOT_JDK="$new_path"
13865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13867  fi
13868
13869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13871
13872  else
13873    # We're on a posix platform. Hooray! :)
13874    path="$BOOT_JDK"
13875
13876    if test ! -f "$path" && test ! -d "$path"; then
13877      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13878    fi
13879
13880    has_space=`$ECHO "$path" | $GREP " "`
13881    if test "x$has_space" != x; then
13882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13884      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13885    fi
13886  fi
13887
13888              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13889$as_echo_n "checking for Boot JDK... " >&6; }
13890              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13891$as_echo "$BOOT_JDK" >&6; }
13892              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13893$as_echo_n "checking Boot JDK version... " >&6; }
13894              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13895              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13896$as_echo "$BOOT_JDK_VERSION" >&6; }
13897            fi # end check jdk version
13898          fi # end check rt.jar
13899        fi # end check javac
13900      fi # end check java
13901    fi # end check boot jdk found
13902  fi
13903
13904    done
13905  fi
13906
13907
13908    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13909    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13910      # Do we have a bin/java?
13911      if test ! -x "$BOOT_JDK/bin/java"; then
13912        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13913$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13914        BOOT_JDK_FOUND=no
13915      else
13916        # Do we have a bin/javac?
13917        if test ! -x "$BOOT_JDK/bin/javac"; then
13918          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13920          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13921$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13922          BOOT_JDK_FOUND=no
13923        else
13924          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13925          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13926            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13928            BOOT_JDK_FOUND=no
13929          else
13930            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13931            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13932
13933            # Extra M4 quote needed to protect [] in grep expression.
13934            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13935            if test "x$FOUND_VERSION_78" = x; then
13936              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13938              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13939$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13940              BOOT_JDK_FOUND=no
13941            else
13942              # We're done! :-)
13943              BOOT_JDK_FOUND=yes
13944
13945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13946
13947  # Input might be given as Windows format, start by converting to
13948  # unix format.
13949  path="$BOOT_JDK"
13950  new_path=`$CYGPATH -u "$path"`
13951
13952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13955  # "foo.exe" is OK but "foo" is an error.
13956  #
13957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13958  # It is also a way to make sure we got the proper file name for the real test later on.
13959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13960  if test "x$test_shortpath" = x; then
13961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13962$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13963    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13964  fi
13965
13966  # Call helper function which possibly converts this using DOS-style short mode.
13967  # If so, the updated path is stored in $new_path.
13968
13969  input_path="$new_path"
13970  # Check if we need to convert this using DOS-style short mode. If the path
13971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13972  # take no chances and rewrite it.
13973  # Note: m4 eats our [], so we need to use [ and ] instead.
13974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13975  if test "x$has_forbidden_chars" != x; then
13976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13980      # Going to short mode and back again did indeed matter. Since short mode is
13981      # case insensitive, let's make it lowercase to improve readability.
13982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13983      # Now convert it back to Unix-stile (cygpath)
13984      input_path=`$CYGPATH -u "$shortmode_path"`
13985      new_path="$input_path"
13986    fi
13987  fi
13988
13989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13990  if test "x$test_cygdrive_prefix" = x; then
13991    # As a simple fix, exclude /usr/bin since it's not a real path.
13992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13994      # a path prefixed by /cygdrive for fixpath to work.
13995      new_path="$CYGWIN_ROOT_PATH$input_path"
13996    fi
13997  fi
13998
13999
14000  if test "x$path" != "x$new_path"; then
14001    BOOT_JDK="$new_path"
14002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14004  fi
14005
14006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14007
14008  path="$BOOT_JDK"
14009  has_colon=`$ECHO $path | $GREP ^.:`
14010  new_path="$path"
14011  if test "x$has_colon" = x; then
14012    # Not in mixed or Windows style, start by that.
14013    new_path=`cmd //c echo $path`
14014  fi
14015
14016
14017  input_path="$new_path"
14018  # Check if we need to convert this using DOS-style short mode. If the path
14019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14020  # take no chances and rewrite it.
14021  # Note: m4 eats our [], so we need to use [ and ] instead.
14022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14023  if test "x$has_forbidden_chars" != x; then
14024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14026  fi
14027
14028
14029  windows_path="$new_path"
14030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14031    unix_path=`$CYGPATH -u "$windows_path"`
14032    new_path="$unix_path"
14033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14035    new_path="$unix_path"
14036  fi
14037
14038  if test "x$path" != "x$new_path"; then
14039    BOOT_JDK="$new_path"
14040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14042  fi
14043
14044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14046
14047  else
14048    # We're on a posix platform. Hooray! :)
14049    path="$BOOT_JDK"
14050
14051    if test ! -f "$path" && test ! -d "$path"; then
14052      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14053    fi
14054
14055    has_space=`$ECHO "$path" | $GREP " "`
14056    if test "x$has_space" != x; then
14057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14059      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14060    fi
14061  fi
14062
14063              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14064$as_echo_n "checking for Boot JDK... " >&6; }
14065              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14066$as_echo "$BOOT_JDK" >&6; }
14067              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14068$as_echo_n "checking Boot JDK version... " >&6; }
14069              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14070              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14071$as_echo "$BOOT_JDK_VERSION" >&6; }
14072            fi # end check jdk version
14073          fi # end check rt.jar
14074        fi # end check javac
14075      fi # end check java
14076    fi # end check boot jdk found
14077  fi
14078
14079  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14080
14081  if test "x$BOOT_JDK_FOUND" = xno; then
14082    # Now execute the test
14083
14084  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14085  BOOT_JDK_SUFFIX="/Contents/Home"
14086  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14087  if test "x$ALL_JDKS_FOUND" != x; then
14088    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14089
14090  if test "x$BOOT_JDK_FOUND" = xno; then
14091    # Now execute the test
14092
14093        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14094        if test -d "$BOOT_JDK"; then
14095          BOOT_JDK_FOUND=maybe
14096          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14097$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14098        fi
14099
14100
14101    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14102    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14103      # Do we have a bin/java?
14104      if test ! -x "$BOOT_JDK/bin/java"; then
14105        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14107        BOOT_JDK_FOUND=no
14108      else
14109        # Do we have a bin/javac?
14110        if test ! -x "$BOOT_JDK/bin/javac"; then
14111          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14113          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14114$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14115          BOOT_JDK_FOUND=no
14116        else
14117          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14118          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14119            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14121            BOOT_JDK_FOUND=no
14122          else
14123            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14124            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14125
14126            # Extra M4 quote needed to protect [] in grep expression.
14127            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14128            if test "x$FOUND_VERSION_78" = x; then
14129              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14131              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14132$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14133              BOOT_JDK_FOUND=no
14134            else
14135              # We're done! :-)
14136              BOOT_JDK_FOUND=yes
14137
14138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14139
14140  # Input might be given as Windows format, start by converting to
14141  # unix format.
14142  path="$BOOT_JDK"
14143  new_path=`$CYGPATH -u "$path"`
14144
14145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14148  # "foo.exe" is OK but "foo" is an error.
14149  #
14150  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14151  # It is also a way to make sure we got the proper file name for the real test later on.
14152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14153  if test "x$test_shortpath" = x; then
14154    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14156    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14157  fi
14158
14159  # Call helper function which possibly converts this using DOS-style short mode.
14160  # If so, the updated path is stored in $new_path.
14161
14162  input_path="$new_path"
14163  # Check if we need to convert this using DOS-style short mode. If the path
14164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14165  # take no chances and rewrite it.
14166  # Note: m4 eats our [], so we need to use [ and ] instead.
14167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14168  if test "x$has_forbidden_chars" != x; then
14169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14173      # Going to short mode and back again did indeed matter. Since short mode is
14174      # case insensitive, let's make it lowercase to improve readability.
14175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14176      # Now convert it back to Unix-stile (cygpath)
14177      input_path=`$CYGPATH -u "$shortmode_path"`
14178      new_path="$input_path"
14179    fi
14180  fi
14181
14182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14183  if test "x$test_cygdrive_prefix" = x; then
14184    # As a simple fix, exclude /usr/bin since it's not a real path.
14185    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14187      # a path prefixed by /cygdrive for fixpath to work.
14188      new_path="$CYGWIN_ROOT_PATH$input_path"
14189    fi
14190  fi
14191
14192
14193  if test "x$path" != "x$new_path"; then
14194    BOOT_JDK="$new_path"
14195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14197  fi
14198
14199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14200
14201  path="$BOOT_JDK"
14202  has_colon=`$ECHO $path | $GREP ^.:`
14203  new_path="$path"
14204  if test "x$has_colon" = x; then
14205    # Not in mixed or Windows style, start by that.
14206    new_path=`cmd //c echo $path`
14207  fi
14208
14209
14210  input_path="$new_path"
14211  # Check if we need to convert this using DOS-style short mode. If the path
14212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14213  # take no chances and rewrite it.
14214  # Note: m4 eats our [], so we need to use [ and ] instead.
14215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14216  if test "x$has_forbidden_chars" != x; then
14217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14219  fi
14220
14221
14222  windows_path="$new_path"
14223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14224    unix_path=`$CYGPATH -u "$windows_path"`
14225    new_path="$unix_path"
14226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14228    new_path="$unix_path"
14229  fi
14230
14231  if test "x$path" != "x$new_path"; then
14232    BOOT_JDK="$new_path"
14233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14235  fi
14236
14237  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14238  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14239
14240  else
14241    # We're on a posix platform. Hooray! :)
14242    path="$BOOT_JDK"
14243
14244    if test ! -f "$path" && test ! -d "$path"; then
14245      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14246    fi
14247
14248    has_space=`$ECHO "$path" | $GREP " "`
14249    if test "x$has_space" != x; then
14250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14252      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14253    fi
14254  fi
14255
14256              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14257$as_echo_n "checking for Boot JDK... " >&6; }
14258              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14259$as_echo "$BOOT_JDK" >&6; }
14260              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14261$as_echo_n "checking Boot JDK version... " >&6; }
14262              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14263              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14264$as_echo "$BOOT_JDK_VERSION" >&6; }
14265            fi # end check jdk version
14266          fi # end check rt.jar
14267        fi # end check javac
14268      fi # end check java
14269    fi # end check boot jdk found
14270  fi
14271
14272    done
14273  fi
14274
14275
14276    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14277    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14278      # Do we have a bin/java?
14279      if test ! -x "$BOOT_JDK/bin/java"; then
14280        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14282        BOOT_JDK_FOUND=no
14283      else
14284        # Do we have a bin/javac?
14285        if test ! -x "$BOOT_JDK/bin/javac"; then
14286          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14288          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14289$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14290          BOOT_JDK_FOUND=no
14291        else
14292          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14293          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14294            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14296            BOOT_JDK_FOUND=no
14297          else
14298            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14299            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14300
14301            # Extra M4 quote needed to protect [] in grep expression.
14302            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14303            if test "x$FOUND_VERSION_78" = x; then
14304              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14306              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14307$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14308              BOOT_JDK_FOUND=no
14309            else
14310              # We're done! :-)
14311              BOOT_JDK_FOUND=yes
14312
14313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14314
14315  # Input might be given as Windows format, start by converting to
14316  # unix format.
14317  path="$BOOT_JDK"
14318  new_path=`$CYGPATH -u "$path"`
14319
14320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14323  # "foo.exe" is OK but "foo" is an error.
14324  #
14325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14326  # It is also a way to make sure we got the proper file name for the real test later on.
14327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14328  if test "x$test_shortpath" = x; then
14329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14330$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14331    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14332  fi
14333
14334  # Call helper function which possibly converts this using DOS-style short mode.
14335  # If so, the updated path is stored in $new_path.
14336
14337  input_path="$new_path"
14338  # Check if we need to convert this using DOS-style short mode. If the path
14339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14340  # take no chances and rewrite it.
14341  # Note: m4 eats our [], so we need to use [ and ] instead.
14342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14343  if test "x$has_forbidden_chars" != x; then
14344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14348      # Going to short mode and back again did indeed matter. Since short mode is
14349      # case insensitive, let's make it lowercase to improve readability.
14350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14351      # Now convert it back to Unix-stile (cygpath)
14352      input_path=`$CYGPATH -u "$shortmode_path"`
14353      new_path="$input_path"
14354    fi
14355  fi
14356
14357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14358  if test "x$test_cygdrive_prefix" = x; then
14359    # As a simple fix, exclude /usr/bin since it's not a real path.
14360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14362      # a path prefixed by /cygdrive for fixpath to work.
14363      new_path="$CYGWIN_ROOT_PATH$input_path"
14364    fi
14365  fi
14366
14367
14368  if test "x$path" != "x$new_path"; then
14369    BOOT_JDK="$new_path"
14370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14371$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14372  fi
14373
14374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14375
14376  path="$BOOT_JDK"
14377  has_colon=`$ECHO $path | $GREP ^.:`
14378  new_path="$path"
14379  if test "x$has_colon" = x; then
14380    # Not in mixed or Windows style, start by that.
14381    new_path=`cmd //c echo $path`
14382  fi
14383
14384
14385  input_path="$new_path"
14386  # Check if we need to convert this using DOS-style short mode. If the path
14387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14388  # take no chances and rewrite it.
14389  # Note: m4 eats our [], so we need to use [ and ] instead.
14390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14391  if test "x$has_forbidden_chars" != x; then
14392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14394  fi
14395
14396
14397  windows_path="$new_path"
14398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14399    unix_path=`$CYGPATH -u "$windows_path"`
14400    new_path="$unix_path"
14401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14403    new_path="$unix_path"
14404  fi
14405
14406  if test "x$path" != "x$new_path"; then
14407    BOOT_JDK="$new_path"
14408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14409$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14410  fi
14411
14412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14414
14415  else
14416    # We're on a posix platform. Hooray! :)
14417    path="$BOOT_JDK"
14418
14419    if test ! -f "$path" && test ! -d "$path"; then
14420      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14421    fi
14422
14423    has_space=`$ECHO "$path" | $GREP " "`
14424    if test "x$has_space" != x; then
14425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14427      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14428    fi
14429  fi
14430
14431              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14432$as_echo_n "checking for Boot JDK... " >&6; }
14433              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14434$as_echo "$BOOT_JDK" >&6; }
14435              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14436$as_echo_n "checking Boot JDK version... " >&6; }
14437              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14438              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14439$as_echo "$BOOT_JDK_VERSION" >&6; }
14440            fi # end check jdk version
14441          fi # end check rt.jar
14442        fi # end check javac
14443      fi # end check java
14444    fi # end check boot jdk found
14445  fi
14446
14447
14448  if test "x$BOOT_JDK_FOUND" = xno; then
14449    # Now execute the test
14450
14451  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14452  BOOT_JDK_SUFFIX="/Contents/Home"
14453  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14454  if test "x$ALL_JDKS_FOUND" != x; then
14455    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14456
14457  if test "x$BOOT_JDK_FOUND" = xno; then
14458    # Now execute the test
14459
14460        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14461        if test -d "$BOOT_JDK"; then
14462          BOOT_JDK_FOUND=maybe
14463          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14464$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14465        fi
14466
14467
14468    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14469    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14470      # Do we have a bin/java?
14471      if test ! -x "$BOOT_JDK/bin/java"; then
14472        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14474        BOOT_JDK_FOUND=no
14475      else
14476        # Do we have a bin/javac?
14477        if test ! -x "$BOOT_JDK/bin/javac"; then
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14480          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14481$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14482          BOOT_JDK_FOUND=no
14483        else
14484          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14485          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14486            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14488            BOOT_JDK_FOUND=no
14489          else
14490            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14491            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14492
14493            # Extra M4 quote needed to protect [] in grep expression.
14494            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14495            if test "x$FOUND_VERSION_78" = x; then
14496              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14498              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14499$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14500              BOOT_JDK_FOUND=no
14501            else
14502              # We're done! :-)
14503              BOOT_JDK_FOUND=yes
14504
14505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14506
14507  # Input might be given as Windows format, start by converting to
14508  # unix format.
14509  path="$BOOT_JDK"
14510  new_path=`$CYGPATH -u "$path"`
14511
14512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14515  # "foo.exe" is OK but "foo" is an error.
14516  #
14517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14518  # It is also a way to make sure we got the proper file name for the real test later on.
14519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14520  if test "x$test_shortpath" = x; then
14521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14522$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14523    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14524  fi
14525
14526  # Call helper function which possibly converts this using DOS-style short mode.
14527  # If so, the updated path is stored in $new_path.
14528
14529  input_path="$new_path"
14530  # Check if we need to convert this using DOS-style short mode. If the path
14531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14532  # take no chances and rewrite it.
14533  # Note: m4 eats our [], so we need to use [ and ] instead.
14534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14535  if test "x$has_forbidden_chars" != x; then
14536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14540      # Going to short mode and back again did indeed matter. Since short mode is
14541      # case insensitive, let's make it lowercase to improve readability.
14542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14543      # Now convert it back to Unix-stile (cygpath)
14544      input_path=`$CYGPATH -u "$shortmode_path"`
14545      new_path="$input_path"
14546    fi
14547  fi
14548
14549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14550  if test "x$test_cygdrive_prefix" = x; then
14551    # As a simple fix, exclude /usr/bin since it's not a real path.
14552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14554      # a path prefixed by /cygdrive for fixpath to work.
14555      new_path="$CYGWIN_ROOT_PATH$input_path"
14556    fi
14557  fi
14558
14559
14560  if test "x$path" != "x$new_path"; then
14561    BOOT_JDK="$new_path"
14562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14563$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14564  fi
14565
14566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14567
14568  path="$BOOT_JDK"
14569  has_colon=`$ECHO $path | $GREP ^.:`
14570  new_path="$path"
14571  if test "x$has_colon" = x; then
14572    # Not in mixed or Windows style, start by that.
14573    new_path=`cmd //c echo $path`
14574  fi
14575
14576
14577  input_path="$new_path"
14578  # Check if we need to convert this using DOS-style short mode. If the path
14579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14580  # take no chances and rewrite it.
14581  # Note: m4 eats our [], so we need to use [ and ] instead.
14582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14583  if test "x$has_forbidden_chars" != x; then
14584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14586  fi
14587
14588
14589  windows_path="$new_path"
14590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14591    unix_path=`$CYGPATH -u "$windows_path"`
14592    new_path="$unix_path"
14593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14595    new_path="$unix_path"
14596  fi
14597
14598  if test "x$path" != "x$new_path"; then
14599    BOOT_JDK="$new_path"
14600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14602  fi
14603
14604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14606
14607  else
14608    # We're on a posix platform. Hooray! :)
14609    path="$BOOT_JDK"
14610
14611    if test ! -f "$path" && test ! -d "$path"; then
14612      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14613    fi
14614
14615    has_space=`$ECHO "$path" | $GREP " "`
14616    if test "x$has_space" != x; then
14617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14619      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14620    fi
14621  fi
14622
14623              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14624$as_echo_n "checking for Boot JDK... " >&6; }
14625              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14626$as_echo "$BOOT_JDK" >&6; }
14627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14628$as_echo_n "checking Boot JDK version... " >&6; }
14629              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14630              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14631$as_echo "$BOOT_JDK_VERSION" >&6; }
14632            fi # end check jdk version
14633          fi # end check rt.jar
14634        fi # end check javac
14635      fi # end check java
14636    fi # end check boot jdk found
14637  fi
14638
14639    done
14640  fi
14641
14642
14643    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14644    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14645      # Do we have a bin/java?
14646      if test ! -x "$BOOT_JDK/bin/java"; then
14647        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14649        BOOT_JDK_FOUND=no
14650      else
14651        # Do we have a bin/javac?
14652        if test ! -x "$BOOT_JDK/bin/javac"; then
14653          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14655          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14656$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14657          BOOT_JDK_FOUND=no
14658        else
14659          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14660          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14661            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14663            BOOT_JDK_FOUND=no
14664          else
14665            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14666            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14667
14668            # Extra M4 quote needed to protect [] in grep expression.
14669            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14670            if test "x$FOUND_VERSION_78" = x; then
14671              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14672$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14673              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14674$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14675              BOOT_JDK_FOUND=no
14676            else
14677              # We're done! :-)
14678              BOOT_JDK_FOUND=yes
14679
14680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14681
14682  # Input might be given as Windows format, start by converting to
14683  # unix format.
14684  path="$BOOT_JDK"
14685  new_path=`$CYGPATH -u "$path"`
14686
14687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14690  # "foo.exe" is OK but "foo" is an error.
14691  #
14692  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14693  # It is also a way to make sure we got the proper file name for the real test later on.
14694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14695  if test "x$test_shortpath" = x; then
14696    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14698    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14699  fi
14700
14701  # Call helper function which possibly converts this using DOS-style short mode.
14702  # If so, the updated path is stored in $new_path.
14703
14704  input_path="$new_path"
14705  # Check if we need to convert this using DOS-style short mode. If the path
14706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14707  # take no chances and rewrite it.
14708  # Note: m4 eats our [], so we need to use [ and ] instead.
14709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14710  if test "x$has_forbidden_chars" != x; then
14711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14715      # Going to short mode and back again did indeed matter. Since short mode is
14716      # case insensitive, let's make it lowercase to improve readability.
14717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14718      # Now convert it back to Unix-stile (cygpath)
14719      input_path=`$CYGPATH -u "$shortmode_path"`
14720      new_path="$input_path"
14721    fi
14722  fi
14723
14724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14725  if test "x$test_cygdrive_prefix" = x; then
14726    # As a simple fix, exclude /usr/bin since it's not a real path.
14727    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14729      # a path prefixed by /cygdrive for fixpath to work.
14730      new_path="$CYGWIN_ROOT_PATH$input_path"
14731    fi
14732  fi
14733
14734
14735  if test "x$path" != "x$new_path"; then
14736    BOOT_JDK="$new_path"
14737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14738$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14739  fi
14740
14741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14742
14743  path="$BOOT_JDK"
14744  has_colon=`$ECHO $path | $GREP ^.:`
14745  new_path="$path"
14746  if test "x$has_colon" = x; then
14747    # Not in mixed or Windows style, start by that.
14748    new_path=`cmd //c echo $path`
14749  fi
14750
14751
14752  input_path="$new_path"
14753  # Check if we need to convert this using DOS-style short mode. If the path
14754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14755  # take no chances and rewrite it.
14756  # Note: m4 eats our [], so we need to use [ and ] instead.
14757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14758  if test "x$has_forbidden_chars" != x; then
14759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14761  fi
14762
14763
14764  windows_path="$new_path"
14765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14766    unix_path=`$CYGPATH -u "$windows_path"`
14767    new_path="$unix_path"
14768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14770    new_path="$unix_path"
14771  fi
14772
14773  if test "x$path" != "x$new_path"; then
14774    BOOT_JDK="$new_path"
14775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14776$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14777  fi
14778
14779  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14780  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14781
14782  else
14783    # We're on a posix platform. Hooray! :)
14784    path="$BOOT_JDK"
14785
14786    if test ! -f "$path" && test ! -d "$path"; then
14787      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14788    fi
14789
14790    has_space=`$ECHO "$path" | $GREP " "`
14791    if test "x$has_space" != x; then
14792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14794      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14795    fi
14796  fi
14797
14798              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14799$as_echo_n "checking for Boot JDK... " >&6; }
14800              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14801$as_echo "$BOOT_JDK" >&6; }
14802              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14803$as_echo_n "checking Boot JDK version... " >&6; }
14804              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14805              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14806$as_echo "$BOOT_JDK_VERSION" >&6; }
14807            fi # end check jdk version
14808          fi # end check rt.jar
14809        fi # end check javac
14810      fi # end check java
14811    fi # end check boot jdk found
14812  fi
14813
14814  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14815
14816  if test "x$BOOT_JDK_FOUND" = xno; then
14817    # Now execute the test
14818
14819  BOOT_JDK_PREFIX="/usr/lib/jvm"
14820  BOOT_JDK_SUFFIX=""
14821  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14822  if test "x$ALL_JDKS_FOUND" != x; then
14823    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14824
14825  if test "x$BOOT_JDK_FOUND" = xno; then
14826    # Now execute the test
14827
14828        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14829        if test -d "$BOOT_JDK"; then
14830          BOOT_JDK_FOUND=maybe
14831          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14832$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14833        fi
14834
14835
14836    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14837    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14838      # Do we have a bin/java?
14839      if test ! -x "$BOOT_JDK/bin/java"; then
14840        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14842        BOOT_JDK_FOUND=no
14843      else
14844        # Do we have a bin/javac?
14845        if test ! -x "$BOOT_JDK/bin/javac"; then
14846          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14848          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14849$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14850          BOOT_JDK_FOUND=no
14851        else
14852          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14853          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14854            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14856            BOOT_JDK_FOUND=no
14857          else
14858            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14859            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14860
14861            # Extra M4 quote needed to protect [] in grep expression.
14862            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14863            if test "x$FOUND_VERSION_78" = x; then
14864              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14866              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14867$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14868              BOOT_JDK_FOUND=no
14869            else
14870              # We're done! :-)
14871              BOOT_JDK_FOUND=yes
14872
14873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14874
14875  # Input might be given as Windows format, start by converting to
14876  # unix format.
14877  path="$BOOT_JDK"
14878  new_path=`$CYGPATH -u "$path"`
14879
14880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14883  # "foo.exe" is OK but "foo" is an error.
14884  #
14885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14886  # It is also a way to make sure we got the proper file name for the real test later on.
14887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14888  if test "x$test_shortpath" = x; then
14889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14890$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14891    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14892  fi
14893
14894  # Call helper function which possibly converts this using DOS-style short mode.
14895  # If so, the updated path is stored in $new_path.
14896
14897  input_path="$new_path"
14898  # Check if we need to convert this using DOS-style short mode. If the path
14899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14900  # take no chances and rewrite it.
14901  # Note: m4 eats our [], so we need to use [ and ] instead.
14902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14903  if test "x$has_forbidden_chars" != x; then
14904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14908      # Going to short mode and back again did indeed matter. Since short mode is
14909      # case insensitive, let's make it lowercase to improve readability.
14910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14911      # Now convert it back to Unix-stile (cygpath)
14912      input_path=`$CYGPATH -u "$shortmode_path"`
14913      new_path="$input_path"
14914    fi
14915  fi
14916
14917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14918  if test "x$test_cygdrive_prefix" = x; then
14919    # As a simple fix, exclude /usr/bin since it's not a real path.
14920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14922      # a path prefixed by /cygdrive for fixpath to work.
14923      new_path="$CYGWIN_ROOT_PATH$input_path"
14924    fi
14925  fi
14926
14927
14928  if test "x$path" != "x$new_path"; then
14929    BOOT_JDK="$new_path"
14930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14932  fi
14933
14934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14935
14936  path="$BOOT_JDK"
14937  has_colon=`$ECHO $path | $GREP ^.:`
14938  new_path="$path"
14939  if test "x$has_colon" = x; then
14940    # Not in mixed or Windows style, start by that.
14941    new_path=`cmd //c echo $path`
14942  fi
14943
14944
14945  input_path="$new_path"
14946  # Check if we need to convert this using DOS-style short mode. If the path
14947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14948  # take no chances and rewrite it.
14949  # Note: m4 eats our [], so we need to use [ and ] instead.
14950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14951  if test "x$has_forbidden_chars" != x; then
14952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14954  fi
14955
14956
14957  windows_path="$new_path"
14958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14959    unix_path=`$CYGPATH -u "$windows_path"`
14960    new_path="$unix_path"
14961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14963    new_path="$unix_path"
14964  fi
14965
14966  if test "x$path" != "x$new_path"; then
14967    BOOT_JDK="$new_path"
14968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14970  fi
14971
14972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14974
14975  else
14976    # We're on a posix platform. Hooray! :)
14977    path="$BOOT_JDK"
14978
14979    if test ! -f "$path" && test ! -d "$path"; then
14980      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14981    fi
14982
14983    has_space=`$ECHO "$path" | $GREP " "`
14984    if test "x$has_space" != x; then
14985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14986$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14987      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14988    fi
14989  fi
14990
14991              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14992$as_echo_n "checking for Boot JDK... " >&6; }
14993              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14994$as_echo "$BOOT_JDK" >&6; }
14995              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14996$as_echo_n "checking Boot JDK version... " >&6; }
14997              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14998              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14999$as_echo "$BOOT_JDK_VERSION" >&6; }
15000            fi # end check jdk version
15001          fi # end check rt.jar
15002        fi # end check javac
15003      fi # end check java
15004    fi # end check boot jdk found
15005  fi
15006
15007    done
15008  fi
15009
15010
15011    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15012    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15013      # Do we have a bin/java?
15014      if test ! -x "$BOOT_JDK/bin/java"; then
15015        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15017        BOOT_JDK_FOUND=no
15018      else
15019        # Do we have a bin/javac?
15020        if test ! -x "$BOOT_JDK/bin/javac"; then
15021          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15023          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15024$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15025          BOOT_JDK_FOUND=no
15026        else
15027          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15028          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15029            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15031            BOOT_JDK_FOUND=no
15032          else
15033            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15034            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15035
15036            # Extra M4 quote needed to protect [] in grep expression.
15037            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15038            if test "x$FOUND_VERSION_78" = x; then
15039              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15041              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15042$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15043              BOOT_JDK_FOUND=no
15044            else
15045              # We're done! :-)
15046              BOOT_JDK_FOUND=yes
15047
15048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15049
15050  # Input might be given as Windows format, start by converting to
15051  # unix format.
15052  path="$BOOT_JDK"
15053  new_path=`$CYGPATH -u "$path"`
15054
15055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15058  # "foo.exe" is OK but "foo" is an error.
15059  #
15060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15061  # It is also a way to make sure we got the proper file name for the real test later on.
15062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15063  if test "x$test_shortpath" = x; then
15064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15065$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15066    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15067  fi
15068
15069  # Call helper function which possibly converts this using DOS-style short mode.
15070  # If so, the updated path is stored in $new_path.
15071
15072  input_path="$new_path"
15073  # Check if we need to convert this using DOS-style short mode. If the path
15074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15075  # take no chances and rewrite it.
15076  # Note: m4 eats our [], so we need to use [ and ] instead.
15077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15078  if test "x$has_forbidden_chars" != x; then
15079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15083      # Going to short mode and back again did indeed matter. Since short mode is
15084      # case insensitive, let's make it lowercase to improve readability.
15085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15086      # Now convert it back to Unix-stile (cygpath)
15087      input_path=`$CYGPATH -u "$shortmode_path"`
15088      new_path="$input_path"
15089    fi
15090  fi
15091
15092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15093  if test "x$test_cygdrive_prefix" = x; then
15094    # As a simple fix, exclude /usr/bin since it's not a real path.
15095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15097      # a path prefixed by /cygdrive for fixpath to work.
15098      new_path="$CYGWIN_ROOT_PATH$input_path"
15099    fi
15100  fi
15101
15102
15103  if test "x$path" != "x$new_path"; then
15104    BOOT_JDK="$new_path"
15105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15107  fi
15108
15109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15110
15111  path="$BOOT_JDK"
15112  has_colon=`$ECHO $path | $GREP ^.:`
15113  new_path="$path"
15114  if test "x$has_colon" = x; then
15115    # Not in mixed or Windows style, start by that.
15116    new_path=`cmd //c echo $path`
15117  fi
15118
15119
15120  input_path="$new_path"
15121  # Check if we need to convert this using DOS-style short mode. If the path
15122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15123  # take no chances and rewrite it.
15124  # Note: m4 eats our [], so we need to use [ and ] instead.
15125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15126  if test "x$has_forbidden_chars" != x; then
15127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15129  fi
15130
15131
15132  windows_path="$new_path"
15133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15134    unix_path=`$CYGPATH -u "$windows_path"`
15135    new_path="$unix_path"
15136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15138    new_path="$unix_path"
15139  fi
15140
15141  if test "x$path" != "x$new_path"; then
15142    BOOT_JDK="$new_path"
15143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15144$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15145  fi
15146
15147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15149
15150  else
15151    # We're on a posix platform. Hooray! :)
15152    path="$BOOT_JDK"
15153
15154    if test ! -f "$path" && test ! -d "$path"; then
15155      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15156    fi
15157
15158    has_space=`$ECHO "$path" | $GREP " "`
15159    if test "x$has_space" != x; then
15160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15161$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15162      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15163    fi
15164  fi
15165
15166              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15167$as_echo_n "checking for Boot JDK... " >&6; }
15168              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15169$as_echo "$BOOT_JDK" >&6; }
15170              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15171$as_echo_n "checking Boot JDK version... " >&6; }
15172              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15173              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15174$as_echo "$BOOT_JDK_VERSION" >&6; }
15175            fi # end check jdk version
15176          fi # end check rt.jar
15177        fi # end check javac
15178      fi # end check java
15179    fi # end check boot jdk found
15180  fi
15181
15182  fi
15183
15184
15185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15187      # Do we have a bin/java?
15188      if test ! -x "$BOOT_JDK/bin/java"; then
15189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15191        BOOT_JDK_FOUND=no
15192      else
15193        # Do we have a bin/javac?
15194        if test ! -x "$BOOT_JDK/bin/javac"; then
15195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15199          BOOT_JDK_FOUND=no
15200        else
15201          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15202          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15205            BOOT_JDK_FOUND=no
15206          else
15207            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15208            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15209
15210            # Extra M4 quote needed to protect [] in grep expression.
15211            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15212            if test "x$FOUND_VERSION_78" = x; then
15213              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15215              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15216$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15217              BOOT_JDK_FOUND=no
15218            else
15219              # We're done! :-)
15220              BOOT_JDK_FOUND=yes
15221
15222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15223
15224  # Input might be given as Windows format, start by converting to
15225  # unix format.
15226  path="$BOOT_JDK"
15227  new_path=`$CYGPATH -u "$path"`
15228
15229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15232  # "foo.exe" is OK but "foo" is an error.
15233  #
15234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15235  # It is also a way to make sure we got the proper file name for the real test later on.
15236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15237  if test "x$test_shortpath" = x; then
15238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15240    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15241  fi
15242
15243  # Call helper function which possibly converts this using DOS-style short mode.
15244  # If so, the updated path is stored in $new_path.
15245
15246  input_path="$new_path"
15247  # Check if we need to convert this using DOS-style short mode. If the path
15248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15249  # take no chances and rewrite it.
15250  # Note: m4 eats our [], so we need to use [ and ] instead.
15251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15252  if test "x$has_forbidden_chars" != x; then
15253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15257      # Going to short mode and back again did indeed matter. Since short mode is
15258      # case insensitive, let's make it lowercase to improve readability.
15259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15260      # Now convert it back to Unix-stile (cygpath)
15261      input_path=`$CYGPATH -u "$shortmode_path"`
15262      new_path="$input_path"
15263    fi
15264  fi
15265
15266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15267  if test "x$test_cygdrive_prefix" = x; then
15268    # As a simple fix, exclude /usr/bin since it's not a real path.
15269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15271      # a path prefixed by /cygdrive for fixpath to work.
15272      new_path="$CYGWIN_ROOT_PATH$input_path"
15273    fi
15274  fi
15275
15276
15277  if test "x$path" != "x$new_path"; then
15278    BOOT_JDK="$new_path"
15279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15281  fi
15282
15283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15284
15285  path="$BOOT_JDK"
15286  has_colon=`$ECHO $path | $GREP ^.:`
15287  new_path="$path"
15288  if test "x$has_colon" = x; then
15289    # Not in mixed or Windows style, start by that.
15290    new_path=`cmd //c echo $path`
15291  fi
15292
15293
15294  input_path="$new_path"
15295  # Check if we need to convert this using DOS-style short mode. If the path
15296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15297  # take no chances and rewrite it.
15298  # Note: m4 eats our [], so we need to use [ and ] instead.
15299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15300  if test "x$has_forbidden_chars" != x; then
15301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15303  fi
15304
15305
15306  windows_path="$new_path"
15307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15308    unix_path=`$CYGPATH -u "$windows_path"`
15309    new_path="$unix_path"
15310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15312    new_path="$unix_path"
15313  fi
15314
15315  if test "x$path" != "x$new_path"; then
15316    BOOT_JDK="$new_path"
15317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15319  fi
15320
15321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15323
15324  else
15325    # We're on a posix platform. Hooray! :)
15326    path="$BOOT_JDK"
15327
15328    if test ! -f "$path" && test ! -d "$path"; then
15329      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15330    fi
15331
15332    has_space=`$ECHO "$path" | $GREP " "`
15333    if test "x$has_space" != x; then
15334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15336      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15337    fi
15338  fi
15339
15340              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15341$as_echo_n "checking for Boot JDK... " >&6; }
15342              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15343$as_echo "$BOOT_JDK" >&6; }
15344              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15345$as_echo_n "checking Boot JDK version... " >&6; }
15346              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15347              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15348$as_echo "$BOOT_JDK_VERSION" >&6; }
15349            fi # end check jdk version
15350          fi # end check rt.jar
15351        fi # end check javac
15352      fi # end check java
15353    fi # end check boot jdk found
15354  fi
15355
15356
15357# If we haven't found anything yet, we've truly lost. Give up.
15358if test "x$BOOT_JDK_FOUND" = xno; then
15359
15360    # Print a helpful message on how to acquire the necessary build dependency.
15361    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15362    MISSING_DEPENDENCY=openjdk
15363    PKGHANDLER_COMMAND=
15364
15365    case $PKGHANDLER in
15366	apt-get)
15367                apt_help     $MISSING_DEPENDENCY ;;
15368    yum)
15369                yum_help     $MISSING_DEPENDENCY ;;
15370	port)
15371                port_help    $MISSING_DEPENDENCY ;;
15372	pkgutil)
15373                pkgutil_help $MISSING_DEPENDENCY ;;
15374	pkgadd)
15375                pkgadd_help  $MISSING_DEPENDENCY ;;
15376    * )
15377      break ;;
15378    esac
15379
15380    if test "x$PKGHANDLER_COMMAND" != x; then
15381        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15382    fi
15383
15384  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15385$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15386  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15387$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15388  as_fn_error $? "Cannot continue" "$LINENO" 5
15389fi
15390
15391# Setup proper paths for what we found
15392BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15393if test ! -f "$BOOT_RTJAR"; then
15394    # On MacOSX it is called classes.jar
15395    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15396    if test -f "$BOOT_RTJAR"; then
15397      # Remove the ..
15398      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15399    fi
15400fi
15401BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15402BOOT_JDK="$BOOT_JDK"
15403
15404
15405
15406
15407# Setup tools from the Boot JDK.
15408
15409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15410$as_echo_n "checking for java in Boot JDK... " >&6; }
15411  JAVA=$BOOT_JDK/bin/java
15412  if test ! -x $JAVA; then
15413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15414$as_echo "not found" >&6; }
15415      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15416$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15417      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15418  fi
15419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15420$as_echo "ok" >&6; }
15421
15422
15423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15424$as_echo_n "checking for javac in Boot JDK... " >&6; }
15425  JAVAC=$BOOT_JDK/bin/javac
15426  if test ! -x $JAVAC; then
15427      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15428$as_echo "not found" >&6; }
15429      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15430$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15431      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15432  fi
15433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15434$as_echo "ok" >&6; }
15435
15436
15437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15438$as_echo_n "checking for javah in Boot JDK... " >&6; }
15439  JAVAH=$BOOT_JDK/bin/javah
15440  if test ! -x $JAVAH; then
15441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15442$as_echo "not found" >&6; }
15443      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15444$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15445      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15446  fi
15447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15448$as_echo "ok" >&6; }
15449
15450
15451  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15452$as_echo_n "checking for javap in Boot JDK... " >&6; }
15453  JAVAP=$BOOT_JDK/bin/javap
15454  if test ! -x $JAVAP; then
15455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15456$as_echo "not found" >&6; }
15457      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15458$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15459      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15460  fi
15461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15462$as_echo "ok" >&6; }
15463
15464
15465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15466$as_echo_n "checking for jar in Boot JDK... " >&6; }
15467  JAR=$BOOT_JDK/bin/jar
15468  if test ! -x $JAR; then
15469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15470$as_echo "not found" >&6; }
15471      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15472$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15473      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15474  fi
15475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15476$as_echo "ok" >&6; }
15477
15478
15479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15480$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15481  RMIC=$BOOT_JDK/bin/rmic
15482  if test ! -x $RMIC; then
15483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15484$as_echo "not found" >&6; }
15485      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15486$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15487      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15488  fi
15489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15490$as_echo "ok" >&6; }
15491
15492
15493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15494$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15495  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15496  if test ! -x $NATIVE2ASCII; then
15497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15498$as_echo "not found" >&6; }
15499      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15500$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15501      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15502  fi
15503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15504$as_echo "ok" >&6; }
15505
15506
15507# Finally, set some other options...
15508
15509# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15510BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15511
15512
15513
15514
15515##############################################################################
15516#
15517# Specify options for anything that is run with the Boot JDK.
15518#
15519
15520# Check whether --with-boot-jdk-jvmargs was given.
15521if test "${with_boot_jdk_jvmargs+set}" = set; then :
15522  withval=$with_boot_jdk_jvmargs;
15523fi
15524
15525
15526if test "x$with_boot_jdk_jvmargs" = x; then
15527    # Not all JVM:s accept the same arguments on the command line.
15528    # OpenJDK specific increase in thread stack for JDK build,
15529    # well more specifically, when running javac.
15530    if test "x$BUILD_NUM_BITS" = x32; then
15531       STACK_SIZE=768
15532    else
15533       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15534       # since 64-bit pointers are pushed on the stach. Apparently, we need
15535       # to increase the stack space when javacing the JDK....
15536       STACK_SIZE=1536
15537    fi
15538
15539    # Minimum amount of heap memory.
15540
15541    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15542    # If so, then append -Xms64M to boot_jdk_jvmargs
15543    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15544    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15545    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15546        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15547    fi
15548
15549    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15550        # Why does macosx need more heap? Its the huge JDK batch.
15551
15552    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15553    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15554    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15555    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15556    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15557        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15558    fi
15559
15560    else
15561
15562    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15563    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15564    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15565    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15566    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15567        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15568    fi
15569
15570    fi
15571    # When is adding -client something that speeds up the JVM?
15572    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15573
15574    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15575    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15576    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15577    FOUND_VERSION=`$JAVA -XX:PermSize=32m -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 -XX:PermSize=32m"
15580    fi
15581
15582
15583    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15584    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15585    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15586    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15587    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15588        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15589    fi
15590
15591
15592    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15593    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15594    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15595    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15596    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15597        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15598    fi
15599
15600    # Disable special log output when a debug build is used as Boot JDK...
15601
15602    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15603    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15604    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15605    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15606    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15607        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15608    fi
15609
15610fi
15611
15612BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15613
15614
15615
15616###############################################################################
15617#
15618# Configure the sources to use. We can add or override individual directories.
15619#
15620###############################################################################
15621
15622
15623
15624# Where are the sources. Any of these can be overridden
15625# using --with-override-corba and the likes.
15626LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15627CORBA_TOPDIR="$SRC_ROOT/corba"
15628JAXP_TOPDIR="$SRC_ROOT/jaxp"
15629JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15630HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15631NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15632JDK_TOPDIR="$SRC_ROOT/jdk"
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643###############################################################################
15644#
15645# Pickup additional source for a component from outside of the source root
15646# or override source for a component.
15647#
15648
15649# Check whether --with-add-source-root was given.
15650if test "${with_add_source_root+set}" = set; then :
15651  withval=$with_add_source_root;
15652fi
15653
15654
15655
15656# Check whether --with-override-source-root was given.
15657if test "${with_override_source_root+set}" = set; then :
15658  withval=$with_override_source_root;
15659fi
15660
15661
15662
15663# Check whether --with-adds-and-overrides was given.
15664if test "${with_adds_and_overrides+set}" = set; then :
15665  withval=$with_adds_and_overrides;
15666fi
15667
15668
15669if test "x$with_adds_and_overrides" != x; then
15670    with_add_source_root="$with_adds_and_overrides/adds"
15671    with_override_source_root="$with_adds_and_overrides/overrides"
15672fi
15673
15674if test "x$with_add_source_root" != x; then
15675    if ! test -d $with_add_source_root; then
15676       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15677    fi
15678    CURDIR="$PWD"
15679    cd "$with_add_source_root"
15680    ADD_SRC_ROOT="`pwd`"
15681    cd "$CURDIR"
15682    # Verify that the addon source root does not have any root makefiles.
15683    # If it does, then it is usually an error, prevent this.
15684    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15685       test -f $with_add_source_root/langtools/make/Makefile; then
15686        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
15687    fi
15688    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15689       test -f $with_add_source_root/corba/make/Makefile; then
15690        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
15691    fi
15692    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15693       test -f $with_add_source_root/jaxp/make/Makefile; then
15694        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
15695    fi
15696    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15697       test -f $with_add_source_root/jaxws/make/Makefile; then
15698        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
15699    fi
15700    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15701       test -f $with_add_source_root/hotspot/make/Makefile; then
15702        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
15703    fi
15704    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15705       test -f $with_add_source_root/jdk/make/Makefile; then
15706        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
15707    fi
15708fi
15709
15710
15711if test "x$with_override_source_root" != x; then
15712    if ! test -d $with_override_source_root; then
15713       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15714    fi
15715    CURDIR="$PWD"
15716    cd "$with_override_source_root"
15717    OVERRIDE_SRC_ROOT="`pwd`"
15718    cd "$CURDIR"
15719    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15720       test -f $with_override_source_root/langtools/make/Makefile; then
15721        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
15722    fi
15723    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15724       test -f $with_override_source_root/corba/make/Makefile; then
15725        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
15726    fi
15727    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15728       test -f $with_override_source_root/jaxp/make/Makefile; then
15729        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
15730    fi
15731    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15732       test -f $with_override_source_root/jaxws/make/Makefile; then
15733        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
15734    fi
15735    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15736       test -f $with_override_source_root/hotspot/make/Makefile; then
15737        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
15738    fi
15739    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15740       test -f $with_override_source_root/jdk/make/Makefile; then
15741        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
15742    fi
15743fi
15744
15745
15746###############################################################################
15747#
15748# Override a repo completely, this is used for example when you have 3 small
15749# development sandboxes of the langtools sources and want to avoid having 3 full
15750# OpenJDK sources checked out on disk.
15751#
15752# Assuming that the 3 langtools sandboxes are located here:
15753# /home/fredrik/sandbox1/langtools
15754# /home/fredrik/sandbox2/langtools
15755# /home/fredrik/sandbox3/langtools
15756#
15757# From the source root you create build subdirs manually:
15758#     mkdir -p build1 build2 build3
15759# in each build directory run:
15760#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15761#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15762#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15763#
15764
15765
15766# Check whether --with-override-langtools was given.
15767if test "${with_override_langtools+set}" = set; then :
15768  withval=$with_override_langtools;
15769fi
15770
15771
15772
15773# Check whether --with-override-corba was given.
15774if test "${with_override_corba+set}" = set; then :
15775  withval=$with_override_corba;
15776fi
15777
15778
15779
15780# Check whether --with-override-jaxp was given.
15781if test "${with_override_jaxp+set}" = set; then :
15782  withval=$with_override_jaxp;
15783fi
15784
15785
15786
15787# Check whether --with-override-jaxws was given.
15788if test "${with_override_jaxws+set}" = set; then :
15789  withval=$with_override_jaxws;
15790fi
15791
15792
15793
15794# Check whether --with-override-hotspot was given.
15795if test "${with_override_hotspot+set}" = set; then :
15796  withval=$with_override_hotspot;
15797fi
15798
15799
15800
15801# Check whether --with-override-jdk was given.
15802if test "${with_override_jdk+set}" = set; then :
15803  withval=$with_override_jdk;
15804fi
15805
15806
15807if test "x$with_override_langtools" != x; then
15808    CURDIR="$PWD"
15809    cd "$with_override_langtools"
15810    LANGTOOLS_TOPDIR="`pwd`"
15811    cd "$CURDIR"
15812    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15813        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15814    fi
15815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15816$as_echo_n "checking if langtools should be overridden... " >&6; }
15817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15818$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15819fi
15820if test "x$with_override_corba" != x; then
15821    CURDIR="$PWD"
15822    cd "$with_override_corba"
15823    CORBA_TOPDIR="`pwd`"
15824    cd "$CURDIR"
15825    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15826        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15827    fi
15828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15829$as_echo_n "checking if corba should be overridden... " >&6; }
15830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15831$as_echo "yes with $CORBA_TOPDIR" >&6; }
15832fi
15833if test "x$with_override_jaxp" != x; then
15834    CURDIR="$PWD"
15835    cd "$with_override_jaxp"
15836    JAXP_TOPDIR="`pwd`"
15837    cd "$CURDIR"
15838    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15839        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15840    fi
15841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15842$as_echo_n "checking if jaxp should be overridden... " >&6; }
15843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15844$as_echo "yes with $JAXP_TOPDIR" >&6; }
15845fi
15846if test "x$with_override_jaxws" != x; then
15847    CURDIR="$PWD"
15848    cd "$with_override_jaxws"
15849    JAXWS_TOPDIR="`pwd`"
15850    cd "$CURDIR"
15851    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15852        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15853    fi
15854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15855$as_echo_n "checking if jaxws should be overridden... " >&6; }
15856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15857$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15858fi
15859if test "x$with_override_hotspot" != x; then
15860    CURDIR="$PWD"
15861    cd "$with_override_hotspot"
15862    HOTSPOT_TOPDIR="`pwd`"
15863    cd "$CURDIR"
15864    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15865       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15866        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15867    fi
15868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15869$as_echo_n "checking if hotspot should be overridden... " >&6; }
15870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15871$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15872fi
15873if test "x$with_override_nashorn" != x; then
15874    CURDIR="$PWD"
15875    cd "$with_override_nashorn"
15876    NASHORN_TOPDIR="`pwd`"
15877    cd "$CURDIR"
15878    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15879        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15880    fi
15881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15882$as_echo_n "checking if nashorn should be overridden... " >&6; }
15883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15884$as_echo "yes with $NASHORN_TOPDIR" >&6; }
15885fi
15886if test "x$with_override_jdk" != x; then
15887    CURDIR="$PWD"
15888    cd "$with_override_jdk"
15889    JDK_TOPDIR="`pwd`"
15890    cd "$CURDIR"
15891    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15892        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15893    fi
15894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15895$as_echo_n "checking if JDK should be overridden... " >&6; }
15896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15897$as_echo "yes with $JDK_TOPDIR" >&6; }
15898fi
15899
15900
15901
15902BUILD_OUTPUT="$OUTPUT_ROOT"
15903
15904
15905HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15906BUILD_HOTSPOT=true
15907
15908
15909
15910# Check whether --with-import-hotspot was given.
15911if test "${with_import_hotspot+set}" = set; then :
15912  withval=$with_import_hotspot;
15913fi
15914
15915if test "x$with_import_hotspot" != x; then
15916    CURDIR="$PWD"
15917    cd "$with_import_hotspot"
15918    HOTSPOT_DIST="`pwd`"
15919    cd "$CURDIR"
15920    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15921        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15922    fi
15923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15924$as_echo_n "checking if hotspot should be imported... " >&6; }
15925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15926$as_echo "yes from $HOTSPOT_DIST" >&6; }
15927    BUILD_HOTSPOT=false
15928fi
15929
15930JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15931
15932
15933###############################################################################
15934#
15935# Setup the toolchain (compilers etc), i.e. the tools that need to be
15936# cross-compilation aware.
15937#
15938###############################################################################
15939
15940
15941###############################################################################
15942#
15943# Configure the development tool paths and potential sysroot.
15944#
15945ac_ext=cpp
15946ac_cpp='$CXXCPP $CPPFLAGS'
15947ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15948ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15949ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15950
15951
15952# The option used to specify the target .o,.a or .so file.
15953# When compiling, how to specify the to be created object file.
15954CC_OUT_OPTION='-o$(SPACE)'
15955# When linking, how to specify the to be created executable.
15956EXE_OUT_OPTION='-o$(SPACE)'
15957# When linking, how to specify the to be created dynamically linkable library.
15958LD_OUT_OPTION='-o$(SPACE)'
15959# When archiving, how to specify the to be create static archive for object files.
15960AR_OUT_OPTION='rcs$(SPACE)'
15961
15962
15963
15964
15965
15966# Locate the actual tools
15967
15968if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15969
15970  # Store path to cygwin link.exe to help excluding it when searching for
15971  # VS linker. This must be done before changing the PATH when looking for VS.
15972  # Extract the first word of "link", so it can be a program name with args.
15973set dummy link; ac_word=$2
15974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15975$as_echo_n "checking for $ac_word... " >&6; }
15976if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15977  $as_echo_n "(cached) " >&6
15978else
15979  case $CYGWIN_LINK in
15980  [\\/]* | ?:[\\/]*)
15981  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15982  ;;
15983  *)
15984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15985for as_dir in $PATH
15986do
15987  IFS=$as_save_IFS
15988  test -z "$as_dir" && as_dir=.
15989    for ac_exec_ext in '' $ac_executable_extensions; do
15990  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15991    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15993    break 2
15994  fi
15995done
15996  done
15997IFS=$as_save_IFS
15998
15999  ;;
16000esac
16001fi
16002CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16003if test -n "$CYGWIN_LINK"; then
16004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16005$as_echo "$CYGWIN_LINK" >&6; }
16006else
16007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16008$as_echo "no" >&6; }
16009fi
16010
16011
16012  if test "x$CYGWIN_LINK" != x; then
16013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16014$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16015    "$CYGWIN_LINK" --version > /dev/null
16016    if test $? -eq 0 ; then
16017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16018$as_echo "yes" >&6; }
16019    else
16020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16021$as_echo "no" >&6; }
16022      # This might be the VS linker. Don't exclude it later on.
16023      CYGWIN_LINK=""
16024    fi
16025  fi
16026
16027  # First-hand choice is to locate and run the vsvars bat file.
16028
16029  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16030    VCVARSFILE="vc/bin/vcvars32.bat"
16031  else
16032    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16033  fi
16034
16035  VS_ENV_CMD=""
16036  VS_ENV_ARGS=""
16037  if test "x$with_toolsdir" != x; then
16038
16039  if test "x$VS_ENV_CMD" = x; then
16040    VS100BASE="$with_toolsdir/../.."
16041    METHOD="--with-tools-dir"
16042
16043  windows_path="$VS100BASE"
16044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16045    unix_path=`$CYGPATH -u "$windows_path"`
16046    VS100BASE="$unix_path"
16047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16049    VS100BASE="$unix_path"
16050  fi
16051
16052    if test -d "$VS100BASE"; then
16053      if test -f "$VS100BASE/$VCVARSFILE"; then
16054        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16055$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16056        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16057      else
16058        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16059$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16060        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16061$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16062      fi
16063    fi
16064  fi
16065
16066  fi
16067
16068  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16069    # Having specified an argument which is incorrect will produce an instant failure;
16070    # we should not go on looking
16071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16072$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16073    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16074$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16075    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16076  fi
16077
16078  if test "x$ProgramW6432" != x; then
16079
16080  if test "x$VS_ENV_CMD" = x; then
16081    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16082    METHOD="well-known name"
16083
16084  windows_path="$WIN_SDK_BASE"
16085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16086    unix_path=`$CYGPATH -u "$windows_path"`
16087    WIN_SDK_BASE="$unix_path"
16088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16090    WIN_SDK_BASE="$unix_path"
16091  fi
16092
16093    if test -d "$WIN_SDK_BASE"; then
16094      # There have been cases of partial or broken SDK installations. A missing
16095      # lib dir is not going to work.
16096      if test ! -d "$WIN_SDK_BASE/../lib"; then
16097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16099        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16100$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16101      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16103$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16104        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16105        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16106          VS_ENV_ARGS="/x86"
16107        else
16108          VS_ENV_ARGS="/x64"
16109        fi
16110      else
16111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16112$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16113        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16114$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16115      fi
16116    fi
16117  fi
16118
16119  fi
16120  if test "x$PROGRAMW6432" != x; then
16121
16122  if test "x$VS_ENV_CMD" = x; then
16123    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16124    METHOD="well-known name"
16125
16126  windows_path="$WIN_SDK_BASE"
16127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16128    unix_path=`$CYGPATH -u "$windows_path"`
16129    WIN_SDK_BASE="$unix_path"
16130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16132    WIN_SDK_BASE="$unix_path"
16133  fi
16134
16135    if test -d "$WIN_SDK_BASE"; then
16136      # There have been cases of partial or broken SDK installations. A missing
16137      # lib dir is not going to work.
16138      if test ! -d "$WIN_SDK_BASE/../lib"; then
16139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16142$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16143      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16147        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16148          VS_ENV_ARGS="/x86"
16149        else
16150          VS_ENV_ARGS="/x64"
16151        fi
16152      else
16153        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16154$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16155        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16156$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16157      fi
16158    fi
16159  fi
16160
16161  fi
16162  if test "x$PROGRAMFILES" != x; then
16163
16164  if test "x$VS_ENV_CMD" = x; then
16165    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16166    METHOD="well-known name"
16167
16168  windows_path="$WIN_SDK_BASE"
16169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16170    unix_path=`$CYGPATH -u "$windows_path"`
16171    WIN_SDK_BASE="$unix_path"
16172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16174    WIN_SDK_BASE="$unix_path"
16175  fi
16176
16177    if test -d "$WIN_SDK_BASE"; then
16178      # There have been cases of partial or broken SDK installations. A missing
16179      # lib dir is not going to work.
16180      if test ! -d "$WIN_SDK_BASE/../lib"; then
16181        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16182$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16183        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16184$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16185      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16189        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16190          VS_ENV_ARGS="/x86"
16191        else
16192          VS_ENV_ARGS="/x64"
16193        fi
16194      else
16195        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16196$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16197        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16198$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16199      fi
16200    fi
16201  fi
16202
16203  fi
16204
16205  if test "x$VS_ENV_CMD" = x; then
16206    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16207    METHOD="well-known name"
16208
16209  windows_path="$WIN_SDK_BASE"
16210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16211    unix_path=`$CYGPATH -u "$windows_path"`
16212    WIN_SDK_BASE="$unix_path"
16213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16215    WIN_SDK_BASE="$unix_path"
16216  fi
16217
16218    if test -d "$WIN_SDK_BASE"; then
16219      # There have been cases of partial or broken SDK installations. A missing
16220      # lib dir is not going to work.
16221      if test ! -d "$WIN_SDK_BASE/../lib"; then
16222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16223$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16224        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16225$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16226      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16227        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16228$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16229        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16230        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16231          VS_ENV_ARGS="/x86"
16232        else
16233          VS_ENV_ARGS="/x64"
16234        fi
16235      else
16236        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16237$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16238        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16239$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16240      fi
16241    fi
16242  fi
16243
16244
16245  if test "x$VS_ENV_CMD" = x; then
16246    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16247    METHOD="well-known name"
16248
16249  windows_path="$WIN_SDK_BASE"
16250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16251    unix_path=`$CYGPATH -u "$windows_path"`
16252    WIN_SDK_BASE="$unix_path"
16253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16255    WIN_SDK_BASE="$unix_path"
16256  fi
16257
16258    if test -d "$WIN_SDK_BASE"; then
16259      # There have been cases of partial or broken SDK installations. A missing
16260      # lib dir is not going to work.
16261      if test ! -d "$WIN_SDK_BASE/../lib"; then
16262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16263$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16264        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16265$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16266      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16267        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16268$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16269        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16270        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16271          VS_ENV_ARGS="/x86"
16272        else
16273          VS_ENV_ARGS="/x64"
16274        fi
16275      else
16276        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16277$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16278        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16279$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16280      fi
16281    fi
16282  fi
16283
16284
16285  if test "x$VS100COMNTOOLS" != x; then
16286
16287  if test "x$VS_ENV_CMD" = x; then
16288    VS100BASE="$VS100COMNTOOLS/../.."
16289    METHOD="VS100COMNTOOLS variable"
16290
16291  windows_path="$VS100BASE"
16292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16293    unix_path=`$CYGPATH -u "$windows_path"`
16294    VS100BASE="$unix_path"
16295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16297    VS100BASE="$unix_path"
16298  fi
16299
16300    if test -d "$VS100BASE"; then
16301      if test -f "$VS100BASE/$VCVARSFILE"; then
16302        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16303$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16304        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16305      else
16306        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16307$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16308        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16309$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16310      fi
16311    fi
16312  fi
16313
16314  fi
16315  if test "x$PROGRAMFILES" != x; then
16316
16317  if test "x$VS_ENV_CMD" = x; then
16318    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16319    METHOD="well-known name"
16320
16321  windows_path="$VS100BASE"
16322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16323    unix_path=`$CYGPATH -u "$windows_path"`
16324    VS100BASE="$unix_path"
16325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16327    VS100BASE="$unix_path"
16328  fi
16329
16330    if test -d "$VS100BASE"; then
16331      if test -f "$VS100BASE/$VCVARSFILE"; then
16332        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16333$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16334        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16335      else
16336        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16337$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16338        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16339$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16340      fi
16341    fi
16342  fi
16343
16344  fi
16345
16346  if test "x$VS_ENV_CMD" = x; then
16347    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16348    METHOD="well-known name"
16349
16350  windows_path="$VS100BASE"
16351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16352    unix_path=`$CYGPATH -u "$windows_path"`
16353    VS100BASE="$unix_path"
16354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16356    VS100BASE="$unix_path"
16357  fi
16358
16359    if test -d "$VS100BASE"; then
16360      if test -f "$VS100BASE/$VCVARSFILE"; then
16361        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16362$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16363        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16364      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16368$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16369      fi
16370    fi
16371  fi
16372
16373
16374  if test "x$VS_ENV_CMD" = x; then
16375    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16376    METHOD="well-known name"
16377
16378  windows_path="$VS100BASE"
16379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16380    unix_path=`$CYGPATH -u "$windows_path"`
16381    VS100BASE="$unix_path"
16382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16384    VS100BASE="$unix_path"
16385  fi
16386
16387    if test -d "$VS100BASE"; then
16388      if test -f "$VS100BASE/$VCVARSFILE"; then
16389        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16390$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16391        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16392      else
16393        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16394$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16395        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16396$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16397      fi
16398    fi
16399  fi
16400
16401
16402  if test "x$VS_ENV_CMD" != x; then
16403    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16404
16405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16406
16407  # First separate the path from the arguments. This will split at the first
16408  # space.
16409  complete="$VS_ENV_CMD"
16410  path="${complete%% *}"
16411  tmp="$complete EOL"
16412  arguments="${tmp#* }"
16413
16414  # Input might be given as Windows format, start by converting to
16415  # unix format.
16416  new_path=`$CYGPATH -u "$path"`
16417
16418  # Now try to locate executable using which
16419  new_path=`$WHICH "$new_path" 2> /dev/null`
16420  # bat and cmd files are not always considered executable in cygwin causing which
16421  # to not find them
16422  if test "x$new_path" = x \
16423           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16424           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16425    new_path=`$CYGPATH -u "$path"`
16426  fi
16427  if test "x$new_path" = x; then
16428    # Oops. Which didn't find the executable.
16429    # The splitting of arguments from the executable at a space might have been incorrect,
16430    # since paths with space are more likely in Windows. Give it another try with the whole
16431    # argument.
16432    path="$complete"
16433    arguments="EOL"
16434    new_path=`$CYGPATH -u "$path"`
16435    new_path=`$WHICH "$new_path" 2> /dev/null`
16436    # bat and cmd files are not always considered executable in cygwin causing which
16437    # to not find them
16438    if test "x$new_path" = x \
16439             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16440             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16441      new_path=`$CYGPATH -u "$path"`
16442    fi
16443    if test "x$new_path" = x; then
16444      # It's still not found. Now this is an unrecoverable error.
16445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16446$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16447      has_space=`$ECHO "$complete" | $GREP " "`
16448      if test "x$has_space" != x; then
16449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16451      fi
16452      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16453    fi
16454  fi
16455
16456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16459  # "foo.exe" is OK but "foo" is an error.
16460  #
16461  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16462  # It is also a way to make sure we got the proper file name for the real test later on.
16463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16464  if test "x$test_shortpath" = x; then
16465    # Short path failed, file does not exist as specified.
16466    # Try adding .exe or .cmd
16467    if test -f "${new_path}.exe"; then
16468       input_to_shortpath="${new_path}.exe"
16469    elif test -f "${new_path}.cmd"; then
16470       input_to_shortpath="${new_path}.cmd"
16471    else
16472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16473$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16476      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16477    fi
16478  else
16479    input_to_shortpath="$new_path"
16480  fi
16481
16482  # Call helper function which possibly converts this using DOS-style short mode.
16483  # If so, the updated path is stored in $new_path.
16484  new_path="$input_to_shortpath"
16485
16486  input_path="$input_to_shortpath"
16487  # Check if we need to convert this using DOS-style short mode. If the path
16488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16489  # take no chances and rewrite it.
16490  # Note: m4 eats our [], so we need to use [ and ] instead.
16491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16492  if test "x$has_forbidden_chars" != x; then
16493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16497      # Going to short mode and back again did indeed matter. Since short mode is
16498      # case insensitive, let's make it lowercase to improve readability.
16499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16500      # Now convert it back to Unix-stile (cygpath)
16501      input_path=`$CYGPATH -u "$shortmode_path"`
16502      new_path="$input_path"
16503    fi
16504  fi
16505
16506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16507  if test "x$test_cygdrive_prefix" = x; then
16508    # As a simple fix, exclude /usr/bin since it's not a real path.
16509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16511      # a path prefixed by /cygdrive for fixpath to work.
16512      new_path="$CYGWIN_ROOT_PATH$input_path"
16513    fi
16514  fi
16515
16516  # remove trailing .exe if any
16517  new_path="${new_path/%.exe/}"
16518
16519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16520
16521  # First separate the path from the arguments. This will split at the first
16522  # space.
16523  complete="$VS_ENV_CMD"
16524  path="${complete%% *}"
16525  tmp="$complete EOL"
16526  arguments="${tmp#* }"
16527
16528  # Input might be given as Windows format, start by converting to
16529  # unix format.
16530  new_path="$path"
16531
16532  windows_path="$new_path"
16533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16534    unix_path=`$CYGPATH -u "$windows_path"`
16535    new_path="$unix_path"
16536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16538    new_path="$unix_path"
16539  fi
16540
16541
16542  # Now try to locate executable using which
16543  new_path=`$WHICH "$new_path" 2> /dev/null`
16544
16545  if test "x$new_path" = x; then
16546    # Oops. Which didn't find the executable.
16547    # The splitting of arguments from the executable at a space might have been incorrect,
16548    # since paths with space are more likely in Windows. Give it another try with the whole
16549    # argument.
16550    path="$complete"
16551    arguments="EOL"
16552    new_path="$path"
16553
16554  windows_path="$new_path"
16555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16556    unix_path=`$CYGPATH -u "$windows_path"`
16557    new_path="$unix_path"
16558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16560    new_path="$unix_path"
16561  fi
16562
16563
16564    new_path=`$WHICH "$new_path" 2> /dev/null`
16565
16566    if test "x$new_path" = x; then
16567      # It's still not found. Now this is an unrecoverable error.
16568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16569$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16570      has_space=`$ECHO "$complete" | $GREP " "`
16571      if test "x$has_space" != x; then
16572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16574      fi
16575      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16576    fi
16577  fi
16578
16579  # Now new_path has a complete unix path to the binary
16580  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16581    # Keep paths in /bin as-is, but remove trailing .exe if any
16582    new_path="${new_path/%.exe/}"
16583    # Do not save /bin paths to all_fixpath_prefixes!
16584  else
16585    # Not in mixed or Windows style, start by that.
16586    new_path=`cmd //c echo $new_path`
16587
16588  input_path="$new_path"
16589  # Check if we need to convert this using DOS-style short mode. If the path
16590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16591  # take no chances and rewrite it.
16592  # Note: m4 eats our [], so we need to use [ and ] instead.
16593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16594  if test "x$has_forbidden_chars" != x; then
16595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16597  fi
16598
16599    # Output is in $new_path
16600
16601  windows_path="$new_path"
16602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16603    unix_path=`$CYGPATH -u "$windows_path"`
16604    new_path="$unix_path"
16605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16607    new_path="$unix_path"
16608  fi
16609
16610    # remove trailing .exe if any
16611    new_path="${new_path/%.exe/}"
16612
16613    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16614    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16615  fi
16616
16617  else
16618    # We're on a posix platform. Hooray! :)
16619    # First separate the path from the arguments. This will split at the first
16620    # space.
16621    complete="$VS_ENV_CMD"
16622    path="${complete%% *}"
16623    tmp="$complete EOL"
16624    arguments="${tmp#* }"
16625
16626    # Cannot rely on the command "which" here since it doesn't always work.
16627    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16628    if test -z "$is_absolute_path"; then
16629      # Path to executable is not absolute. Find it.
16630      IFS_save="$IFS"
16631      IFS=:
16632      for p in $PATH; do
16633        if test -f "$p/$path" && test -x "$p/$path"; then
16634          new_path="$p/$path"
16635          break
16636        fi
16637      done
16638      IFS="$IFS_save"
16639    else
16640      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16641$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16642      new_path="$path"
16643    fi
16644
16645    if test "x$new_path" = x; then
16646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16647$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16648        has_space=`$ECHO "$complete" | $GREP " "`
16649        if test "x$has_space" != x; then
16650          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16652        fi
16653        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16654      fi
16655  fi
16656
16657      # Now join together the path and the arguments once again
16658      if test "x$arguments" != xEOL; then
16659        new_complete="$new_path ${arguments% *}"
16660      else
16661        new_complete="$new_path"
16662      fi
16663
16664  if test "x$complete" != "x$new_complete"; then
16665      VS_ENV_CMD="$new_complete"
16666      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16667$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16668    fi
16669
16670
16671    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16672    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16673$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16674    cd $OUTPUT_ROOT
16675    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16676    # to autoconf standards.
16677
16678    #----
16679
16680    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16681    # but calculate the difference in Cygwin environment before/after running it and then
16682    # apply the diff.
16683
16684    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16685      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16686      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16687      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16688    else
16689      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16690      _dosbash=`cmd //c echo \`which bash\``
16691    fi
16692
16693    # generate the set of exported vars before/after the vs10 setup
16694    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16695    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16696    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16697    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16698
16699    # Now execute the newly created bat file.
16700    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16701    cmd /c localdevenvtmp.bat | cat
16702
16703    # apply the diff (less some non-vs10 vars named by "!")
16704    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16705    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16706    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16707
16708    # cleanup
16709    $RM localdevenvtmp*
16710    #----
16711    cd $CURDIR
16712    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16713      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16714$as_echo "no" >&6; }
16715      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16716$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16717      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16718$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16719      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16720$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16721      as_fn_error $? "Cannot continue" "$LINENO" 5
16722    fi
16723
16724    # Now set all paths and other env variables. This will allow the rest of
16725    # the configure script to find and run the compiler in the proper way.
16726    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16727$as_echo "$as_me: Setting extracted environment variables" >&6;}
16728    . $OUTPUT_ROOT/localdevenv.sh
16729  else
16730    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16731    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16732$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16733  fi
16734
16735  # At this point, we should have corrent variables in the environment, or we can't continue.
16736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16737$as_echo_n "checking for Visual Studio variables... " >&6; }
16738
16739  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16740    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16742$as_echo "present but broken" >&6; }
16743      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16744    else
16745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16746$as_echo "ok" >&6; }
16747      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16748      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16749      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16750      VS_PATH="$PATH"
16751
16752
16753
16754    fi
16755  else
16756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16757$as_echo "not found" >&6; }
16758
16759    if test "x$VS_ENV_CMD" = x; then
16760      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16761$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16762      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16763$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16764    else
16765      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16766$as_echo "$as_me: Running the extraction script failed." >&6;}
16767    fi
16768    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16769$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16770    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16771$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16772    as_fn_error $? "Cannot continue" "$LINENO" 5
16773  fi
16774
16775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16776$as_echo_n "checking for msvcr100.dll... " >&6; }
16777
16778# Check whether --with-msvcr-dll was given.
16779if test "${with_msvcr_dll+set}" = set; then :
16780  withval=$with_msvcr_dll;
16781fi
16782
16783  if test "x$with_msvcr_dll" != x; then
16784    MSVCR_DLL="$with_msvcr_dll"
16785  else
16786    if test "x$VCINSTALLDIR" != x; then
16787      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16788        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16789      else
16790        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16791        if test "x$MSVCR_DLL" = x; then
16792          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16793        fi
16794      fi
16795      if test "x$MSVCR_DLL" != x; then
16796        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16797$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16798      else
16799        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16800$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16801      fi
16802    fi
16803    if test "x$MSVCR_DLL" = x; then
16804      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16805        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16806$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16807        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16808      fi
16809    fi
16810  fi
16811  if test "x$MSVCR_DLL" = x; then
16812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16813$as_echo "no" >&6; }
16814    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16815  fi
16816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16817$as_echo "$MSVCR_DLL" >&6; }
16818
16819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16820
16821  # Input might be given as Windows format, start by converting to
16822  # unix format.
16823  path="$MSVCR_DLL"
16824  new_path=`$CYGPATH -u "$path"`
16825
16826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16829  # "foo.exe" is OK but "foo" is an error.
16830  #
16831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16832  # It is also a way to make sure we got the proper file name for the real test later on.
16833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16834  if test "x$test_shortpath" = x; then
16835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16836$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16837    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16838  fi
16839
16840  # Call helper function which possibly converts this using DOS-style short mode.
16841  # If so, the updated path is stored in $new_path.
16842
16843  input_path="$new_path"
16844  # Check if we need to convert this using DOS-style short mode. If the path
16845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16846  # take no chances and rewrite it.
16847  # Note: m4 eats our [], so we need to use [ and ] instead.
16848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16849  if test "x$has_forbidden_chars" != x; then
16850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16854      # Going to short mode and back again did indeed matter. Since short mode is
16855      # case insensitive, let's make it lowercase to improve readability.
16856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16857      # Now convert it back to Unix-stile (cygpath)
16858      input_path=`$CYGPATH -u "$shortmode_path"`
16859      new_path="$input_path"
16860    fi
16861  fi
16862
16863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16864  if test "x$test_cygdrive_prefix" = x; then
16865    # As a simple fix, exclude /usr/bin since it's not a real path.
16866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16868      # a path prefixed by /cygdrive for fixpath to work.
16869      new_path="$CYGWIN_ROOT_PATH$input_path"
16870    fi
16871  fi
16872
16873
16874  if test "x$path" != "x$new_path"; then
16875    MSVCR_DLL="$new_path"
16876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16877$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16878  fi
16879
16880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16881
16882  path="$MSVCR_DLL"
16883  has_colon=`$ECHO $path | $GREP ^.:`
16884  new_path="$path"
16885  if test "x$has_colon" = x; then
16886    # Not in mixed or Windows style, start by that.
16887    new_path=`cmd //c echo $path`
16888  fi
16889
16890
16891  input_path="$new_path"
16892  # Check if we need to convert this using DOS-style short mode. If the path
16893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16894  # take no chances and rewrite it.
16895  # Note: m4 eats our [], so we need to use [ and ] instead.
16896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16897  if test "x$has_forbidden_chars" != x; then
16898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16900  fi
16901
16902
16903  windows_path="$new_path"
16904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16905    unix_path=`$CYGPATH -u "$windows_path"`
16906    new_path="$unix_path"
16907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16909    new_path="$unix_path"
16910  fi
16911
16912  if test "x$path" != "x$new_path"; then
16913    MSVCR_DLL="$new_path"
16914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16915$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16916  fi
16917
16918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16920
16921  else
16922    # We're on a posix platform. Hooray! :)
16923    path="$MSVCR_DLL"
16924
16925    if test ! -f "$path" && test ! -d "$path"; then
16926      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16927    fi
16928
16929    has_space=`$ECHO "$path" | $GREP " "`
16930    if test "x$has_space" != x; then
16931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16932$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16933      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16934    fi
16935  fi
16936
16937
16938fi
16939
16940
16941
16942# If --build AND --host is set, then the configure script will find any
16943# cross compilation tools in the PATH. Cross compilation tools
16944# follows the cross compilation standard where they are prefixed with ${host}.
16945# For example the binary i686-sun-solaris2.10-gcc
16946# will cross compile for i686-sun-solaris2.10
16947# If neither of build and host is not set, then build=host and the
16948# default compiler found in the path will be used.
16949# Setting only --host, does not seem to be really supported.
16950# Please set both --build and --host if you want to cross compile.
16951
16952if test "x$COMPILE_TYPE" = "xcross"; then
16953    # Now we to find a C/C++ compiler that can build executables for the build
16954    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16955    # once. Also, we need to do this before adding a tools dir to the path,
16956    # otherwise we might pick up cross-compilers which don't use standard naming.
16957    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16958    # to wait until they are properly discovered.
16959    for ac_prog in cl cc gcc
16960do
16961  # Extract the first word of "$ac_prog", so it can be a program name with args.
16962set dummy $ac_prog; ac_word=$2
16963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16964$as_echo_n "checking for $ac_word... " >&6; }
16965if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16966  $as_echo_n "(cached) " >&6
16967else
16968  case $BUILD_CC in
16969  [\\/]* | ?:[\\/]*)
16970  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16971  ;;
16972  *)
16973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16974for as_dir in $PATH
16975do
16976  IFS=$as_save_IFS
16977  test -z "$as_dir" && as_dir=.
16978    for ac_exec_ext in '' $ac_executable_extensions; do
16979  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16980    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16982    break 2
16983  fi
16984done
16985  done
16986IFS=$as_save_IFS
16987
16988  ;;
16989esac
16990fi
16991BUILD_CC=$ac_cv_path_BUILD_CC
16992if test -n "$BUILD_CC"; then
16993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16994$as_echo "$BUILD_CC" >&6; }
16995else
16996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16997$as_echo "no" >&6; }
16998fi
16999
17000
17001  test -n "$BUILD_CC" && break
17002done
17003
17004
17005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17006
17007  # First separate the path from the arguments. This will split at the first
17008  # space.
17009  complete="$BUILD_CC"
17010  path="${complete%% *}"
17011  tmp="$complete EOL"
17012  arguments="${tmp#* }"
17013
17014  # Input might be given as Windows format, start by converting to
17015  # unix format.
17016  new_path=`$CYGPATH -u "$path"`
17017
17018  # Now try to locate executable using which
17019  new_path=`$WHICH "$new_path" 2> /dev/null`
17020  # bat and cmd files are not always considered executable in cygwin causing which
17021  # to not find them
17022  if test "x$new_path" = x \
17023           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17024           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17025    new_path=`$CYGPATH -u "$path"`
17026  fi
17027  if test "x$new_path" = x; then
17028    # Oops. Which didn't find the executable.
17029    # The splitting of arguments from the executable at a space might have been incorrect,
17030    # since paths with space are more likely in Windows. Give it another try with the whole
17031    # argument.
17032    path="$complete"
17033    arguments="EOL"
17034    new_path=`$CYGPATH -u "$path"`
17035    new_path=`$WHICH "$new_path" 2> /dev/null`
17036    # bat and cmd files are not always considered executable in cygwin causing which
17037    # to not find them
17038    if test "x$new_path" = x \
17039             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17040             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17041      new_path=`$CYGPATH -u "$path"`
17042    fi
17043    if test "x$new_path" = x; then
17044      # It's still not found. Now this is an unrecoverable error.
17045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17046$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17047      has_space=`$ECHO "$complete" | $GREP " "`
17048      if test "x$has_space" != x; then
17049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17051      fi
17052      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17053    fi
17054  fi
17055
17056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17059  # "foo.exe" is OK but "foo" is an error.
17060  #
17061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17062  # It is also a way to make sure we got the proper file name for the real test later on.
17063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17064  if test "x$test_shortpath" = x; then
17065    # Short path failed, file does not exist as specified.
17066    # Try adding .exe or .cmd
17067    if test -f "${new_path}.exe"; then
17068       input_to_shortpath="${new_path}.exe"
17069    elif test -f "${new_path}.cmd"; then
17070       input_to_shortpath="${new_path}.cmd"
17071    else
17072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17073$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17074      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17075$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17076      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17077    fi
17078  else
17079    input_to_shortpath="$new_path"
17080  fi
17081
17082  # Call helper function which possibly converts this using DOS-style short mode.
17083  # If so, the updated path is stored in $new_path.
17084  new_path="$input_to_shortpath"
17085
17086  input_path="$input_to_shortpath"
17087  # Check if we need to convert this using DOS-style short mode. If the path
17088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17089  # take no chances and rewrite it.
17090  # Note: m4 eats our [], so we need to use [ and ] instead.
17091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17092  if test "x$has_forbidden_chars" != x; then
17093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17097      # Going to short mode and back again did indeed matter. Since short mode is
17098      # case insensitive, let's make it lowercase to improve readability.
17099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17100      # Now convert it back to Unix-stile (cygpath)
17101      input_path=`$CYGPATH -u "$shortmode_path"`
17102      new_path="$input_path"
17103    fi
17104  fi
17105
17106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17107  if test "x$test_cygdrive_prefix" = x; then
17108    # As a simple fix, exclude /usr/bin since it's not a real path.
17109    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17111      # a path prefixed by /cygdrive for fixpath to work.
17112      new_path="$CYGWIN_ROOT_PATH$input_path"
17113    fi
17114  fi
17115
17116  # remove trailing .exe if any
17117  new_path="${new_path/%.exe/}"
17118
17119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17120
17121  # First separate the path from the arguments. This will split at the first
17122  # space.
17123  complete="$BUILD_CC"
17124  path="${complete%% *}"
17125  tmp="$complete EOL"
17126  arguments="${tmp#* }"
17127
17128  # Input might be given as Windows format, start by converting to
17129  # unix format.
17130  new_path="$path"
17131
17132  windows_path="$new_path"
17133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17134    unix_path=`$CYGPATH -u "$windows_path"`
17135    new_path="$unix_path"
17136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17138    new_path="$unix_path"
17139  fi
17140
17141
17142  # Now try to locate executable using which
17143  new_path=`$WHICH "$new_path" 2> /dev/null`
17144
17145  if test "x$new_path" = x; then
17146    # Oops. Which didn't find the executable.
17147    # The splitting of arguments from the executable at a space might have been incorrect,
17148    # since paths with space are more likely in Windows. Give it another try with the whole
17149    # argument.
17150    path="$complete"
17151    arguments="EOL"
17152    new_path="$path"
17153
17154  windows_path="$new_path"
17155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17156    unix_path=`$CYGPATH -u "$windows_path"`
17157    new_path="$unix_path"
17158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17160    new_path="$unix_path"
17161  fi
17162
17163
17164    new_path=`$WHICH "$new_path" 2> /dev/null`
17165
17166    if test "x$new_path" = x; then
17167      # It's still not found. Now this is an unrecoverable error.
17168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17169$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17170      has_space=`$ECHO "$complete" | $GREP " "`
17171      if test "x$has_space" != x; then
17172        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17173$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17174      fi
17175      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17176    fi
17177  fi
17178
17179  # Now new_path has a complete unix path to the binary
17180  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17181    # Keep paths in /bin as-is, but remove trailing .exe if any
17182    new_path="${new_path/%.exe/}"
17183    # Do not save /bin paths to all_fixpath_prefixes!
17184  else
17185    # Not in mixed or Windows style, start by that.
17186    new_path=`cmd //c echo $new_path`
17187
17188  input_path="$new_path"
17189  # Check if we need to convert this using DOS-style short mode. If the path
17190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17191  # take no chances and rewrite it.
17192  # Note: m4 eats our [], so we need to use [ and ] instead.
17193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17194  if test "x$has_forbidden_chars" != x; then
17195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17197  fi
17198
17199    # Output is in $new_path
17200
17201  windows_path="$new_path"
17202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17203    unix_path=`$CYGPATH -u "$windows_path"`
17204    new_path="$unix_path"
17205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17207    new_path="$unix_path"
17208  fi
17209
17210    # remove trailing .exe if any
17211    new_path="${new_path/%.exe/}"
17212
17213    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17214    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17215  fi
17216
17217  else
17218    # We're on a posix platform. Hooray! :)
17219    # First separate the path from the arguments. This will split at the first
17220    # space.
17221    complete="$BUILD_CC"
17222    path="${complete%% *}"
17223    tmp="$complete EOL"
17224    arguments="${tmp#* }"
17225
17226    # Cannot rely on the command "which" here since it doesn't always work.
17227    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17228    if test -z "$is_absolute_path"; then
17229      # Path to executable is not absolute. Find it.
17230      IFS_save="$IFS"
17231      IFS=:
17232      for p in $PATH; do
17233        if test -f "$p/$path" && test -x "$p/$path"; then
17234          new_path="$p/$path"
17235          break
17236        fi
17237      done
17238      IFS="$IFS_save"
17239    else
17240      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17241$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17242      new_path="$path"
17243    fi
17244
17245    if test "x$new_path" = x; then
17246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17247$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17248        has_space=`$ECHO "$complete" | $GREP " "`
17249        if test "x$has_space" != x; then
17250          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17251$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17252        fi
17253        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17254      fi
17255  fi
17256
17257      # Now join together the path and the arguments once again
17258      if test "x$arguments" != xEOL; then
17259        new_complete="$new_path ${arguments% *}"
17260      else
17261        new_complete="$new_path"
17262      fi
17263
17264  if test "x$complete" != "x$new_complete"; then
17265      BUILD_CC="$new_complete"
17266      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17267$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17268    fi
17269
17270    for ac_prog in cl CC g++
17271do
17272  # Extract the first word of "$ac_prog", so it can be a program name with args.
17273set dummy $ac_prog; ac_word=$2
17274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17275$as_echo_n "checking for $ac_word... " >&6; }
17276if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17277  $as_echo_n "(cached) " >&6
17278else
17279  case $BUILD_CXX in
17280  [\\/]* | ?:[\\/]*)
17281  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17282  ;;
17283  *)
17284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17285for as_dir in $PATH
17286do
17287  IFS=$as_save_IFS
17288  test -z "$as_dir" && as_dir=.
17289    for ac_exec_ext in '' $ac_executable_extensions; do
17290  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17291    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17293    break 2
17294  fi
17295done
17296  done
17297IFS=$as_save_IFS
17298
17299  ;;
17300esac
17301fi
17302BUILD_CXX=$ac_cv_path_BUILD_CXX
17303if test -n "$BUILD_CXX"; then
17304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17305$as_echo "$BUILD_CXX" >&6; }
17306else
17307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17308$as_echo "no" >&6; }
17309fi
17310
17311
17312  test -n "$BUILD_CXX" && break
17313done
17314
17315
17316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17317
17318  # First separate the path from the arguments. This will split at the first
17319  # space.
17320  complete="$BUILD_CXX"
17321  path="${complete%% *}"
17322  tmp="$complete EOL"
17323  arguments="${tmp#* }"
17324
17325  # Input might be given as Windows format, start by converting to
17326  # unix format.
17327  new_path=`$CYGPATH -u "$path"`
17328
17329  # Now try to locate executable using which
17330  new_path=`$WHICH "$new_path" 2> /dev/null`
17331  # bat and cmd files are not always considered executable in cygwin causing which
17332  # to not find them
17333  if test "x$new_path" = x \
17334           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17335           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17336    new_path=`$CYGPATH -u "$path"`
17337  fi
17338  if test "x$new_path" = x; then
17339    # Oops. Which didn't find the executable.
17340    # The splitting of arguments from the executable at a space might have been incorrect,
17341    # since paths with space are more likely in Windows. Give it another try with the whole
17342    # argument.
17343    path="$complete"
17344    arguments="EOL"
17345    new_path=`$CYGPATH -u "$path"`
17346    new_path=`$WHICH "$new_path" 2> /dev/null`
17347    # bat and cmd files are not always considered executable in cygwin causing which
17348    # to not find them
17349    if test "x$new_path" = x \
17350             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17351             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17352      new_path=`$CYGPATH -u "$path"`
17353    fi
17354    if test "x$new_path" = x; then
17355      # It's still not found. Now this is an unrecoverable error.
17356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17357$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17358      has_space=`$ECHO "$complete" | $GREP " "`
17359      if test "x$has_space" != x; then
17360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17362      fi
17363      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17364    fi
17365  fi
17366
17367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17370  # "foo.exe" is OK but "foo" is an error.
17371  #
17372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17373  # It is also a way to make sure we got the proper file name for the real test later on.
17374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17375  if test "x$test_shortpath" = x; then
17376    # Short path failed, file does not exist as specified.
17377    # Try adding .exe or .cmd
17378    if test -f "${new_path}.exe"; then
17379       input_to_shortpath="${new_path}.exe"
17380    elif test -f "${new_path}.cmd"; then
17381       input_to_shortpath="${new_path}.cmd"
17382    else
17383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17384$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17387      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17388    fi
17389  else
17390    input_to_shortpath="$new_path"
17391  fi
17392
17393  # Call helper function which possibly converts this using DOS-style short mode.
17394  # If so, the updated path is stored in $new_path.
17395  new_path="$input_to_shortpath"
17396
17397  input_path="$input_to_shortpath"
17398  # Check if we need to convert this using DOS-style short mode. If the path
17399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17400  # take no chances and rewrite it.
17401  # Note: m4 eats our [], so we need to use [ and ] instead.
17402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17403  if test "x$has_forbidden_chars" != x; then
17404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17408      # Going to short mode and back again did indeed matter. Since short mode is
17409      # case insensitive, let's make it lowercase to improve readability.
17410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17411      # Now convert it back to Unix-stile (cygpath)
17412      input_path=`$CYGPATH -u "$shortmode_path"`
17413      new_path="$input_path"
17414    fi
17415  fi
17416
17417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17418  if test "x$test_cygdrive_prefix" = x; then
17419    # As a simple fix, exclude /usr/bin since it's not a real path.
17420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17422      # a path prefixed by /cygdrive for fixpath to work.
17423      new_path="$CYGWIN_ROOT_PATH$input_path"
17424    fi
17425  fi
17426
17427  # remove trailing .exe if any
17428  new_path="${new_path/%.exe/}"
17429
17430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17431
17432  # First separate the path from the arguments. This will split at the first
17433  # space.
17434  complete="$BUILD_CXX"
17435  path="${complete%% *}"
17436  tmp="$complete EOL"
17437  arguments="${tmp#* }"
17438
17439  # Input might be given as Windows format, start by converting to
17440  # unix format.
17441  new_path="$path"
17442
17443  windows_path="$new_path"
17444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17445    unix_path=`$CYGPATH -u "$windows_path"`
17446    new_path="$unix_path"
17447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17449    new_path="$unix_path"
17450  fi
17451
17452
17453  # Now try to locate executable using which
17454  new_path=`$WHICH "$new_path" 2> /dev/null`
17455
17456  if test "x$new_path" = x; then
17457    # Oops. Which didn't find the executable.
17458    # The splitting of arguments from the executable at a space might have been incorrect,
17459    # since paths with space are more likely in Windows. Give it another try with the whole
17460    # argument.
17461    path="$complete"
17462    arguments="EOL"
17463    new_path="$path"
17464
17465  windows_path="$new_path"
17466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17467    unix_path=`$CYGPATH -u "$windows_path"`
17468    new_path="$unix_path"
17469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17471    new_path="$unix_path"
17472  fi
17473
17474
17475    new_path=`$WHICH "$new_path" 2> /dev/null`
17476
17477    if test "x$new_path" = x; then
17478      # It's still not found. Now this is an unrecoverable error.
17479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17480$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17481      has_space=`$ECHO "$complete" | $GREP " "`
17482      if test "x$has_space" != x; then
17483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17485      fi
17486      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17487    fi
17488  fi
17489
17490  # Now new_path has a complete unix path to the binary
17491  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17492    # Keep paths in /bin as-is, but remove trailing .exe if any
17493    new_path="${new_path/%.exe/}"
17494    # Do not save /bin paths to all_fixpath_prefixes!
17495  else
17496    # Not in mixed or Windows style, start by that.
17497    new_path=`cmd //c echo $new_path`
17498
17499  input_path="$new_path"
17500  # Check if we need to convert this using DOS-style short mode. If the path
17501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17502  # take no chances and rewrite it.
17503  # Note: m4 eats our [], so we need to use [ and ] instead.
17504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17505  if test "x$has_forbidden_chars" != x; then
17506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17508  fi
17509
17510    # Output is in $new_path
17511
17512  windows_path="$new_path"
17513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17514    unix_path=`$CYGPATH -u "$windows_path"`
17515    new_path="$unix_path"
17516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17518    new_path="$unix_path"
17519  fi
17520
17521    # remove trailing .exe if any
17522    new_path="${new_path/%.exe/}"
17523
17524    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17525    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17526  fi
17527
17528  else
17529    # We're on a posix platform. Hooray! :)
17530    # First separate the path from the arguments. This will split at the first
17531    # space.
17532    complete="$BUILD_CXX"
17533    path="${complete%% *}"
17534    tmp="$complete EOL"
17535    arguments="${tmp#* }"
17536
17537    # Cannot rely on the command "which" here since it doesn't always work.
17538    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17539    if test -z "$is_absolute_path"; then
17540      # Path to executable is not absolute. Find it.
17541      IFS_save="$IFS"
17542      IFS=:
17543      for p in $PATH; do
17544        if test -f "$p/$path" && test -x "$p/$path"; then
17545          new_path="$p/$path"
17546          break
17547        fi
17548      done
17549      IFS="$IFS_save"
17550    else
17551      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17552$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17553      new_path="$path"
17554    fi
17555
17556    if test "x$new_path" = x; then
17557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17558$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17559        has_space=`$ECHO "$complete" | $GREP " "`
17560        if test "x$has_space" != x; then
17561          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17562$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17563        fi
17564        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17565      fi
17566  fi
17567
17568      # Now join together the path and the arguments once again
17569      if test "x$arguments" != xEOL; then
17570        new_complete="$new_path ${arguments% *}"
17571      else
17572        new_complete="$new_path"
17573      fi
17574
17575  if test "x$complete" != "x$new_complete"; then
17576      BUILD_CXX="$new_complete"
17577      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17578$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17579    fi
17580
17581    # Extract the first word of "ld", so it can be a program name with args.
17582set dummy ld; ac_word=$2
17583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17584$as_echo_n "checking for $ac_word... " >&6; }
17585if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17586  $as_echo_n "(cached) " >&6
17587else
17588  case $BUILD_LD in
17589  [\\/]* | ?:[\\/]*)
17590  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17591  ;;
17592  *)
17593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17594for as_dir in $PATH
17595do
17596  IFS=$as_save_IFS
17597  test -z "$as_dir" && as_dir=.
17598    for ac_exec_ext in '' $ac_executable_extensions; do
17599  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17600    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17602    break 2
17603  fi
17604done
17605  done
17606IFS=$as_save_IFS
17607
17608  ;;
17609esac
17610fi
17611BUILD_LD=$ac_cv_path_BUILD_LD
17612if test -n "$BUILD_LD"; then
17613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17614$as_echo "$BUILD_LD" >&6; }
17615else
17616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17617$as_echo "no" >&6; }
17618fi
17619
17620
17621
17622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17623
17624  # First separate the path from the arguments. This will split at the first
17625  # space.
17626  complete="$BUILD_LD"
17627  path="${complete%% *}"
17628  tmp="$complete EOL"
17629  arguments="${tmp#* }"
17630
17631  # Input might be given as Windows format, start by converting to
17632  # unix format.
17633  new_path=`$CYGPATH -u "$path"`
17634
17635  # Now try to locate executable using which
17636  new_path=`$WHICH "$new_path" 2> /dev/null`
17637  # bat and cmd files are not always considered executable in cygwin causing which
17638  # to not find them
17639  if test "x$new_path" = x \
17640           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17641           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17642    new_path=`$CYGPATH -u "$path"`
17643  fi
17644  if test "x$new_path" = x; then
17645    # Oops. Which didn't find the executable.
17646    # The splitting of arguments from the executable at a space might have been incorrect,
17647    # since paths with space are more likely in Windows. Give it another try with the whole
17648    # argument.
17649    path="$complete"
17650    arguments="EOL"
17651    new_path=`$CYGPATH -u "$path"`
17652    new_path=`$WHICH "$new_path" 2> /dev/null`
17653    # bat and cmd files are not always considered executable in cygwin causing which
17654    # to not find them
17655    if test "x$new_path" = x \
17656             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17657             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17658      new_path=`$CYGPATH -u "$path"`
17659    fi
17660    if test "x$new_path" = x; then
17661      # It's still not found. Now this is an unrecoverable error.
17662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17663$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17664      has_space=`$ECHO "$complete" | $GREP " "`
17665      if test "x$has_space" != x; then
17666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17668      fi
17669      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17670    fi
17671  fi
17672
17673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17676  # "foo.exe" is OK but "foo" is an error.
17677  #
17678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17679  # It is also a way to make sure we got the proper file name for the real test later on.
17680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17681  if test "x$test_shortpath" = x; then
17682    # Short path failed, file does not exist as specified.
17683    # Try adding .exe or .cmd
17684    if test -f "${new_path}.exe"; then
17685       input_to_shortpath="${new_path}.exe"
17686    elif test -f "${new_path}.cmd"; then
17687       input_to_shortpath="${new_path}.cmd"
17688    else
17689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17690$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17693      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17694    fi
17695  else
17696    input_to_shortpath="$new_path"
17697  fi
17698
17699  # Call helper function which possibly converts this using DOS-style short mode.
17700  # If so, the updated path is stored in $new_path.
17701  new_path="$input_to_shortpath"
17702
17703  input_path="$input_to_shortpath"
17704  # Check if we need to convert this using DOS-style short mode. If the path
17705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17706  # take no chances and rewrite it.
17707  # Note: m4 eats our [], so we need to use [ and ] instead.
17708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17709  if test "x$has_forbidden_chars" != x; then
17710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17714      # Going to short mode and back again did indeed matter. Since short mode is
17715      # case insensitive, let's make it lowercase to improve readability.
17716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17717      # Now convert it back to Unix-stile (cygpath)
17718      input_path=`$CYGPATH -u "$shortmode_path"`
17719      new_path="$input_path"
17720    fi
17721  fi
17722
17723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17724  if test "x$test_cygdrive_prefix" = x; then
17725    # As a simple fix, exclude /usr/bin since it's not a real path.
17726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17728      # a path prefixed by /cygdrive for fixpath to work.
17729      new_path="$CYGWIN_ROOT_PATH$input_path"
17730    fi
17731  fi
17732
17733  # remove trailing .exe if any
17734  new_path="${new_path/%.exe/}"
17735
17736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17737
17738  # First separate the path from the arguments. This will split at the first
17739  # space.
17740  complete="$BUILD_LD"
17741  path="${complete%% *}"
17742  tmp="$complete EOL"
17743  arguments="${tmp#* }"
17744
17745  # Input might be given as Windows format, start by converting to
17746  # unix format.
17747  new_path="$path"
17748
17749  windows_path="$new_path"
17750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17751    unix_path=`$CYGPATH -u "$windows_path"`
17752    new_path="$unix_path"
17753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17755    new_path="$unix_path"
17756  fi
17757
17758
17759  # Now try to locate executable using which
17760  new_path=`$WHICH "$new_path" 2> /dev/null`
17761
17762  if test "x$new_path" = x; then
17763    # Oops. Which didn't find the executable.
17764    # The splitting of arguments from the executable at a space might have been incorrect,
17765    # since paths with space are more likely in Windows. Give it another try with the whole
17766    # argument.
17767    path="$complete"
17768    arguments="EOL"
17769    new_path="$path"
17770
17771  windows_path="$new_path"
17772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17773    unix_path=`$CYGPATH -u "$windows_path"`
17774    new_path="$unix_path"
17775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17777    new_path="$unix_path"
17778  fi
17779
17780
17781    new_path=`$WHICH "$new_path" 2> /dev/null`
17782
17783    if test "x$new_path" = x; then
17784      # It's still not found. Now this is an unrecoverable error.
17785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17786$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17787      has_space=`$ECHO "$complete" | $GREP " "`
17788      if test "x$has_space" != x; then
17789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17791      fi
17792      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17793    fi
17794  fi
17795
17796  # Now new_path has a complete unix path to the binary
17797  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17798    # Keep paths in /bin as-is, but remove trailing .exe if any
17799    new_path="${new_path/%.exe/}"
17800    # Do not save /bin paths to all_fixpath_prefixes!
17801  else
17802    # Not in mixed or Windows style, start by that.
17803    new_path=`cmd //c echo $new_path`
17804
17805  input_path="$new_path"
17806  # Check if we need to convert this using DOS-style short mode. If the path
17807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17808  # take no chances and rewrite it.
17809  # Note: m4 eats our [], so we need to use [ and ] instead.
17810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17811  if test "x$has_forbidden_chars" != x; then
17812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17814  fi
17815
17816    # Output is in $new_path
17817
17818  windows_path="$new_path"
17819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17820    unix_path=`$CYGPATH -u "$windows_path"`
17821    new_path="$unix_path"
17822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17824    new_path="$unix_path"
17825  fi
17826
17827    # remove trailing .exe if any
17828    new_path="${new_path/%.exe/}"
17829
17830    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17831    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17832  fi
17833
17834  else
17835    # We're on a posix platform. Hooray! :)
17836    # First separate the path from the arguments. This will split at the first
17837    # space.
17838    complete="$BUILD_LD"
17839    path="${complete%% *}"
17840    tmp="$complete EOL"
17841    arguments="${tmp#* }"
17842
17843    # Cannot rely on the command "which" here since it doesn't always work.
17844    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17845    if test -z "$is_absolute_path"; then
17846      # Path to executable is not absolute. Find it.
17847      IFS_save="$IFS"
17848      IFS=:
17849      for p in $PATH; do
17850        if test -f "$p/$path" && test -x "$p/$path"; then
17851          new_path="$p/$path"
17852          break
17853        fi
17854      done
17855      IFS="$IFS_save"
17856    else
17857      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17858$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17859      new_path="$path"
17860    fi
17861
17862    if test "x$new_path" = x; then
17863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17864$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17865        has_space=`$ECHO "$complete" | $GREP " "`
17866        if test "x$has_space" != x; then
17867          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17868$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17869        fi
17870        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17871      fi
17872  fi
17873
17874      # Now join together the path and the arguments once again
17875      if test "x$arguments" != xEOL; then
17876        new_complete="$new_path ${arguments% *}"
17877      else
17878        new_complete="$new_path"
17879      fi
17880
17881  if test "x$complete" != "x$new_complete"; then
17882      BUILD_LD="$new_complete"
17883      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17884$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17885    fi
17886
17887fi
17888
17889
17890
17891
17892# If a devkit is found on the builddeps server, then prepend its path to the
17893# PATH variable. If there are cross compilers available in the devkit, these
17894# will be found by AC_PROG_CC et al.
17895DEVKIT=
17896
17897
17898    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17899        # Source the builddeps file again, to make sure it uses the latest variables!
17900        . $builddepsfile
17901        # Look for a target and build machine specific resource!
17902        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17903        if test "x$resource" = x; then
17904            # Ok, lets instead look for a target specific resource
17905            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17906        fi
17907        if test "x$resource" = x; then
17908            # Ok, lets instead look for a build specific resource
17909            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17910        fi
17911        if test "x$resource" = x; then
17912            # Ok, lets instead look for a generic resource
17913            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17914            resource=${builddep_devkit}
17915        fi
17916        if test "x$resource" != x; then
17917            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17918$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17919	    # If the resource in the builddeps.conf file is an existing directory,
17920	    # for example /java/linux/cups
17921	    if test -d ${resource}; then
17922	       depdir=${resource}
17923	    else
17924
17925# devkit is for example mymodule
17926# $resource is for example libs/general/libmymod_1_2_3.zip
17927# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17928# $with_builddeps_dir is for example /localhome/builddeps
17929# depdir is the name of the variable into which we store the depdir, eg MYMOD
17930# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17931# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17932    filename=`basename $resource`
17933    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17934    filebase=${filename%%.*}
17935    extension=${filename#*.}
17936    installdir=$with_builddeps_dir/$filebase
17937    if test ! -f $installdir/$filename.unpacked; then
17938        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17939$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17940        if test ! -d $installdir; then
17941            mkdir -p $installdir
17942        fi
17943        if test ! -d $installdir; then
17944            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17945        fi
17946        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17947        touch $tmpfile
17948        if test ! -f $tmpfile; then
17949            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17950        fi
17951
17952    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17953    # $tmpfile is the local file name for the downloaded file.
17954    VALID_TOOL=no
17955    if test "x$BDEPS_FTP" = xwget; then
17956       VALID_TOOL=yes
17957       wget -O $tmpfile $with_builddeps_server/$resource
17958    fi
17959    if test "x$BDEPS_FTP" = xlftp; then
17960       VALID_TOOL=yes
17961       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17962    fi
17963    if test "x$BDEPS_FTP" = xftp; then
17964        VALID_TOOL=yes
17965        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17966        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17967        FTPUSERPWD=${FTPSERVER%%@*}
17968        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17969            FTPUSER=${userpwd%%:*}
17970            FTPPWD=${userpwd#*@}
17971            FTPSERVER=${FTPSERVER#*@}
17972        else
17973            FTPUSER=ftp
17974            FTPPWD=ftp
17975        fi
17976        # the "pass" command does not work on some
17977        # ftp clients (read ftp.exe) but if it works,
17978        # passive mode is better!
17979        (\
17980            echo "user $FTPUSER $FTPPWD"        ;\
17981            echo "pass"                         ;\
17982            echo "bin"                          ;\
17983            echo "get $FTPPATH $tmpfile"              ;\
17984        ) | ftp -in $FTPSERVER
17985    fi
17986    if test "x$VALID_TOOL" != xyes; then
17987       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17988    fi
17989
17990        mv $tmpfile $installdir/$filename
17991        if test ! -s $installdir/$filename; then
17992            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17993        fi
17994        case "$extension" in
17995            zip)  echo "Unzipping $installdir/$filename..."
17996               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17997            ;;
17998            tar.gz) echo "Untaring $installdir/$filename..."
17999               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18000            ;;
18001            tgz) echo "Untaring $installdir/$filename..."
18002               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18003            ;;
18004            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18005            ;;
18006        esac
18007    fi
18008    if test -f $installdir/$filename.unpacked; then
18009        depdir=$installdir
18010    fi
18011
18012	    fi
18013            # Source the builddeps file again, because in the previous command, the depdir
18014            # was updated to point at the current build dependency install directory.
18015            . $builddepsfile
18016            # Now extract variables from the builddeps.conf files.
18017            theroot=${builddep_devkit_ROOT}
18018            thecflags=${builddep_devkit_CFLAGS}
18019            thelibs=${builddep_devkit_LIBS}
18020            if test "x$depdir" = x; then
18021                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18022            fi
18023            DEVKIT=$depdir
18024            if test "x$theroot" != x; then
18025               DEVKIT="$theroot"
18026            fi
18027            if test "x$thecflags" != x; then
18028               DEVKIT_CFLAGS="$thecflags"
18029            fi
18030            if test "x$thelibs" != x; then
18031               DEVKIT_LIBS="$thelibs"
18032            fi
18033            # Found devkit
18034                     PATH="$DEVKIT/bin:$PATH"
18035                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18036                     if test "x$x_includes" = "xNONE"; then
18037                         x_includes="$SYS_ROOT/usr/include/X11"
18038                     fi
18039                     if test "x$x_libraries" = "xNONE"; then
18040                         x_libraries="$SYS_ROOT/usr/lib"
18041                     fi
18042
18043
18044        fi
18045
18046    fi
18047
18048
18049if test "x$SYS_ROOT" != "x/" ; then
18050    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18051    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18052    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18053    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18054    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18055    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18056fi
18057
18058# Store the CFLAGS etal passed to the configure script.
18059ORG_CFLAGS="$CFLAGS"
18060ORG_CXXFLAGS="$CXXFLAGS"
18061ORG_OBJCFLAGS="$OBJCFLAGS"
18062
18063# autoconf magic only relies on PATH, so update it if tools dir is specified
18064OLD_PATH="$PATH"
18065if test "x$TOOLS_DIR" != x; then
18066  PATH=$TOOLS_DIR:$PATH
18067fi
18068
18069
18070### Locate C compiler (CC)
18071
18072# gcc is almost always present, but on Windows we
18073# prefer cl.exe and on Solaris we prefer CC.
18074# Thus test for them in this order.
18075if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18076  # Do not probe for cc on MacOSX.
18077  COMPILER_CHECK_LIST="cl gcc"
18078else
18079  COMPILER_CHECK_LIST="cl cc gcc"
18080fi
18081
18082
18083  COMPILER_NAME=C
18084
18085  CC=
18086  # If TOOLS_DIR is set, check for all compiler names in there first
18087  # before checking the rest of the PATH.
18088  if test -n "$TOOLS_DIR"; then
18089    PATH_save="$PATH"
18090    PATH="$TOOLS_DIR"
18091    for ac_prog in $COMPILER_CHECK_LIST
18092do
18093  # Extract the first word of "$ac_prog", so it can be a program name with args.
18094set dummy $ac_prog; ac_word=$2
18095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18096$as_echo_n "checking for $ac_word... " >&6; }
18097if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18098  $as_echo_n "(cached) " >&6
18099else
18100  case $TOOLS_DIR_CC in
18101  [\\/]* | ?:[\\/]*)
18102  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18103  ;;
18104  *)
18105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18106for as_dir in $PATH
18107do
18108  IFS=$as_save_IFS
18109  test -z "$as_dir" && as_dir=.
18110    for ac_exec_ext in '' $ac_executable_extensions; do
18111  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18112    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18114    break 2
18115  fi
18116done
18117  done
18118IFS=$as_save_IFS
18119
18120  ;;
18121esac
18122fi
18123TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18124if test -n "$TOOLS_DIR_CC"; then
18125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18126$as_echo "$TOOLS_DIR_CC" >&6; }
18127else
18128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18129$as_echo "no" >&6; }
18130fi
18131
18132
18133  test -n "$TOOLS_DIR_CC" && break
18134done
18135
18136    CC=$TOOLS_DIR_CC
18137    PATH="$PATH_save"
18138  fi
18139
18140  # AC_PATH_PROGS can't be run multiple times with the same variable,
18141  # so create a new name for this run.
18142  if test "x$CC" = x; then
18143    for ac_prog in $COMPILER_CHECK_LIST
18144do
18145  # Extract the first word of "$ac_prog", so it can be a program name with args.
18146set dummy $ac_prog; ac_word=$2
18147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18148$as_echo_n "checking for $ac_word... " >&6; }
18149if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18150  $as_echo_n "(cached) " >&6
18151else
18152  case $POTENTIAL_CC in
18153  [\\/]* | ?:[\\/]*)
18154  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18155  ;;
18156  *)
18157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18158for as_dir in $PATH
18159do
18160  IFS=$as_save_IFS
18161  test -z "$as_dir" && as_dir=.
18162    for ac_exec_ext in '' $ac_executable_extensions; do
18163  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18164    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18166    break 2
18167  fi
18168done
18169  done
18170IFS=$as_save_IFS
18171
18172  ;;
18173esac
18174fi
18175POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18176if test -n "$POTENTIAL_CC"; then
18177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18178$as_echo "$POTENTIAL_CC" >&6; }
18179else
18180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18181$as_echo "no" >&6; }
18182fi
18183
18184
18185  test -n "$POTENTIAL_CC" && break
18186done
18187
18188    CC=$POTENTIAL_CC
18189  fi
18190
18191  if test "x$CC" = x; then
18192
18193    # Print a helpful message on how to acquire the necessary build dependency.
18194    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18195    MISSING_DEPENDENCY=devkit
18196    PKGHANDLER_COMMAND=
18197
18198    case $PKGHANDLER in
18199	apt-get)
18200                apt_help     $MISSING_DEPENDENCY ;;
18201    yum)
18202                yum_help     $MISSING_DEPENDENCY ;;
18203	port)
18204                port_help    $MISSING_DEPENDENCY ;;
18205	pkgutil)
18206                pkgutil_help $MISSING_DEPENDENCY ;;
18207	pkgadd)
18208                pkgadd_help  $MISSING_DEPENDENCY ;;
18209    * )
18210      break ;;
18211    esac
18212
18213    if test "x$PKGHANDLER_COMMAND" != x; then
18214        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18215    fi
18216
18217      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18218  fi
18219
18220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18221
18222  # First separate the path from the arguments. This will split at the first
18223  # space.
18224  complete="$CC"
18225  path="${complete%% *}"
18226  tmp="$complete EOL"
18227  arguments="${tmp#* }"
18228
18229  # Input might be given as Windows format, start by converting to
18230  # unix format.
18231  new_path=`$CYGPATH -u "$path"`
18232
18233  # Now try to locate executable using which
18234  new_path=`$WHICH "$new_path" 2> /dev/null`
18235  # bat and cmd files are not always considered executable in cygwin causing which
18236  # to not find them
18237  if test "x$new_path" = x \
18238           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18239           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18240    new_path=`$CYGPATH -u "$path"`
18241  fi
18242  if test "x$new_path" = x; then
18243    # Oops. Which didn't find the executable.
18244    # The splitting of arguments from the executable at a space might have been incorrect,
18245    # since paths with space are more likely in Windows. Give it another try with the whole
18246    # argument.
18247    path="$complete"
18248    arguments="EOL"
18249    new_path=`$CYGPATH -u "$path"`
18250    new_path=`$WHICH "$new_path" 2> /dev/null`
18251    # bat and cmd files are not always considered executable in cygwin causing which
18252    # to not find them
18253    if test "x$new_path" = x \
18254             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18255             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18256      new_path=`$CYGPATH -u "$path"`
18257    fi
18258    if test "x$new_path" = x; then
18259      # It's still not found. Now this is an unrecoverable error.
18260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18261$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18262      has_space=`$ECHO "$complete" | $GREP " "`
18263      if test "x$has_space" != x; then
18264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18266      fi
18267      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18268    fi
18269  fi
18270
18271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18274  # "foo.exe" is OK but "foo" is an error.
18275  #
18276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18277  # It is also a way to make sure we got the proper file name for the real test later on.
18278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18279  if test "x$test_shortpath" = x; then
18280    # Short path failed, file does not exist as specified.
18281    # Try adding .exe or .cmd
18282    if test -f "${new_path}.exe"; then
18283       input_to_shortpath="${new_path}.exe"
18284    elif test -f "${new_path}.cmd"; then
18285       input_to_shortpath="${new_path}.cmd"
18286    else
18287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18288$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18289      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18290$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18291      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18292    fi
18293  else
18294    input_to_shortpath="$new_path"
18295  fi
18296
18297  # Call helper function which possibly converts this using DOS-style short mode.
18298  # If so, the updated path is stored in $new_path.
18299  new_path="$input_to_shortpath"
18300
18301  input_path="$input_to_shortpath"
18302  # Check if we need to convert this using DOS-style short mode. If the path
18303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18304  # take no chances and rewrite it.
18305  # Note: m4 eats our [], so we need to use [ and ] instead.
18306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18307  if test "x$has_forbidden_chars" != x; then
18308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18312      # Going to short mode and back again did indeed matter. Since short mode is
18313      # case insensitive, let's make it lowercase to improve readability.
18314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18315      # Now convert it back to Unix-stile (cygpath)
18316      input_path=`$CYGPATH -u "$shortmode_path"`
18317      new_path="$input_path"
18318    fi
18319  fi
18320
18321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18322  if test "x$test_cygdrive_prefix" = x; then
18323    # As a simple fix, exclude /usr/bin since it's not a real path.
18324    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18326      # a path prefixed by /cygdrive for fixpath to work.
18327      new_path="$CYGWIN_ROOT_PATH$input_path"
18328    fi
18329  fi
18330
18331  # remove trailing .exe if any
18332  new_path="${new_path/%.exe/}"
18333
18334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18335
18336  # First separate the path from the arguments. This will split at the first
18337  # space.
18338  complete="$CC"
18339  path="${complete%% *}"
18340  tmp="$complete EOL"
18341  arguments="${tmp#* }"
18342
18343  # Input might be given as Windows format, start by converting to
18344  # unix format.
18345  new_path="$path"
18346
18347  windows_path="$new_path"
18348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18349    unix_path=`$CYGPATH -u "$windows_path"`
18350    new_path="$unix_path"
18351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18353    new_path="$unix_path"
18354  fi
18355
18356
18357  # Now try to locate executable using which
18358  new_path=`$WHICH "$new_path" 2> /dev/null`
18359
18360  if test "x$new_path" = x; then
18361    # Oops. Which didn't find the executable.
18362    # The splitting of arguments from the executable at a space might have been incorrect,
18363    # since paths with space are more likely in Windows. Give it another try with the whole
18364    # argument.
18365    path="$complete"
18366    arguments="EOL"
18367    new_path="$path"
18368
18369  windows_path="$new_path"
18370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18371    unix_path=`$CYGPATH -u "$windows_path"`
18372    new_path="$unix_path"
18373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18375    new_path="$unix_path"
18376  fi
18377
18378
18379    new_path=`$WHICH "$new_path" 2> /dev/null`
18380
18381    if test "x$new_path" = x; then
18382      # It's still not found. Now this is an unrecoverable error.
18383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18384$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18385      has_space=`$ECHO "$complete" | $GREP " "`
18386      if test "x$has_space" != x; then
18387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18389      fi
18390      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18391    fi
18392  fi
18393
18394  # Now new_path has a complete unix path to the binary
18395  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18396    # Keep paths in /bin as-is, but remove trailing .exe if any
18397    new_path="${new_path/%.exe/}"
18398    # Do not save /bin paths to all_fixpath_prefixes!
18399  else
18400    # Not in mixed or Windows style, start by that.
18401    new_path=`cmd //c echo $new_path`
18402
18403  input_path="$new_path"
18404  # Check if we need to convert this using DOS-style short mode. If the path
18405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18406  # take no chances and rewrite it.
18407  # Note: m4 eats our [], so we need to use [ and ] instead.
18408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18409  if test "x$has_forbidden_chars" != x; then
18410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18412  fi
18413
18414    # Output is in $new_path
18415
18416  windows_path="$new_path"
18417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18418    unix_path=`$CYGPATH -u "$windows_path"`
18419    new_path="$unix_path"
18420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18422    new_path="$unix_path"
18423  fi
18424
18425    # remove trailing .exe if any
18426    new_path="${new_path/%.exe/}"
18427
18428    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18429    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18430  fi
18431
18432  else
18433    # We're on a posix platform. Hooray! :)
18434    # First separate the path from the arguments. This will split at the first
18435    # space.
18436    complete="$CC"
18437    path="${complete%% *}"
18438    tmp="$complete EOL"
18439    arguments="${tmp#* }"
18440
18441    # Cannot rely on the command "which" here since it doesn't always work.
18442    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18443    if test -z "$is_absolute_path"; then
18444      # Path to executable is not absolute. Find it.
18445      IFS_save="$IFS"
18446      IFS=:
18447      for p in $PATH; do
18448        if test -f "$p/$path" && test -x "$p/$path"; then
18449          new_path="$p/$path"
18450          break
18451        fi
18452      done
18453      IFS="$IFS_save"
18454    else
18455      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18456$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18457      new_path="$path"
18458    fi
18459
18460    if test "x$new_path" = x; then
18461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18462$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18463        has_space=`$ECHO "$complete" | $GREP " "`
18464        if test "x$has_space" != x; then
18465          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18466$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18467        fi
18468        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18469      fi
18470  fi
18471
18472      # Now join together the path and the arguments once again
18473      if test "x$arguments" != xEOL; then
18474        new_complete="$new_path ${arguments% *}"
18475      else
18476        new_complete="$new_path"
18477      fi
18478
18479  if test "x$complete" != "x$new_complete"; then
18480      CC="$new_complete"
18481      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18482$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18483    fi
18484
18485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18486$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18487  TEST_COMPILER="$CC"
18488
18489    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18490        # Follow a chain of symbolic links. Use readlink
18491        # where it exists, else fall back to horribly
18492        # complicated shell code.
18493        if test "x$READLINK_TESTED" != yes; then
18494            # On MacOSX there is a readlink tool with a different
18495            # purpose than the GNU readlink tool. Check the found readlink.
18496            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18497            if test "x$ISGNU" = x; then
18498                 # A readlink that we do not know how to use.
18499                 # Are there other non-GNU readlinks out there?
18500                 READLINK_TESTED=yes
18501                 READLINK=
18502            fi
18503        fi
18504
18505        if test "x$READLINK" != x; then
18506            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18507        else
18508            # Save the current directory for restoring afterwards
18509            STARTDIR=$PWD
18510            COUNTER=0
18511            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18512            sym_link_file=`$BASENAME $TEST_COMPILER`
18513            # Use the system pwd and not the shell builtin to resolve directory symlinks
18514            cd $sym_link_dir
18515            cd `$THEPWDCMD`
18516            sym_link_dir=`$THEPWDCMD`
18517            # Resolve file symlinks
18518            while test $COUNTER -lt 20; do
18519                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18520                if test "x$ISLINK" == x; then
18521                    # This is not a symbolic link! We are done!
18522                    break
18523                fi
18524                # Again resolve directory symlinks since the target of the just found
18525                # link could be in a different directory
18526                cd `$DIRNAME $ISLINK`
18527                sym_link_dir=`$THEPWDCMD`
18528                sym_link_file=`$BASENAME $ISLINK`
18529                let COUNTER=COUNTER+1
18530            done
18531            cd $STARTDIR
18532            TEST_COMPILER=$sym_link_dir/$sym_link_file
18533        fi
18534    fi
18535
18536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18537$as_echo "$TEST_COMPILER" >&6; }
18538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18539$as_echo_n "checking if CC is disguised ccache... " >&6; }
18540
18541  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18542  if test "x$COMPILER_BASENAME" = "xccache"; then
18543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18544$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18545    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18546    # We want to control ccache invocation ourselves, so ignore this cc and try
18547    # searching again.
18548
18549    # Remove the path to the fake ccache cc from the PATH
18550    RETRY_COMPILER_SAVED_PATH="$PATH"
18551    COMPILER_DIRNAME=`$DIRNAME $CC`
18552    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18553
18554    # Try again looking for our compiler
18555    if test -n "$ac_tool_prefix"; then
18556  for ac_prog in $COMPILER_CHECK_LIST
18557  do
18558    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18559set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18561$as_echo_n "checking for $ac_word... " >&6; }
18562if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18563  $as_echo_n "(cached) " >&6
18564else
18565  if test -n "$PROPER_COMPILER_CC"; then
18566  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18567else
18568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18569for as_dir in $PATH
18570do
18571  IFS=$as_save_IFS
18572  test -z "$as_dir" && as_dir=.
18573    for ac_exec_ext in '' $ac_executable_extensions; do
18574  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18575    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18577    break 2
18578  fi
18579done
18580  done
18581IFS=$as_save_IFS
18582
18583fi
18584fi
18585PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18586if test -n "$PROPER_COMPILER_CC"; then
18587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18588$as_echo "$PROPER_COMPILER_CC" >&6; }
18589else
18590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18591$as_echo "no" >&6; }
18592fi
18593
18594
18595    test -n "$PROPER_COMPILER_CC" && break
18596  done
18597fi
18598if test -z "$PROPER_COMPILER_CC"; then
18599  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18600  for ac_prog in $COMPILER_CHECK_LIST
18601do
18602  # Extract the first word of "$ac_prog", so it can be a program name with args.
18603set dummy $ac_prog; ac_word=$2
18604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18605$as_echo_n "checking for $ac_word... " >&6; }
18606if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18607  $as_echo_n "(cached) " >&6
18608else
18609  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18610  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18611else
18612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18613for as_dir in $PATH
18614do
18615  IFS=$as_save_IFS
18616  test -z "$as_dir" && as_dir=.
18617    for ac_exec_ext in '' $ac_executable_extensions; do
18618  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18619    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18621    break 2
18622  fi
18623done
18624  done
18625IFS=$as_save_IFS
18626
18627fi
18628fi
18629ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18630if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18632$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18633else
18634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18635$as_echo "no" >&6; }
18636fi
18637
18638
18639  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18640done
18641
18642  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18643    PROPER_COMPILER_CC=""
18644  else
18645    case $cross_compiling:$ac_tool_warned in
18646yes:)
18647{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18648$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18649ac_tool_warned=yes ;;
18650esac
18651    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18652  fi
18653fi
18654
18655
18656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18657
18658  # First separate the path from the arguments. This will split at the first
18659  # space.
18660  complete="$PROPER_COMPILER_CC"
18661  path="${complete%% *}"
18662  tmp="$complete EOL"
18663  arguments="${tmp#* }"
18664
18665  # Input might be given as Windows format, start by converting to
18666  # unix format.
18667  new_path=`$CYGPATH -u "$path"`
18668
18669  # Now try to locate executable using which
18670  new_path=`$WHICH "$new_path" 2> /dev/null`
18671  # bat and cmd files are not always considered executable in cygwin causing which
18672  # to not find them
18673  if test "x$new_path" = x \
18674           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18675           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18676    new_path=`$CYGPATH -u "$path"`
18677  fi
18678  if test "x$new_path" = x; then
18679    # Oops. Which didn't find the executable.
18680    # The splitting of arguments from the executable at a space might have been incorrect,
18681    # since paths with space are more likely in Windows. Give it another try with the whole
18682    # argument.
18683    path="$complete"
18684    arguments="EOL"
18685    new_path=`$CYGPATH -u "$path"`
18686    new_path=`$WHICH "$new_path" 2> /dev/null`
18687    # bat and cmd files are not always considered executable in cygwin causing which
18688    # to not find them
18689    if test "x$new_path" = x \
18690             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18691             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18692      new_path=`$CYGPATH -u "$path"`
18693    fi
18694    if test "x$new_path" = x; then
18695      # It's still not found. Now this is an unrecoverable error.
18696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18697$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18698      has_space=`$ECHO "$complete" | $GREP " "`
18699      if test "x$has_space" != x; then
18700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18702      fi
18703      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18704    fi
18705  fi
18706
18707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18710  # "foo.exe" is OK but "foo" is an error.
18711  #
18712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18713  # It is also a way to make sure we got the proper file name for the real test later on.
18714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18715  if test "x$test_shortpath" = x; then
18716    # Short path failed, file does not exist as specified.
18717    # Try adding .exe or .cmd
18718    if test -f "${new_path}.exe"; then
18719       input_to_shortpath="${new_path}.exe"
18720    elif test -f "${new_path}.cmd"; then
18721       input_to_shortpath="${new_path}.cmd"
18722    else
18723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18724$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18727      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18728    fi
18729  else
18730    input_to_shortpath="$new_path"
18731  fi
18732
18733  # Call helper function which possibly converts this using DOS-style short mode.
18734  # If so, the updated path is stored in $new_path.
18735  new_path="$input_to_shortpath"
18736
18737  input_path="$input_to_shortpath"
18738  # Check if we need to convert this using DOS-style short mode. If the path
18739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18740  # take no chances and rewrite it.
18741  # Note: m4 eats our [], so we need to use [ and ] instead.
18742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18743  if test "x$has_forbidden_chars" != x; then
18744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18748      # Going to short mode and back again did indeed matter. Since short mode is
18749      # case insensitive, let's make it lowercase to improve readability.
18750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18751      # Now convert it back to Unix-stile (cygpath)
18752      input_path=`$CYGPATH -u "$shortmode_path"`
18753      new_path="$input_path"
18754    fi
18755  fi
18756
18757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18758  if test "x$test_cygdrive_prefix" = x; then
18759    # As a simple fix, exclude /usr/bin since it's not a real path.
18760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18762      # a path prefixed by /cygdrive for fixpath to work.
18763      new_path="$CYGWIN_ROOT_PATH$input_path"
18764    fi
18765  fi
18766
18767  # remove trailing .exe if any
18768  new_path="${new_path/%.exe/}"
18769
18770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18771
18772  # First separate the path from the arguments. This will split at the first
18773  # space.
18774  complete="$PROPER_COMPILER_CC"
18775  path="${complete%% *}"
18776  tmp="$complete EOL"
18777  arguments="${tmp#* }"
18778
18779  # Input might be given as Windows format, start by converting to
18780  # unix format.
18781  new_path="$path"
18782
18783  windows_path="$new_path"
18784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18785    unix_path=`$CYGPATH -u "$windows_path"`
18786    new_path="$unix_path"
18787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18789    new_path="$unix_path"
18790  fi
18791
18792
18793  # Now try to locate executable using which
18794  new_path=`$WHICH "$new_path" 2> /dev/null`
18795
18796  if test "x$new_path" = x; then
18797    # Oops. Which didn't find the executable.
18798    # The splitting of arguments from the executable at a space might have been incorrect,
18799    # since paths with space are more likely in Windows. Give it another try with the whole
18800    # argument.
18801    path="$complete"
18802    arguments="EOL"
18803    new_path="$path"
18804
18805  windows_path="$new_path"
18806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18807    unix_path=`$CYGPATH -u "$windows_path"`
18808    new_path="$unix_path"
18809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18811    new_path="$unix_path"
18812  fi
18813
18814
18815    new_path=`$WHICH "$new_path" 2> /dev/null`
18816
18817    if test "x$new_path" = x; then
18818      # It's still not found. Now this is an unrecoverable error.
18819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18820$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18821      has_space=`$ECHO "$complete" | $GREP " "`
18822      if test "x$has_space" != x; then
18823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18825      fi
18826      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18827    fi
18828  fi
18829
18830  # Now new_path has a complete unix path to the binary
18831  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18832    # Keep paths in /bin as-is, but remove trailing .exe if any
18833    new_path="${new_path/%.exe/}"
18834    # Do not save /bin paths to all_fixpath_prefixes!
18835  else
18836    # Not in mixed or Windows style, start by that.
18837    new_path=`cmd //c echo $new_path`
18838
18839  input_path="$new_path"
18840  # Check if we need to convert this using DOS-style short mode. If the path
18841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18842  # take no chances and rewrite it.
18843  # Note: m4 eats our [], so we need to use [ and ] instead.
18844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18845  if test "x$has_forbidden_chars" != x; then
18846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18848  fi
18849
18850    # Output is in $new_path
18851
18852  windows_path="$new_path"
18853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18854    unix_path=`$CYGPATH -u "$windows_path"`
18855    new_path="$unix_path"
18856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18858    new_path="$unix_path"
18859  fi
18860
18861    # remove trailing .exe if any
18862    new_path="${new_path/%.exe/}"
18863
18864    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18865    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18866  fi
18867
18868  else
18869    # We're on a posix platform. Hooray! :)
18870    # First separate the path from the arguments. This will split at the first
18871    # space.
18872    complete="$PROPER_COMPILER_CC"
18873    path="${complete%% *}"
18874    tmp="$complete EOL"
18875    arguments="${tmp#* }"
18876
18877    # Cannot rely on the command "which" here since it doesn't always work.
18878    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18879    if test -z "$is_absolute_path"; then
18880      # Path to executable is not absolute. Find it.
18881      IFS_save="$IFS"
18882      IFS=:
18883      for p in $PATH; do
18884        if test -f "$p/$path" && test -x "$p/$path"; then
18885          new_path="$p/$path"
18886          break
18887        fi
18888      done
18889      IFS="$IFS_save"
18890    else
18891      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18892$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18893      new_path="$path"
18894    fi
18895
18896    if test "x$new_path" = x; then
18897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18898$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18899        has_space=`$ECHO "$complete" | $GREP " "`
18900        if test "x$has_space" != x; then
18901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18903        fi
18904        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18905      fi
18906  fi
18907
18908      # Now join together the path and the arguments once again
18909      if test "x$arguments" != xEOL; then
18910        new_complete="$new_path ${arguments% *}"
18911      else
18912        new_complete="$new_path"
18913      fi
18914
18915  if test "x$complete" != "x$new_complete"; then
18916      PROPER_COMPILER_CC="$new_complete"
18917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18918$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18919    fi
18920
18921    PATH="$RETRY_COMPILER_SAVED_PATH"
18922
18923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18924$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18925
18926    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18927        # Follow a chain of symbolic links. Use readlink
18928        # where it exists, else fall back to horribly
18929        # complicated shell code.
18930        if test "x$READLINK_TESTED" != yes; then
18931            # On MacOSX there is a readlink tool with a different
18932            # purpose than the GNU readlink tool. Check the found readlink.
18933            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18934            if test "x$ISGNU" = x; then
18935                 # A readlink that we do not know how to use.
18936                 # Are there other non-GNU readlinks out there?
18937                 READLINK_TESTED=yes
18938                 READLINK=
18939            fi
18940        fi
18941
18942        if test "x$READLINK" != x; then
18943            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18944        else
18945            # Save the current directory for restoring afterwards
18946            STARTDIR=$PWD
18947            COUNTER=0
18948            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18949            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18950            # Use the system pwd and not the shell builtin to resolve directory symlinks
18951            cd $sym_link_dir
18952            cd `$THEPWDCMD`
18953            sym_link_dir=`$THEPWDCMD`
18954            # Resolve file symlinks
18955            while test $COUNTER -lt 20; do
18956                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18957                if test "x$ISLINK" == x; then
18958                    # This is not a symbolic link! We are done!
18959                    break
18960                fi
18961                # Again resolve directory symlinks since the target of the just found
18962                # link could be in a different directory
18963                cd `$DIRNAME $ISLINK`
18964                sym_link_dir=`$THEPWDCMD`
18965                sym_link_file=`$BASENAME $ISLINK`
18966                let COUNTER=COUNTER+1
18967            done
18968            cd $STARTDIR
18969            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18970        fi
18971    fi
18972
18973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18974$as_echo "$PROPER_COMPILER_CC" >&6; }
18975    CC="$PROPER_COMPILER_CC"
18976  else
18977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18978$as_echo "no, keeping CC" >&6; }
18979    CC="$TEST_COMPILER"
18980  fi
18981
18982  COMPILER=$CC
18983  COMPILER_NAME=$COMPILER_NAME
18984
18985  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18986    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18987    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18988    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18989    if test $? -ne 0; then
18990      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18991
18992      { $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
18993$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18994      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18995$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18996      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18997    else
18998      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18999      COMPILER_VENDOR="Sun Studio"
19000    fi
19001  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19002    # First line typically looks something like:
19003    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19004    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19005    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19006    COMPILER_VENDOR="Microsoft CL.EXE"
19007    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19008    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19009      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19010        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19011      fi
19012    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19013      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19014        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19015      fi
19016    fi
19017  else
19018    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19019    # Check that this is likely to be GCC.
19020    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19021    if test $? -ne 0; then
19022      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19023$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19024      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19025$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19026      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19027    fi
19028
19029    # First line typically looks something like:
19030    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19031    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19032    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19033  fi
19034  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19035  CC_VERSION="$COMPILER_VERSION"
19036  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19037  CC_VENDOR="$COMPILER_VENDOR"
19038
19039  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19040$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19041
19042
19043# Now that we have resolved CC ourself, let autoconf have it's go at it
19044ac_ext=c
19045ac_cpp='$CPP $CPPFLAGS'
19046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19048ac_compiler_gnu=$ac_cv_c_compiler_gnu
19049if test -n "$ac_tool_prefix"; then
19050  for ac_prog in $CC
19051  do
19052    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19053set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19055$as_echo_n "checking for $ac_word... " >&6; }
19056if test "${ac_cv_prog_CC+set}" = set; then :
19057  $as_echo_n "(cached) " >&6
19058else
19059  if test -n "$CC"; then
19060  ac_cv_prog_CC="$CC" # Let the user override the test.
19061else
19062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19063for as_dir in $PATH
19064do
19065  IFS=$as_save_IFS
19066  test -z "$as_dir" && as_dir=.
19067    for ac_exec_ext in '' $ac_executable_extensions; do
19068  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19069    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19071    break 2
19072  fi
19073done
19074  done
19075IFS=$as_save_IFS
19076
19077fi
19078fi
19079CC=$ac_cv_prog_CC
19080if test -n "$CC"; then
19081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19082$as_echo "$CC" >&6; }
19083else
19084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19085$as_echo "no" >&6; }
19086fi
19087
19088
19089    test -n "$CC" && break
19090  done
19091fi
19092if test -z "$CC"; then
19093  ac_ct_CC=$CC
19094  for ac_prog in $CC
19095do
19096  # Extract the first word of "$ac_prog", so it can be a program name with args.
19097set dummy $ac_prog; ac_word=$2
19098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19099$as_echo_n "checking for $ac_word... " >&6; }
19100if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19101  $as_echo_n "(cached) " >&6
19102else
19103  if test -n "$ac_ct_CC"; then
19104  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19105else
19106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19107for as_dir in $PATH
19108do
19109  IFS=$as_save_IFS
19110  test -z "$as_dir" && as_dir=.
19111    for ac_exec_ext in '' $ac_executable_extensions; do
19112  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19113    ac_cv_prog_ac_ct_CC="$ac_prog"
19114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19115    break 2
19116  fi
19117done
19118  done
19119IFS=$as_save_IFS
19120
19121fi
19122fi
19123ac_ct_CC=$ac_cv_prog_ac_ct_CC
19124if test -n "$ac_ct_CC"; then
19125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19126$as_echo "$ac_ct_CC" >&6; }
19127else
19128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19129$as_echo "no" >&6; }
19130fi
19131
19132
19133  test -n "$ac_ct_CC" && break
19134done
19135
19136  if test "x$ac_ct_CC" = x; then
19137    CC=""
19138  else
19139    case $cross_compiling:$ac_tool_warned in
19140yes:)
19141{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19142$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19143ac_tool_warned=yes ;;
19144esac
19145    CC=$ac_ct_CC
19146  fi
19147fi
19148
19149
19150test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19152as_fn_error $? "no acceptable C compiler found in \$PATH
19153See \`config.log' for more details" "$LINENO" 5 ; }
19154
19155# Provide some information about the compiler.
19156$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19157set X $ac_compile
19158ac_compiler=$2
19159for ac_option in --version -v -V -qversion; do
19160  { { ac_try="$ac_compiler $ac_option >&5"
19161case "(($ac_try" in
19162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19163  *) ac_try_echo=$ac_try;;
19164esac
19165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19166$as_echo "$ac_try_echo"; } >&5
19167  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19168  ac_status=$?
19169  if test -s conftest.err; then
19170    sed '10a\
19171... rest of stderr output deleted ...
19172         10q' conftest.err >conftest.er1
19173    cat conftest.er1 >&5
19174  fi
19175  rm -f conftest.er1 conftest.err
19176  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19177  test $ac_status = 0; }
19178done
19179
19180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19181/* end confdefs.h.  */
19182
19183int
19184main ()
19185{
19186
19187  ;
19188  return 0;
19189}
19190_ACEOF
19191ac_clean_files_save=$ac_clean_files
19192ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19193# Try to create an executable without -o first, disregard a.out.
19194# It will help us diagnose broken compilers, and finding out an intuition
19195# of exeext.
19196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19197$as_echo_n "checking whether the C compiler works... " >&6; }
19198ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19199
19200# The possible output files:
19201ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19202
19203ac_rmfiles=
19204for ac_file in $ac_files
19205do
19206  case $ac_file in
19207    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19208    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19209  esac
19210done
19211rm -f $ac_rmfiles
19212
19213if { { ac_try="$ac_link_default"
19214case "(($ac_try" in
19215  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19216  *) ac_try_echo=$ac_try;;
19217esac
19218eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19219$as_echo "$ac_try_echo"; } >&5
19220  (eval "$ac_link_default") 2>&5
19221  ac_status=$?
19222  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19223  test $ac_status = 0; }; then :
19224  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19225# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19226# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19227# so that the user can short-circuit this test for compilers unknown to
19228# Autoconf.
19229for ac_file in $ac_files ''
19230do
19231  test -f "$ac_file" || continue
19232  case $ac_file in
19233    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19234	;;
19235    [ab].out )
19236	# We found the default executable, but exeext='' is most
19237	# certainly right.
19238	break;;
19239    *.* )
19240	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19241	then :; else
19242	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19243	fi
19244	# We set ac_cv_exeext here because the later test for it is not
19245	# safe: cross compilers may not add the suffix if given an `-o'
19246	# argument, so we may need to know it at that point already.
19247	# Even if this section looks crufty: it has the advantage of
19248	# actually working.
19249	break;;
19250    * )
19251	break;;
19252  esac
19253done
19254test "$ac_cv_exeext" = no && ac_cv_exeext=
19255
19256else
19257  ac_file=''
19258fi
19259if test -z "$ac_file"; then :
19260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19261$as_echo "no" >&6; }
19262$as_echo "$as_me: failed program was:" >&5
19263sed 's/^/| /' conftest.$ac_ext >&5
19264
19265{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19267as_fn_error 77 "C compiler cannot create executables
19268See \`config.log' for more details" "$LINENO" 5 ; }
19269else
19270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19271$as_echo "yes" >&6; }
19272fi
19273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19274$as_echo_n "checking for C compiler default output file name... " >&6; }
19275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19276$as_echo "$ac_file" >&6; }
19277ac_exeext=$ac_cv_exeext
19278
19279rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19280ac_clean_files=$ac_clean_files_save
19281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19282$as_echo_n "checking for suffix of executables... " >&6; }
19283if { { ac_try="$ac_link"
19284case "(($ac_try" in
19285  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19286  *) ac_try_echo=$ac_try;;
19287esac
19288eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19289$as_echo "$ac_try_echo"; } >&5
19290  (eval "$ac_link") 2>&5
19291  ac_status=$?
19292  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19293  test $ac_status = 0; }; then :
19294  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19295# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19296# work properly (i.e., refer to `conftest.exe'), while it won't with
19297# `rm'.
19298for ac_file in conftest.exe conftest conftest.*; do
19299  test -f "$ac_file" || continue
19300  case $ac_file in
19301    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19302    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19303	  break;;
19304    * ) break;;
19305  esac
19306done
19307else
19308  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19309$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19310as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19311See \`config.log' for more details" "$LINENO" 5 ; }
19312fi
19313rm -f conftest conftest$ac_cv_exeext
19314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19315$as_echo "$ac_cv_exeext" >&6; }
19316
19317rm -f conftest.$ac_ext
19318EXEEXT=$ac_cv_exeext
19319ac_exeext=$EXEEXT
19320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19321/* end confdefs.h.  */
19322#include <stdio.h>
19323int
19324main ()
19325{
19326FILE *f = fopen ("conftest.out", "w");
19327 return ferror (f) || fclose (f) != 0;
19328
19329  ;
19330  return 0;
19331}
19332_ACEOF
19333ac_clean_files="$ac_clean_files conftest.out"
19334# Check that the compiler produces executables we can run.  If not, either
19335# the compiler is broken, or we cross compile.
19336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19337$as_echo_n "checking whether we are cross compiling... " >&6; }
19338if test "$cross_compiling" != yes; then
19339  { { ac_try="$ac_link"
19340case "(($ac_try" in
19341  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19342  *) ac_try_echo=$ac_try;;
19343esac
19344eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19345$as_echo "$ac_try_echo"; } >&5
19346  (eval "$ac_link") 2>&5
19347  ac_status=$?
19348  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19349  test $ac_status = 0; }
19350  if { ac_try='./conftest$ac_cv_exeext'
19351  { { case "(($ac_try" in
19352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19353  *) ac_try_echo=$ac_try;;
19354esac
19355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19356$as_echo "$ac_try_echo"; } >&5
19357  (eval "$ac_try") 2>&5
19358  ac_status=$?
19359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19360  test $ac_status = 0; }; }; then
19361    cross_compiling=no
19362  else
19363    if test "$cross_compiling" = maybe; then
19364	cross_compiling=yes
19365    else
19366	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19367$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19368as_fn_error $? "cannot run C compiled programs.
19369If you meant to cross compile, use \`--host'.
19370See \`config.log' for more details" "$LINENO" 5 ; }
19371    fi
19372  fi
19373fi
19374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19375$as_echo "$cross_compiling" >&6; }
19376
19377rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19378ac_clean_files=$ac_clean_files_save
19379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19380$as_echo_n "checking for suffix of object files... " >&6; }
19381if test "${ac_cv_objext+set}" = set; then :
19382  $as_echo_n "(cached) " >&6
19383else
19384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19385/* end confdefs.h.  */
19386
19387int
19388main ()
19389{
19390
19391  ;
19392  return 0;
19393}
19394_ACEOF
19395rm -f conftest.o conftest.obj
19396if { { ac_try="$ac_compile"
19397case "(($ac_try" in
19398  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19399  *) ac_try_echo=$ac_try;;
19400esac
19401eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19402$as_echo "$ac_try_echo"; } >&5
19403  (eval "$ac_compile") 2>&5
19404  ac_status=$?
19405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19406  test $ac_status = 0; }; then :
19407  for ac_file in conftest.o conftest.obj conftest.*; do
19408  test -f "$ac_file" || continue;
19409  case $ac_file in
19410    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19411    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19412       break;;
19413  esac
19414done
19415else
19416  $as_echo "$as_me: failed program was:" >&5
19417sed 's/^/| /' conftest.$ac_ext >&5
19418
19419{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19420$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19421as_fn_error $? "cannot compute suffix of object files: cannot compile
19422See \`config.log' for more details" "$LINENO" 5 ; }
19423fi
19424rm -f conftest.$ac_cv_objext conftest.$ac_ext
19425fi
19426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19427$as_echo "$ac_cv_objext" >&6; }
19428OBJEXT=$ac_cv_objext
19429ac_objext=$OBJEXT
19430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19431$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19432if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19433  $as_echo_n "(cached) " >&6
19434else
19435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19436/* end confdefs.h.  */
19437
19438int
19439main ()
19440{
19441#ifndef __GNUC__
19442       choke me
19443#endif
19444
19445  ;
19446  return 0;
19447}
19448_ACEOF
19449if ac_fn_c_try_compile "$LINENO"; then :
19450  ac_compiler_gnu=yes
19451else
19452  ac_compiler_gnu=no
19453fi
19454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19455ac_cv_c_compiler_gnu=$ac_compiler_gnu
19456
19457fi
19458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19459$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19460if test $ac_compiler_gnu = yes; then
19461  GCC=yes
19462else
19463  GCC=
19464fi
19465ac_test_CFLAGS=${CFLAGS+set}
19466ac_save_CFLAGS=$CFLAGS
19467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19468$as_echo_n "checking whether $CC accepts -g... " >&6; }
19469if test "${ac_cv_prog_cc_g+set}" = set; then :
19470  $as_echo_n "(cached) " >&6
19471else
19472  ac_save_c_werror_flag=$ac_c_werror_flag
19473   ac_c_werror_flag=yes
19474   ac_cv_prog_cc_g=no
19475   CFLAGS="-g"
19476   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19477/* end confdefs.h.  */
19478
19479int
19480main ()
19481{
19482
19483  ;
19484  return 0;
19485}
19486_ACEOF
19487if ac_fn_c_try_compile "$LINENO"; then :
19488  ac_cv_prog_cc_g=yes
19489else
19490  CFLAGS=""
19491      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19492/* end confdefs.h.  */
19493
19494int
19495main ()
19496{
19497
19498  ;
19499  return 0;
19500}
19501_ACEOF
19502if ac_fn_c_try_compile "$LINENO"; then :
19503
19504else
19505  ac_c_werror_flag=$ac_save_c_werror_flag
19506	 CFLAGS="-g"
19507	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19508/* end confdefs.h.  */
19509
19510int
19511main ()
19512{
19513
19514  ;
19515  return 0;
19516}
19517_ACEOF
19518if ac_fn_c_try_compile "$LINENO"; then :
19519  ac_cv_prog_cc_g=yes
19520fi
19521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19522fi
19523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19524fi
19525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19526   ac_c_werror_flag=$ac_save_c_werror_flag
19527fi
19528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19529$as_echo "$ac_cv_prog_cc_g" >&6; }
19530if test "$ac_test_CFLAGS" = set; then
19531  CFLAGS=$ac_save_CFLAGS
19532elif test $ac_cv_prog_cc_g = yes; then
19533  if test "$GCC" = yes; then
19534    CFLAGS="-g -O2"
19535  else
19536    CFLAGS="-g"
19537  fi
19538else
19539  if test "$GCC" = yes; then
19540    CFLAGS="-O2"
19541  else
19542    CFLAGS=
19543  fi
19544fi
19545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19546$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19547if test "${ac_cv_prog_cc_c89+set}" = set; then :
19548  $as_echo_n "(cached) " >&6
19549else
19550  ac_cv_prog_cc_c89=no
19551ac_save_CC=$CC
19552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19553/* end confdefs.h.  */
19554#include <stdarg.h>
19555#include <stdio.h>
19556#include <sys/types.h>
19557#include <sys/stat.h>
19558/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19559struct buf { int x; };
19560FILE * (*rcsopen) (struct buf *, struct stat *, int);
19561static char *e (p, i)
19562     char **p;
19563     int i;
19564{
19565  return p[i];
19566}
19567static char *f (char * (*g) (char **, int), char **p, ...)
19568{
19569  char *s;
19570  va_list v;
19571  va_start (v,p);
19572  s = g (p, va_arg (v,int));
19573  va_end (v);
19574  return s;
19575}
19576
19577/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19578   function prototypes and stuff, but not '\xHH' hex character constants.
19579   These don't provoke an error unfortunately, instead are silently treated
19580   as 'x'.  The following induces an error, until -std is added to get
19581   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19582   array size at least.  It's necessary to write '\x00'==0 to get something
19583   that's true only with -std.  */
19584int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19585
19586/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19587   inside strings and character constants.  */
19588#define FOO(x) 'x'
19589int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19590
19591int test (int i, double x);
19592struct s1 {int (*f) (int a);};
19593struct s2 {int (*f) (double a);};
19594int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19595int argc;
19596char **argv;
19597int
19598main ()
19599{
19600return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19601  ;
19602  return 0;
19603}
19604_ACEOF
19605for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19606	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19607do
19608  CC="$ac_save_CC $ac_arg"
19609  if ac_fn_c_try_compile "$LINENO"; then :
19610  ac_cv_prog_cc_c89=$ac_arg
19611fi
19612rm -f core conftest.err conftest.$ac_objext
19613  test "x$ac_cv_prog_cc_c89" != "xno" && break
19614done
19615rm -f conftest.$ac_ext
19616CC=$ac_save_CC
19617
19618fi
19619# AC_CACHE_VAL
19620case "x$ac_cv_prog_cc_c89" in
19621  x)
19622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19623$as_echo "none needed" >&6; } ;;
19624  xno)
19625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19626$as_echo "unsupported" >&6; } ;;
19627  *)
19628    CC="$CC $ac_cv_prog_cc_c89"
19629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19630$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19631esac
19632if test "x$ac_cv_prog_cc_c89" != xno; then :
19633
19634fi
19635
19636ac_ext=cpp
19637ac_cpp='$CXXCPP $CPPFLAGS'
19638ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19639ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19640ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19641
19642
19643### Locate C++ compiler (CXX)
19644
19645if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19646  # Do not probe for CC on MacOSX.
19647  COMPILER_CHECK_LIST="cl g++"
19648else
19649  COMPILER_CHECK_LIST="cl CC g++"
19650fi
19651
19652  COMPILER_NAME=C++
19653
19654  CXX=
19655  # If TOOLS_DIR is set, check for all compiler names in there first
19656  # before checking the rest of the PATH.
19657  if test -n "$TOOLS_DIR"; then
19658    PATH_save="$PATH"
19659    PATH="$TOOLS_DIR"
19660    for ac_prog in $COMPILER_CHECK_LIST
19661do
19662  # Extract the first word of "$ac_prog", so it can be a program name with args.
19663set dummy $ac_prog; ac_word=$2
19664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19665$as_echo_n "checking for $ac_word... " >&6; }
19666if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19667  $as_echo_n "(cached) " >&6
19668else
19669  case $TOOLS_DIR_CXX in
19670  [\\/]* | ?:[\\/]*)
19671  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19672  ;;
19673  *)
19674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19675for as_dir in $PATH
19676do
19677  IFS=$as_save_IFS
19678  test -z "$as_dir" && as_dir=.
19679    for ac_exec_ext in '' $ac_executable_extensions; do
19680  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19681    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19683    break 2
19684  fi
19685done
19686  done
19687IFS=$as_save_IFS
19688
19689  ;;
19690esac
19691fi
19692TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19693if test -n "$TOOLS_DIR_CXX"; then
19694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19695$as_echo "$TOOLS_DIR_CXX" >&6; }
19696else
19697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19698$as_echo "no" >&6; }
19699fi
19700
19701
19702  test -n "$TOOLS_DIR_CXX" && break
19703done
19704
19705    CXX=$TOOLS_DIR_CXX
19706    PATH="$PATH_save"
19707  fi
19708
19709  # AC_PATH_PROGS can't be run multiple times with the same variable,
19710  # so create a new name for this run.
19711  if test "x$CXX" = x; then
19712    for ac_prog in $COMPILER_CHECK_LIST
19713do
19714  # Extract the first word of "$ac_prog", so it can be a program name with args.
19715set dummy $ac_prog; ac_word=$2
19716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19717$as_echo_n "checking for $ac_word... " >&6; }
19718if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19719  $as_echo_n "(cached) " >&6
19720else
19721  case $POTENTIAL_CXX in
19722  [\\/]* | ?:[\\/]*)
19723  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19724  ;;
19725  *)
19726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19727for as_dir in $PATH
19728do
19729  IFS=$as_save_IFS
19730  test -z "$as_dir" && as_dir=.
19731    for ac_exec_ext in '' $ac_executable_extensions; do
19732  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19733    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19735    break 2
19736  fi
19737done
19738  done
19739IFS=$as_save_IFS
19740
19741  ;;
19742esac
19743fi
19744POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19745if test -n "$POTENTIAL_CXX"; then
19746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19747$as_echo "$POTENTIAL_CXX" >&6; }
19748else
19749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19750$as_echo "no" >&6; }
19751fi
19752
19753
19754  test -n "$POTENTIAL_CXX" && break
19755done
19756
19757    CXX=$POTENTIAL_CXX
19758  fi
19759
19760  if test "x$CXX" = x; then
19761
19762    # Print a helpful message on how to acquire the necessary build dependency.
19763    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19764    MISSING_DEPENDENCY=devkit
19765    PKGHANDLER_COMMAND=
19766
19767    case $PKGHANDLER in
19768	apt-get)
19769                apt_help     $MISSING_DEPENDENCY ;;
19770    yum)
19771                yum_help     $MISSING_DEPENDENCY ;;
19772	port)
19773                port_help    $MISSING_DEPENDENCY ;;
19774	pkgutil)
19775                pkgutil_help $MISSING_DEPENDENCY ;;
19776	pkgadd)
19777                pkgadd_help  $MISSING_DEPENDENCY ;;
19778    * )
19779      break ;;
19780    esac
19781
19782    if test "x$PKGHANDLER_COMMAND" != x; then
19783        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19784    fi
19785
19786      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19787  fi
19788
19789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19790
19791  # First separate the path from the arguments. This will split at the first
19792  # space.
19793  complete="$CXX"
19794  path="${complete%% *}"
19795  tmp="$complete EOL"
19796  arguments="${tmp#* }"
19797
19798  # Input might be given as Windows format, start by converting to
19799  # unix format.
19800  new_path=`$CYGPATH -u "$path"`
19801
19802  # Now try to locate executable using which
19803  new_path=`$WHICH "$new_path" 2> /dev/null`
19804  # bat and cmd files are not always considered executable in cygwin causing which
19805  # to not find them
19806  if test "x$new_path" = x \
19807           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19808           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19809    new_path=`$CYGPATH -u "$path"`
19810  fi
19811  if test "x$new_path" = x; then
19812    # Oops. Which didn't find the executable.
19813    # The splitting of arguments from the executable at a space might have been incorrect,
19814    # since paths with space are more likely in Windows. Give it another try with the whole
19815    # argument.
19816    path="$complete"
19817    arguments="EOL"
19818    new_path=`$CYGPATH -u "$path"`
19819    new_path=`$WHICH "$new_path" 2> /dev/null`
19820    # bat and cmd files are not always considered executable in cygwin causing which
19821    # to not find them
19822    if test "x$new_path" = x \
19823             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19824             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19825      new_path=`$CYGPATH -u "$path"`
19826    fi
19827    if test "x$new_path" = x; then
19828      # It's still not found. Now this is an unrecoverable error.
19829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19830$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19831      has_space=`$ECHO "$complete" | $GREP " "`
19832      if test "x$has_space" != x; then
19833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19835      fi
19836      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19837    fi
19838  fi
19839
19840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19843  # "foo.exe" is OK but "foo" is an error.
19844  #
19845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19846  # It is also a way to make sure we got the proper file name for the real test later on.
19847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19848  if test "x$test_shortpath" = x; then
19849    # Short path failed, file does not exist as specified.
19850    # Try adding .exe or .cmd
19851    if test -f "${new_path}.exe"; then
19852       input_to_shortpath="${new_path}.exe"
19853    elif test -f "${new_path}.cmd"; then
19854       input_to_shortpath="${new_path}.cmd"
19855    else
19856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19857$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19858      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19859$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19860      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19861    fi
19862  else
19863    input_to_shortpath="$new_path"
19864  fi
19865
19866  # Call helper function which possibly converts this using DOS-style short mode.
19867  # If so, the updated path is stored in $new_path.
19868  new_path="$input_to_shortpath"
19869
19870  input_path="$input_to_shortpath"
19871  # Check if we need to convert this using DOS-style short mode. If the path
19872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19873  # take no chances and rewrite it.
19874  # Note: m4 eats our [], so we need to use [ and ] instead.
19875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19876  if test "x$has_forbidden_chars" != x; then
19877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19881      # Going to short mode and back again did indeed matter. Since short mode is
19882      # case insensitive, let's make it lowercase to improve readability.
19883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19884      # Now convert it back to Unix-stile (cygpath)
19885      input_path=`$CYGPATH -u "$shortmode_path"`
19886      new_path="$input_path"
19887    fi
19888  fi
19889
19890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19891  if test "x$test_cygdrive_prefix" = x; then
19892    # As a simple fix, exclude /usr/bin since it's not a real path.
19893    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19895      # a path prefixed by /cygdrive for fixpath to work.
19896      new_path="$CYGWIN_ROOT_PATH$input_path"
19897    fi
19898  fi
19899
19900  # remove trailing .exe if any
19901  new_path="${new_path/%.exe/}"
19902
19903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19904
19905  # First separate the path from the arguments. This will split at the first
19906  # space.
19907  complete="$CXX"
19908  path="${complete%% *}"
19909  tmp="$complete EOL"
19910  arguments="${tmp#* }"
19911
19912  # Input might be given as Windows format, start by converting to
19913  # unix format.
19914  new_path="$path"
19915
19916  windows_path="$new_path"
19917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19918    unix_path=`$CYGPATH -u "$windows_path"`
19919    new_path="$unix_path"
19920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19922    new_path="$unix_path"
19923  fi
19924
19925
19926  # Now try to locate executable using which
19927  new_path=`$WHICH "$new_path" 2> /dev/null`
19928
19929  if test "x$new_path" = x; then
19930    # Oops. Which didn't find the executable.
19931    # The splitting of arguments from the executable at a space might have been incorrect,
19932    # since paths with space are more likely in Windows. Give it another try with the whole
19933    # argument.
19934    path="$complete"
19935    arguments="EOL"
19936    new_path="$path"
19937
19938  windows_path="$new_path"
19939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19940    unix_path=`$CYGPATH -u "$windows_path"`
19941    new_path="$unix_path"
19942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19944    new_path="$unix_path"
19945  fi
19946
19947
19948    new_path=`$WHICH "$new_path" 2> /dev/null`
19949
19950    if test "x$new_path" = x; then
19951      # It's still not found. Now this is an unrecoverable error.
19952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19953$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19954      has_space=`$ECHO "$complete" | $GREP " "`
19955      if test "x$has_space" != x; then
19956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19958      fi
19959      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19960    fi
19961  fi
19962
19963  # Now new_path has a complete unix path to the binary
19964  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19965    # Keep paths in /bin as-is, but remove trailing .exe if any
19966    new_path="${new_path/%.exe/}"
19967    # Do not save /bin paths to all_fixpath_prefixes!
19968  else
19969    # Not in mixed or Windows style, start by that.
19970    new_path=`cmd //c echo $new_path`
19971
19972  input_path="$new_path"
19973  # Check if we need to convert this using DOS-style short mode. If the path
19974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19975  # take no chances and rewrite it.
19976  # Note: m4 eats our [], so we need to use [ and ] instead.
19977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19978  if test "x$has_forbidden_chars" != x; then
19979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19981  fi
19982
19983    # Output is in $new_path
19984
19985  windows_path="$new_path"
19986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19987    unix_path=`$CYGPATH -u "$windows_path"`
19988    new_path="$unix_path"
19989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19991    new_path="$unix_path"
19992  fi
19993
19994    # remove trailing .exe if any
19995    new_path="${new_path/%.exe/}"
19996
19997    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19998    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19999  fi
20000
20001  else
20002    # We're on a posix platform. Hooray! :)
20003    # First separate the path from the arguments. This will split at the first
20004    # space.
20005    complete="$CXX"
20006    path="${complete%% *}"
20007    tmp="$complete EOL"
20008    arguments="${tmp#* }"
20009
20010    # Cannot rely on the command "which" here since it doesn't always work.
20011    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20012    if test -z "$is_absolute_path"; then
20013      # Path to executable is not absolute. Find it.
20014      IFS_save="$IFS"
20015      IFS=:
20016      for p in $PATH; do
20017        if test -f "$p/$path" && test -x "$p/$path"; then
20018          new_path="$p/$path"
20019          break
20020        fi
20021      done
20022      IFS="$IFS_save"
20023    else
20024      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20025$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20026      new_path="$path"
20027    fi
20028
20029    if test "x$new_path" = x; then
20030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20031$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20032        has_space=`$ECHO "$complete" | $GREP " "`
20033        if test "x$has_space" != x; then
20034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20036        fi
20037        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20038      fi
20039  fi
20040
20041      # Now join together the path and the arguments once again
20042      if test "x$arguments" != xEOL; then
20043        new_complete="$new_path ${arguments% *}"
20044      else
20045        new_complete="$new_path"
20046      fi
20047
20048  if test "x$complete" != "x$new_complete"; then
20049      CXX="$new_complete"
20050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20051$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20052    fi
20053
20054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20055$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20056  TEST_COMPILER="$CXX"
20057
20058    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20059        # Follow a chain of symbolic links. Use readlink
20060        # where it exists, else fall back to horribly
20061        # complicated shell code.
20062        if test "x$READLINK_TESTED" != yes; then
20063            # On MacOSX there is a readlink tool with a different
20064            # purpose than the GNU readlink tool. Check the found readlink.
20065            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20066            if test "x$ISGNU" = x; then
20067                 # A readlink that we do not know how to use.
20068                 # Are there other non-GNU readlinks out there?
20069                 READLINK_TESTED=yes
20070                 READLINK=
20071            fi
20072        fi
20073
20074        if test "x$READLINK" != x; then
20075            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20076        else
20077            # Save the current directory for restoring afterwards
20078            STARTDIR=$PWD
20079            COUNTER=0
20080            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20081            sym_link_file=`$BASENAME $TEST_COMPILER`
20082            # Use the system pwd and not the shell builtin to resolve directory symlinks
20083            cd $sym_link_dir
20084            cd `$THEPWDCMD`
20085            sym_link_dir=`$THEPWDCMD`
20086            # Resolve file symlinks
20087            while test $COUNTER -lt 20; do
20088                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20089                if test "x$ISLINK" == x; then
20090                    # This is not a symbolic link! We are done!
20091                    break
20092                fi
20093                # Again resolve directory symlinks since the target of the just found
20094                # link could be in a different directory
20095                cd `$DIRNAME $ISLINK`
20096                sym_link_dir=`$THEPWDCMD`
20097                sym_link_file=`$BASENAME $ISLINK`
20098                let COUNTER=COUNTER+1
20099            done
20100            cd $STARTDIR
20101            TEST_COMPILER=$sym_link_dir/$sym_link_file
20102        fi
20103    fi
20104
20105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20106$as_echo "$TEST_COMPILER" >&6; }
20107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20108$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20109
20110  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20111  if test "x$COMPILER_BASENAME" = "xccache"; then
20112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20113$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20114    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20115    # We want to control ccache invocation ourselves, so ignore this cc and try
20116    # searching again.
20117
20118    # Remove the path to the fake ccache cc from the PATH
20119    RETRY_COMPILER_SAVED_PATH="$PATH"
20120    COMPILER_DIRNAME=`$DIRNAME $CXX`
20121    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20122
20123    # Try again looking for our compiler
20124    if test -n "$ac_tool_prefix"; then
20125  for ac_prog in $COMPILER_CHECK_LIST
20126  do
20127    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20128set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20130$as_echo_n "checking for $ac_word... " >&6; }
20131if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20132  $as_echo_n "(cached) " >&6
20133else
20134  if test -n "$PROPER_COMPILER_CXX"; then
20135  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20136else
20137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20138for as_dir in $PATH
20139do
20140  IFS=$as_save_IFS
20141  test -z "$as_dir" && as_dir=.
20142    for ac_exec_ext in '' $ac_executable_extensions; do
20143  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20144    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20146    break 2
20147  fi
20148done
20149  done
20150IFS=$as_save_IFS
20151
20152fi
20153fi
20154PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20155if test -n "$PROPER_COMPILER_CXX"; then
20156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20157$as_echo "$PROPER_COMPILER_CXX" >&6; }
20158else
20159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20160$as_echo "no" >&6; }
20161fi
20162
20163
20164    test -n "$PROPER_COMPILER_CXX" && break
20165  done
20166fi
20167if test -z "$PROPER_COMPILER_CXX"; then
20168  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20169  for ac_prog in $COMPILER_CHECK_LIST
20170do
20171  # Extract the first word of "$ac_prog", so it can be a program name with args.
20172set dummy $ac_prog; ac_word=$2
20173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20174$as_echo_n "checking for $ac_word... " >&6; }
20175if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20176  $as_echo_n "(cached) " >&6
20177else
20178  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20179  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20180else
20181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20182for as_dir in $PATH
20183do
20184  IFS=$as_save_IFS
20185  test -z "$as_dir" && as_dir=.
20186    for ac_exec_ext in '' $ac_executable_extensions; do
20187  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20188    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20190    break 2
20191  fi
20192done
20193  done
20194IFS=$as_save_IFS
20195
20196fi
20197fi
20198ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20199if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20201$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20202else
20203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20204$as_echo "no" >&6; }
20205fi
20206
20207
20208  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20209done
20210
20211  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20212    PROPER_COMPILER_CXX=""
20213  else
20214    case $cross_compiling:$ac_tool_warned in
20215yes:)
20216{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20217$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20218ac_tool_warned=yes ;;
20219esac
20220    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20221  fi
20222fi
20223
20224
20225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20226
20227  # First separate the path from the arguments. This will split at the first
20228  # space.
20229  complete="$PROPER_COMPILER_CXX"
20230  path="${complete%% *}"
20231  tmp="$complete EOL"
20232  arguments="${tmp#* }"
20233
20234  # Input might be given as Windows format, start by converting to
20235  # unix format.
20236  new_path=`$CYGPATH -u "$path"`
20237
20238  # Now try to locate executable using which
20239  new_path=`$WHICH "$new_path" 2> /dev/null`
20240  # bat and cmd files are not always considered executable in cygwin causing which
20241  # to not find them
20242  if test "x$new_path" = x \
20243           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20244           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20245    new_path=`$CYGPATH -u "$path"`
20246  fi
20247  if test "x$new_path" = x; then
20248    # Oops. Which didn't find the executable.
20249    # The splitting of arguments from the executable at a space might have been incorrect,
20250    # since paths with space are more likely in Windows. Give it another try with the whole
20251    # argument.
20252    path="$complete"
20253    arguments="EOL"
20254    new_path=`$CYGPATH -u "$path"`
20255    new_path=`$WHICH "$new_path" 2> /dev/null`
20256    # bat and cmd files are not always considered executable in cygwin causing which
20257    # to not find them
20258    if test "x$new_path" = x \
20259             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20260             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20261      new_path=`$CYGPATH -u "$path"`
20262    fi
20263    if test "x$new_path" = x; then
20264      # It's still not found. Now this is an unrecoverable error.
20265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20266$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20267      has_space=`$ECHO "$complete" | $GREP " "`
20268      if test "x$has_space" != x; then
20269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20271      fi
20272      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20273    fi
20274  fi
20275
20276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20279  # "foo.exe" is OK but "foo" is an error.
20280  #
20281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20282  # It is also a way to make sure we got the proper file name for the real test later on.
20283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20284  if test "x$test_shortpath" = x; then
20285    # Short path failed, file does not exist as specified.
20286    # Try adding .exe or .cmd
20287    if test -f "${new_path}.exe"; then
20288       input_to_shortpath="${new_path}.exe"
20289    elif test -f "${new_path}.cmd"; then
20290       input_to_shortpath="${new_path}.cmd"
20291    else
20292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20293$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20296      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20297    fi
20298  else
20299    input_to_shortpath="$new_path"
20300  fi
20301
20302  # Call helper function which possibly converts this using DOS-style short mode.
20303  # If so, the updated path is stored in $new_path.
20304  new_path="$input_to_shortpath"
20305
20306  input_path="$input_to_shortpath"
20307  # Check if we need to convert this using DOS-style short mode. If the path
20308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20309  # take no chances and rewrite it.
20310  # Note: m4 eats our [], so we need to use [ and ] instead.
20311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20312  if test "x$has_forbidden_chars" != x; then
20313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20317      # Going to short mode and back again did indeed matter. Since short mode is
20318      # case insensitive, let's make it lowercase to improve readability.
20319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20320      # Now convert it back to Unix-stile (cygpath)
20321      input_path=`$CYGPATH -u "$shortmode_path"`
20322      new_path="$input_path"
20323    fi
20324  fi
20325
20326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20327  if test "x$test_cygdrive_prefix" = x; then
20328    # As a simple fix, exclude /usr/bin since it's not a real path.
20329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20331      # a path prefixed by /cygdrive for fixpath to work.
20332      new_path="$CYGWIN_ROOT_PATH$input_path"
20333    fi
20334  fi
20335
20336  # remove trailing .exe if any
20337  new_path="${new_path/%.exe/}"
20338
20339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20340
20341  # First separate the path from the arguments. This will split at the first
20342  # space.
20343  complete="$PROPER_COMPILER_CXX"
20344  path="${complete%% *}"
20345  tmp="$complete EOL"
20346  arguments="${tmp#* }"
20347
20348  # Input might be given as Windows format, start by converting to
20349  # unix format.
20350  new_path="$path"
20351
20352  windows_path="$new_path"
20353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20354    unix_path=`$CYGPATH -u "$windows_path"`
20355    new_path="$unix_path"
20356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20358    new_path="$unix_path"
20359  fi
20360
20361
20362  # Now try to locate executable using which
20363  new_path=`$WHICH "$new_path" 2> /dev/null`
20364
20365  if test "x$new_path" = x; then
20366    # Oops. Which didn't find the executable.
20367    # The splitting of arguments from the executable at a space might have been incorrect,
20368    # since paths with space are more likely in Windows. Give it another try with the whole
20369    # argument.
20370    path="$complete"
20371    arguments="EOL"
20372    new_path="$path"
20373
20374  windows_path="$new_path"
20375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20376    unix_path=`$CYGPATH -u "$windows_path"`
20377    new_path="$unix_path"
20378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20380    new_path="$unix_path"
20381  fi
20382
20383
20384    new_path=`$WHICH "$new_path" 2> /dev/null`
20385
20386    if test "x$new_path" = x; then
20387      # It's still not found. Now this is an unrecoverable error.
20388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20389$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20390      has_space=`$ECHO "$complete" | $GREP " "`
20391      if test "x$has_space" != x; then
20392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20394      fi
20395      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20396    fi
20397  fi
20398
20399  # Now new_path has a complete unix path to the binary
20400  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20401    # Keep paths in /bin as-is, but remove trailing .exe if any
20402    new_path="${new_path/%.exe/}"
20403    # Do not save /bin paths to all_fixpath_prefixes!
20404  else
20405    # Not in mixed or Windows style, start by that.
20406    new_path=`cmd //c echo $new_path`
20407
20408  input_path="$new_path"
20409  # Check if we need to convert this using DOS-style short mode. If the path
20410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20411  # take no chances and rewrite it.
20412  # Note: m4 eats our [], so we need to use [ and ] instead.
20413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20414  if test "x$has_forbidden_chars" != x; then
20415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20417  fi
20418
20419    # Output is in $new_path
20420
20421  windows_path="$new_path"
20422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20423    unix_path=`$CYGPATH -u "$windows_path"`
20424    new_path="$unix_path"
20425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20427    new_path="$unix_path"
20428  fi
20429
20430    # remove trailing .exe if any
20431    new_path="${new_path/%.exe/}"
20432
20433    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20434    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20435  fi
20436
20437  else
20438    # We're on a posix platform. Hooray! :)
20439    # First separate the path from the arguments. This will split at the first
20440    # space.
20441    complete="$PROPER_COMPILER_CXX"
20442    path="${complete%% *}"
20443    tmp="$complete EOL"
20444    arguments="${tmp#* }"
20445
20446    # Cannot rely on the command "which" here since it doesn't always work.
20447    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20448    if test -z "$is_absolute_path"; then
20449      # Path to executable is not absolute. Find it.
20450      IFS_save="$IFS"
20451      IFS=:
20452      for p in $PATH; do
20453        if test -f "$p/$path" && test -x "$p/$path"; then
20454          new_path="$p/$path"
20455          break
20456        fi
20457      done
20458      IFS="$IFS_save"
20459    else
20460      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20461$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20462      new_path="$path"
20463    fi
20464
20465    if test "x$new_path" = x; then
20466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20467$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20468        has_space=`$ECHO "$complete" | $GREP " "`
20469        if test "x$has_space" != x; then
20470          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20471$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20472        fi
20473        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20474      fi
20475  fi
20476
20477      # Now join together the path and the arguments once again
20478      if test "x$arguments" != xEOL; then
20479        new_complete="$new_path ${arguments% *}"
20480      else
20481        new_complete="$new_path"
20482      fi
20483
20484  if test "x$complete" != "x$new_complete"; then
20485      PROPER_COMPILER_CXX="$new_complete"
20486      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20487$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20488    fi
20489
20490    PATH="$RETRY_COMPILER_SAVED_PATH"
20491
20492    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20493$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20494
20495    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20496        # Follow a chain of symbolic links. Use readlink
20497        # where it exists, else fall back to horribly
20498        # complicated shell code.
20499        if test "x$READLINK_TESTED" != yes; then
20500            # On MacOSX there is a readlink tool with a different
20501            # purpose than the GNU readlink tool. Check the found readlink.
20502            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20503            if test "x$ISGNU" = x; then
20504                 # A readlink that we do not know how to use.
20505                 # Are there other non-GNU readlinks out there?
20506                 READLINK_TESTED=yes
20507                 READLINK=
20508            fi
20509        fi
20510
20511        if test "x$READLINK" != x; then
20512            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20513        else
20514            # Save the current directory for restoring afterwards
20515            STARTDIR=$PWD
20516            COUNTER=0
20517            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20518            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20519            # Use the system pwd and not the shell builtin to resolve directory symlinks
20520            cd $sym_link_dir
20521            cd `$THEPWDCMD`
20522            sym_link_dir=`$THEPWDCMD`
20523            # Resolve file symlinks
20524            while test $COUNTER -lt 20; do
20525                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20526                if test "x$ISLINK" == x; then
20527                    # This is not a symbolic link! We are done!
20528                    break
20529                fi
20530                # Again resolve directory symlinks since the target of the just found
20531                # link could be in a different directory
20532                cd `$DIRNAME $ISLINK`
20533                sym_link_dir=`$THEPWDCMD`
20534                sym_link_file=`$BASENAME $ISLINK`
20535                let COUNTER=COUNTER+1
20536            done
20537            cd $STARTDIR
20538            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20539        fi
20540    fi
20541
20542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20543$as_echo "$PROPER_COMPILER_CXX" >&6; }
20544    CXX="$PROPER_COMPILER_CXX"
20545  else
20546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20547$as_echo "no, keeping CXX" >&6; }
20548    CXX="$TEST_COMPILER"
20549  fi
20550
20551  COMPILER=$CXX
20552  COMPILER_NAME=$COMPILER_NAME
20553
20554  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20555    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20556    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20557    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20558    if test $? -ne 0; then
20559      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20560
20561      { $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
20562$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20563      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20564$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20565      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20566    else
20567      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20568      COMPILER_VENDOR="Sun Studio"
20569    fi
20570  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20571    # First line typically looks something like:
20572    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20573    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20574    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20575    COMPILER_VENDOR="Microsoft CL.EXE"
20576    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20577    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20578      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20579        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20580      fi
20581    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20582      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20583        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20584      fi
20585    fi
20586  else
20587    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20588    # Check that this is likely to be GCC.
20589    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20590    if test $? -ne 0; then
20591      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20592$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20593      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20594$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20595      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20596    fi
20597
20598    # First line typically looks something like:
20599    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20600    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20601    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20602  fi
20603  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20604  CXX_VERSION="$COMPILER_VERSION"
20605  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20606  CXX_VENDOR="$COMPILER_VENDOR"
20607
20608  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20609$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20610
20611
20612# Now that we have resolved CXX ourself, let autoconf have it's go at it
20613ac_ext=cpp
20614ac_cpp='$CXXCPP $CPPFLAGS'
20615ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20616ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20617ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20618if test -z "$CXX"; then
20619  if test -n "$CCC"; then
20620    CXX=$CCC
20621  else
20622    if test -n "$ac_tool_prefix"; then
20623  for ac_prog in $CXX
20624  do
20625    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20626set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20628$as_echo_n "checking for $ac_word... " >&6; }
20629if test "${ac_cv_prog_CXX+set}" = set; then :
20630  $as_echo_n "(cached) " >&6
20631else
20632  if test -n "$CXX"; then
20633  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20634else
20635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20636for as_dir in $PATH
20637do
20638  IFS=$as_save_IFS
20639  test -z "$as_dir" && as_dir=.
20640    for ac_exec_ext in '' $ac_executable_extensions; do
20641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20642    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20644    break 2
20645  fi
20646done
20647  done
20648IFS=$as_save_IFS
20649
20650fi
20651fi
20652CXX=$ac_cv_prog_CXX
20653if test -n "$CXX"; then
20654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20655$as_echo "$CXX" >&6; }
20656else
20657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20658$as_echo "no" >&6; }
20659fi
20660
20661
20662    test -n "$CXX" && break
20663  done
20664fi
20665if test -z "$CXX"; then
20666  ac_ct_CXX=$CXX
20667  for ac_prog in $CXX
20668do
20669  # Extract the first word of "$ac_prog", so it can be a program name with args.
20670set dummy $ac_prog; ac_word=$2
20671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20672$as_echo_n "checking for $ac_word... " >&6; }
20673if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20674  $as_echo_n "(cached) " >&6
20675else
20676  if test -n "$ac_ct_CXX"; then
20677  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20678else
20679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20680for as_dir in $PATH
20681do
20682  IFS=$as_save_IFS
20683  test -z "$as_dir" && as_dir=.
20684    for ac_exec_ext in '' $ac_executable_extensions; do
20685  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20686    ac_cv_prog_ac_ct_CXX="$ac_prog"
20687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20688    break 2
20689  fi
20690done
20691  done
20692IFS=$as_save_IFS
20693
20694fi
20695fi
20696ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20697if test -n "$ac_ct_CXX"; then
20698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20699$as_echo "$ac_ct_CXX" >&6; }
20700else
20701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20702$as_echo "no" >&6; }
20703fi
20704
20705
20706  test -n "$ac_ct_CXX" && break
20707done
20708
20709  if test "x$ac_ct_CXX" = x; then
20710    CXX="g++"
20711  else
20712    case $cross_compiling:$ac_tool_warned in
20713yes:)
20714{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20715$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20716ac_tool_warned=yes ;;
20717esac
20718    CXX=$ac_ct_CXX
20719  fi
20720fi
20721
20722  fi
20723fi
20724# Provide some information about the compiler.
20725$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20726set X $ac_compile
20727ac_compiler=$2
20728for ac_option in --version -v -V -qversion; do
20729  { { ac_try="$ac_compiler $ac_option >&5"
20730case "(($ac_try" in
20731  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20732  *) ac_try_echo=$ac_try;;
20733esac
20734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20735$as_echo "$ac_try_echo"; } >&5
20736  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20737  ac_status=$?
20738  if test -s conftest.err; then
20739    sed '10a\
20740... rest of stderr output deleted ...
20741         10q' conftest.err >conftest.er1
20742    cat conftest.er1 >&5
20743  fi
20744  rm -f conftest.er1 conftest.err
20745  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20746  test $ac_status = 0; }
20747done
20748
20749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20750$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20751if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20752  $as_echo_n "(cached) " >&6
20753else
20754  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20755/* end confdefs.h.  */
20756
20757int
20758main ()
20759{
20760#ifndef __GNUC__
20761       choke me
20762#endif
20763
20764  ;
20765  return 0;
20766}
20767_ACEOF
20768if ac_fn_cxx_try_compile "$LINENO"; then :
20769  ac_compiler_gnu=yes
20770else
20771  ac_compiler_gnu=no
20772fi
20773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20774ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20775
20776fi
20777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20778$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20779if test $ac_compiler_gnu = yes; then
20780  GXX=yes
20781else
20782  GXX=
20783fi
20784ac_test_CXXFLAGS=${CXXFLAGS+set}
20785ac_save_CXXFLAGS=$CXXFLAGS
20786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20787$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20788if test "${ac_cv_prog_cxx_g+set}" = set; then :
20789  $as_echo_n "(cached) " >&6
20790else
20791  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20792   ac_cxx_werror_flag=yes
20793   ac_cv_prog_cxx_g=no
20794   CXXFLAGS="-g"
20795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20796/* end confdefs.h.  */
20797
20798int
20799main ()
20800{
20801
20802  ;
20803  return 0;
20804}
20805_ACEOF
20806if ac_fn_cxx_try_compile "$LINENO"; then :
20807  ac_cv_prog_cxx_g=yes
20808else
20809  CXXFLAGS=""
20810      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20811/* end confdefs.h.  */
20812
20813int
20814main ()
20815{
20816
20817  ;
20818  return 0;
20819}
20820_ACEOF
20821if ac_fn_cxx_try_compile "$LINENO"; then :
20822
20823else
20824  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20825	 CXXFLAGS="-g"
20826	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20827/* end confdefs.h.  */
20828
20829int
20830main ()
20831{
20832
20833  ;
20834  return 0;
20835}
20836_ACEOF
20837if ac_fn_cxx_try_compile "$LINENO"; then :
20838  ac_cv_prog_cxx_g=yes
20839fi
20840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20841fi
20842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20843fi
20844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20845   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20846fi
20847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20848$as_echo "$ac_cv_prog_cxx_g" >&6; }
20849if test "$ac_test_CXXFLAGS" = set; then
20850  CXXFLAGS=$ac_save_CXXFLAGS
20851elif test $ac_cv_prog_cxx_g = yes; then
20852  if test "$GXX" = yes; then
20853    CXXFLAGS="-g -O2"
20854  else
20855    CXXFLAGS="-g"
20856  fi
20857else
20858  if test "$GXX" = yes; then
20859    CXXFLAGS="-O2"
20860  else
20861    CXXFLAGS=
20862  fi
20863fi
20864ac_ext=cpp
20865ac_cpp='$CXXCPP $CPPFLAGS'
20866ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20867ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20868ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20869
20870
20871### Locate other tools
20872
20873if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20874    ac_ext=m
20875ac_cpp='$OBJCPP $CPPFLAGS'
20876ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20877ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20878ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20879if test -n "$ac_tool_prefix"; then
20880  for ac_prog in gcc objcc objc cc CC
20881  do
20882    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20883set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20885$as_echo_n "checking for $ac_word... " >&6; }
20886if test "${ac_cv_prog_OBJC+set}" = set; then :
20887  $as_echo_n "(cached) " >&6
20888else
20889  if test -n "$OBJC"; then
20890  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20891else
20892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20893for as_dir in $PATH
20894do
20895  IFS=$as_save_IFS
20896  test -z "$as_dir" && as_dir=.
20897    for ac_exec_ext in '' $ac_executable_extensions; do
20898  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20899    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20901    break 2
20902  fi
20903done
20904  done
20905IFS=$as_save_IFS
20906
20907fi
20908fi
20909OBJC=$ac_cv_prog_OBJC
20910if test -n "$OBJC"; then
20911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20912$as_echo "$OBJC" >&6; }
20913else
20914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20915$as_echo "no" >&6; }
20916fi
20917
20918
20919    test -n "$OBJC" && break
20920  done
20921fi
20922if test -z "$OBJC"; then
20923  ac_ct_OBJC=$OBJC
20924  for ac_prog in gcc objcc objc cc CC
20925do
20926  # Extract the first word of "$ac_prog", so it can be a program name with args.
20927set dummy $ac_prog; ac_word=$2
20928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20929$as_echo_n "checking for $ac_word... " >&6; }
20930if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20931  $as_echo_n "(cached) " >&6
20932else
20933  if test -n "$ac_ct_OBJC"; then
20934  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20935else
20936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20937for as_dir in $PATH
20938do
20939  IFS=$as_save_IFS
20940  test -z "$as_dir" && as_dir=.
20941    for ac_exec_ext in '' $ac_executable_extensions; do
20942  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20943    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20945    break 2
20946  fi
20947done
20948  done
20949IFS=$as_save_IFS
20950
20951fi
20952fi
20953ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20954if test -n "$ac_ct_OBJC"; then
20955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20956$as_echo "$ac_ct_OBJC" >&6; }
20957else
20958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20959$as_echo "no" >&6; }
20960fi
20961
20962
20963  test -n "$ac_ct_OBJC" && break
20964done
20965
20966  if test "x$ac_ct_OBJC" = x; then
20967    OBJC="gcc"
20968  else
20969    case $cross_compiling:$ac_tool_warned in
20970yes:)
20971{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20972$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20973ac_tool_warned=yes ;;
20974esac
20975    OBJC=$ac_ct_OBJC
20976  fi
20977fi
20978
20979# Provide some information about the compiler.
20980$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20981set X $ac_compile
20982ac_compiler=$2
20983for ac_option in --version -v -V -qversion; do
20984  { { ac_try="$ac_compiler $ac_option >&5"
20985case "(($ac_try" in
20986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20987  *) ac_try_echo=$ac_try;;
20988esac
20989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20990$as_echo "$ac_try_echo"; } >&5
20991  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20992  ac_status=$?
20993  if test -s conftest.err; then
20994    sed '10a\
20995... rest of stderr output deleted ...
20996         10q' conftest.err >conftest.er1
20997    cat conftest.er1 >&5
20998  fi
20999  rm -f conftest.er1 conftest.err
21000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21001  test $ac_status = 0; }
21002done
21003
21004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21005$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21006if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21007  $as_echo_n "(cached) " >&6
21008else
21009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21010/* end confdefs.h.  */
21011
21012int
21013main ()
21014{
21015#ifndef __GNUC__
21016       choke me
21017#endif
21018
21019  ;
21020  return 0;
21021}
21022_ACEOF
21023if ac_fn_objc_try_compile "$LINENO"; then :
21024  ac_compiler_gnu=yes
21025else
21026  ac_compiler_gnu=no
21027fi
21028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21029ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21030
21031fi
21032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21033$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21034if test $ac_compiler_gnu = yes; then
21035  GOBJC=yes
21036else
21037  GOBJC=
21038fi
21039ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21040ac_save_OBJCFLAGS=$OBJCFLAGS
21041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21042$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21043if test "${ac_cv_prog_objc_g+set}" = set; then :
21044  $as_echo_n "(cached) " >&6
21045else
21046  ac_save_objc_werror_flag=$ac_objc_werror_flag
21047   ac_objc_werror_flag=yes
21048   ac_cv_prog_objc_g=no
21049   OBJCFLAGS="-g"
21050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21051/* end confdefs.h.  */
21052
21053int
21054main ()
21055{
21056
21057  ;
21058  return 0;
21059}
21060_ACEOF
21061if ac_fn_objc_try_compile "$LINENO"; then :
21062  ac_cv_prog_objc_g=yes
21063else
21064  OBJCFLAGS=""
21065      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21066/* end confdefs.h.  */
21067
21068int
21069main ()
21070{
21071
21072  ;
21073  return 0;
21074}
21075_ACEOF
21076if ac_fn_objc_try_compile "$LINENO"; then :
21077
21078else
21079  ac_objc_werror_flag=$ac_save_objc_werror_flag
21080	 OBJCFLAGS="-g"
21081	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21082/* end confdefs.h.  */
21083
21084int
21085main ()
21086{
21087
21088  ;
21089  return 0;
21090}
21091_ACEOF
21092if ac_fn_objc_try_compile "$LINENO"; then :
21093  ac_cv_prog_objc_g=yes
21094fi
21095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21096fi
21097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21098fi
21099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21100   ac_objc_werror_flag=$ac_save_objc_werror_flag
21101fi
21102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21103$as_echo "$ac_cv_prog_objc_g" >&6; }
21104if test "$ac_test_OBJCFLAGS" = set; then
21105  OBJCFLAGS=$ac_save_OBJCFLAGS
21106elif test $ac_cv_prog_objc_g = yes; then
21107  if test "$GOBJC" = yes; then
21108    OBJCFLAGS="-g -O2"
21109  else
21110    OBJCFLAGS="-g"
21111  fi
21112else
21113  if test "$GOBJC" = yes; then
21114    OBJCFLAGS="-O2"
21115  else
21116    OBJCFLAGS=
21117  fi
21118fi
21119ac_ext=cpp
21120ac_cpp='$CXXCPP $CPPFLAGS'
21121ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21122ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21123ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21124
21125
21126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21127
21128  # First separate the path from the arguments. This will split at the first
21129  # space.
21130  complete="$OBJC"
21131  path="${complete%% *}"
21132  tmp="$complete EOL"
21133  arguments="${tmp#* }"
21134
21135  # Input might be given as Windows format, start by converting to
21136  # unix format.
21137  new_path=`$CYGPATH -u "$path"`
21138
21139  # Now try to locate executable using which
21140  new_path=`$WHICH "$new_path" 2> /dev/null`
21141  # bat and cmd files are not always considered executable in cygwin causing which
21142  # to not find them
21143  if test "x$new_path" = x \
21144           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21145           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21146    new_path=`$CYGPATH -u "$path"`
21147  fi
21148  if test "x$new_path" = x; then
21149    # Oops. Which didn't find the executable.
21150    # The splitting of arguments from the executable at a space might have been incorrect,
21151    # since paths with space are more likely in Windows. Give it another try with the whole
21152    # argument.
21153    path="$complete"
21154    arguments="EOL"
21155    new_path=`$CYGPATH -u "$path"`
21156    new_path=`$WHICH "$new_path" 2> /dev/null`
21157    # bat and cmd files are not always considered executable in cygwin causing which
21158    # to not find them
21159    if test "x$new_path" = x \
21160             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21161             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21162      new_path=`$CYGPATH -u "$path"`
21163    fi
21164    if test "x$new_path" = x; then
21165      # It's still not found. Now this is an unrecoverable error.
21166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21167$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21168      has_space=`$ECHO "$complete" | $GREP " "`
21169      if test "x$has_space" != x; then
21170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21172      fi
21173      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21174    fi
21175  fi
21176
21177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21180  # "foo.exe" is OK but "foo" is an error.
21181  #
21182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21183  # It is also a way to make sure we got the proper file name for the real test later on.
21184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21185  if test "x$test_shortpath" = x; then
21186    # Short path failed, file does not exist as specified.
21187    # Try adding .exe or .cmd
21188    if test -f "${new_path}.exe"; then
21189       input_to_shortpath="${new_path}.exe"
21190    elif test -f "${new_path}.cmd"; then
21191       input_to_shortpath="${new_path}.cmd"
21192    else
21193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21194$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21195      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21196$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21197      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21198    fi
21199  else
21200    input_to_shortpath="$new_path"
21201  fi
21202
21203  # Call helper function which possibly converts this using DOS-style short mode.
21204  # If so, the updated path is stored in $new_path.
21205  new_path="$input_to_shortpath"
21206
21207  input_path="$input_to_shortpath"
21208  # Check if we need to convert this using DOS-style short mode. If the path
21209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21210  # take no chances and rewrite it.
21211  # Note: m4 eats our [], so we need to use [ and ] instead.
21212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21213  if test "x$has_forbidden_chars" != x; then
21214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21218      # Going to short mode and back again did indeed matter. Since short mode is
21219      # case insensitive, let's make it lowercase to improve readability.
21220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21221      # Now convert it back to Unix-stile (cygpath)
21222      input_path=`$CYGPATH -u "$shortmode_path"`
21223      new_path="$input_path"
21224    fi
21225  fi
21226
21227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21228  if test "x$test_cygdrive_prefix" = x; then
21229    # As a simple fix, exclude /usr/bin since it's not a real path.
21230    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21232      # a path prefixed by /cygdrive for fixpath to work.
21233      new_path="$CYGWIN_ROOT_PATH$input_path"
21234    fi
21235  fi
21236
21237  # remove trailing .exe if any
21238  new_path="${new_path/%.exe/}"
21239
21240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21241
21242  # First separate the path from the arguments. This will split at the first
21243  # space.
21244  complete="$OBJC"
21245  path="${complete%% *}"
21246  tmp="$complete EOL"
21247  arguments="${tmp#* }"
21248
21249  # Input might be given as Windows format, start by converting to
21250  # unix format.
21251  new_path="$path"
21252
21253  windows_path="$new_path"
21254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21255    unix_path=`$CYGPATH -u "$windows_path"`
21256    new_path="$unix_path"
21257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21259    new_path="$unix_path"
21260  fi
21261
21262
21263  # Now try to locate executable using which
21264  new_path=`$WHICH "$new_path" 2> /dev/null`
21265
21266  if test "x$new_path" = x; then
21267    # Oops. Which didn't find the executable.
21268    # The splitting of arguments from the executable at a space might have been incorrect,
21269    # since paths with space are more likely in Windows. Give it another try with the whole
21270    # argument.
21271    path="$complete"
21272    arguments="EOL"
21273    new_path="$path"
21274
21275  windows_path="$new_path"
21276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21277    unix_path=`$CYGPATH -u "$windows_path"`
21278    new_path="$unix_path"
21279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21281    new_path="$unix_path"
21282  fi
21283
21284
21285    new_path=`$WHICH "$new_path" 2> /dev/null`
21286
21287    if test "x$new_path" = x; then
21288      # It's still not found. Now this is an unrecoverable error.
21289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21290$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21291      has_space=`$ECHO "$complete" | $GREP " "`
21292      if test "x$has_space" != x; then
21293        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21294$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21295      fi
21296      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21297    fi
21298  fi
21299
21300  # Now new_path has a complete unix path to the binary
21301  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21302    # Keep paths in /bin as-is, but remove trailing .exe if any
21303    new_path="${new_path/%.exe/}"
21304    # Do not save /bin paths to all_fixpath_prefixes!
21305  else
21306    # Not in mixed or Windows style, start by that.
21307    new_path=`cmd //c echo $new_path`
21308
21309  input_path="$new_path"
21310  # Check if we need to convert this using DOS-style short mode. If the path
21311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21312  # take no chances and rewrite it.
21313  # Note: m4 eats our [], so we need to use [ and ] instead.
21314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21315  if test "x$has_forbidden_chars" != x; then
21316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21318  fi
21319
21320    # Output is in $new_path
21321
21322  windows_path="$new_path"
21323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21324    unix_path=`$CYGPATH -u "$windows_path"`
21325    new_path="$unix_path"
21326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21328    new_path="$unix_path"
21329  fi
21330
21331    # remove trailing .exe if any
21332    new_path="${new_path/%.exe/}"
21333
21334    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21335    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21336  fi
21337
21338  else
21339    # We're on a posix platform. Hooray! :)
21340    # First separate the path from the arguments. This will split at the first
21341    # space.
21342    complete="$OBJC"
21343    path="${complete%% *}"
21344    tmp="$complete EOL"
21345    arguments="${tmp#* }"
21346
21347    # Cannot rely on the command "which" here since it doesn't always work.
21348    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21349    if test -z "$is_absolute_path"; then
21350      # Path to executable is not absolute. Find it.
21351      IFS_save="$IFS"
21352      IFS=:
21353      for p in $PATH; do
21354        if test -f "$p/$path" && test -x "$p/$path"; then
21355          new_path="$p/$path"
21356          break
21357        fi
21358      done
21359      IFS="$IFS_save"
21360    else
21361      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21362$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21363      new_path="$path"
21364    fi
21365
21366    if test "x$new_path" = x; then
21367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21368$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21369        has_space=`$ECHO "$complete" | $GREP " "`
21370        if test "x$has_space" != x; then
21371          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21372$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21373        fi
21374        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21375      fi
21376  fi
21377
21378      # Now join together the path and the arguments once again
21379      if test "x$arguments" != xEOL; then
21380        new_complete="$new_path ${arguments% *}"
21381      else
21382        new_complete="$new_path"
21383      fi
21384
21385  if test "x$complete" != "x$new_complete"; then
21386      OBJC="$new_complete"
21387      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21388$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21389    fi
21390
21391else
21392    OBJC=
21393fi
21394
21395# Restore the flags to the user specified values.
21396# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21397CFLAGS="$ORG_CFLAGS"
21398CXXFLAGS="$ORG_CXXFLAGS"
21399OBJCFLAGS="$ORG_OBJCFLAGS"
21400
21401LD="$CC"
21402LDEXE="$CC"
21403LDCXX="$CXX"
21404LDEXECXX="$CXX"
21405
21406# LDEXE is the linker to use, when creating executables.
21407
21408# Linking C++ libraries.
21409
21410# Linking C++ executables.
21411
21412
21413if test "x$OPENJDK_TARGET_OS" != xwindows; then
21414    if test -n "$ac_tool_prefix"; then
21415  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21416set dummy ${ac_tool_prefix}ar; ac_word=$2
21417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21418$as_echo_n "checking for $ac_word... " >&6; }
21419if test "${ac_cv_prog_AR+set}" = set; then :
21420  $as_echo_n "(cached) " >&6
21421else
21422  if test -n "$AR"; then
21423  ac_cv_prog_AR="$AR" # Let the user override the test.
21424else
21425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21426for as_dir in $PATH
21427do
21428  IFS=$as_save_IFS
21429  test -z "$as_dir" && as_dir=.
21430    for ac_exec_ext in '' $ac_executable_extensions; do
21431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21432    ac_cv_prog_AR="${ac_tool_prefix}ar"
21433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21434    break 2
21435  fi
21436done
21437  done
21438IFS=$as_save_IFS
21439
21440fi
21441fi
21442AR=$ac_cv_prog_AR
21443if test -n "$AR"; then
21444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21445$as_echo "$AR" >&6; }
21446else
21447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21448$as_echo "no" >&6; }
21449fi
21450
21451
21452fi
21453if test -z "$ac_cv_prog_AR"; then
21454  ac_ct_AR=$AR
21455  # Extract the first word of "ar", so it can be a program name with args.
21456set dummy ar; ac_word=$2
21457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21458$as_echo_n "checking for $ac_word... " >&6; }
21459if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21460  $as_echo_n "(cached) " >&6
21461else
21462  if test -n "$ac_ct_AR"; then
21463  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21464else
21465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21466for as_dir in $PATH
21467do
21468  IFS=$as_save_IFS
21469  test -z "$as_dir" && as_dir=.
21470    for ac_exec_ext in '' $ac_executable_extensions; do
21471  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21472    ac_cv_prog_ac_ct_AR="ar"
21473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21474    break 2
21475  fi
21476done
21477  done
21478IFS=$as_save_IFS
21479
21480fi
21481fi
21482ac_ct_AR=$ac_cv_prog_ac_ct_AR
21483if test -n "$ac_ct_AR"; then
21484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21485$as_echo "$ac_ct_AR" >&6; }
21486else
21487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21488$as_echo "no" >&6; }
21489fi
21490
21491  if test "x$ac_ct_AR" = x; then
21492    AR=""
21493  else
21494    case $cross_compiling:$ac_tool_warned in
21495yes:)
21496{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21497$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21498ac_tool_warned=yes ;;
21499esac
21500    AR=$ac_ct_AR
21501  fi
21502else
21503  AR="$ac_cv_prog_AR"
21504fi
21505
21506
21507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21508
21509  # First separate the path from the arguments. This will split at the first
21510  # space.
21511  complete="$AR"
21512  path="${complete%% *}"
21513  tmp="$complete EOL"
21514  arguments="${tmp#* }"
21515
21516  # Input might be given as Windows format, start by converting to
21517  # unix format.
21518  new_path=`$CYGPATH -u "$path"`
21519
21520  # Now try to locate executable using which
21521  new_path=`$WHICH "$new_path" 2> /dev/null`
21522  # bat and cmd files are not always considered executable in cygwin causing which
21523  # to not find them
21524  if test "x$new_path" = x \
21525           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21526           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21527    new_path=`$CYGPATH -u "$path"`
21528  fi
21529  if test "x$new_path" = x; then
21530    # Oops. Which didn't find the executable.
21531    # The splitting of arguments from the executable at a space might have been incorrect,
21532    # since paths with space are more likely in Windows. Give it another try with the whole
21533    # argument.
21534    path="$complete"
21535    arguments="EOL"
21536    new_path=`$CYGPATH -u "$path"`
21537    new_path=`$WHICH "$new_path" 2> /dev/null`
21538    # bat and cmd files are not always considered executable in cygwin causing which
21539    # to not find them
21540    if test "x$new_path" = x \
21541             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21542             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21543      new_path=`$CYGPATH -u "$path"`
21544    fi
21545    if test "x$new_path" = x; then
21546      # It's still not found. Now this is an unrecoverable error.
21547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21548$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21549      has_space=`$ECHO "$complete" | $GREP " "`
21550      if test "x$has_space" != x; then
21551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21553      fi
21554      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21555    fi
21556  fi
21557
21558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21561  # "foo.exe" is OK but "foo" is an error.
21562  #
21563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21564  # It is also a way to make sure we got the proper file name for the real test later on.
21565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21566  if test "x$test_shortpath" = x; then
21567    # Short path failed, file does not exist as specified.
21568    # Try adding .exe or .cmd
21569    if test -f "${new_path}.exe"; then
21570       input_to_shortpath="${new_path}.exe"
21571    elif test -f "${new_path}.cmd"; then
21572       input_to_shortpath="${new_path}.cmd"
21573    else
21574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21575$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21576      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21577$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21578      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21579    fi
21580  else
21581    input_to_shortpath="$new_path"
21582  fi
21583
21584  # Call helper function which possibly converts this using DOS-style short mode.
21585  # If so, the updated path is stored in $new_path.
21586  new_path="$input_to_shortpath"
21587
21588  input_path="$input_to_shortpath"
21589  # Check if we need to convert this using DOS-style short mode. If the path
21590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21591  # take no chances and rewrite it.
21592  # Note: m4 eats our [], so we need to use [ and ] instead.
21593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21594  if test "x$has_forbidden_chars" != x; then
21595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21599      # Going to short mode and back again did indeed matter. Since short mode is
21600      # case insensitive, let's make it lowercase to improve readability.
21601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21602      # Now convert it back to Unix-stile (cygpath)
21603      input_path=`$CYGPATH -u "$shortmode_path"`
21604      new_path="$input_path"
21605    fi
21606  fi
21607
21608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21609  if test "x$test_cygdrive_prefix" = x; then
21610    # As a simple fix, exclude /usr/bin since it's not a real path.
21611    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21613      # a path prefixed by /cygdrive for fixpath to work.
21614      new_path="$CYGWIN_ROOT_PATH$input_path"
21615    fi
21616  fi
21617
21618  # remove trailing .exe if any
21619  new_path="${new_path/%.exe/}"
21620
21621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21622
21623  # First separate the path from the arguments. This will split at the first
21624  # space.
21625  complete="$AR"
21626  path="${complete%% *}"
21627  tmp="$complete EOL"
21628  arguments="${tmp#* }"
21629
21630  # Input might be given as Windows format, start by converting to
21631  # unix format.
21632  new_path="$path"
21633
21634  windows_path="$new_path"
21635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21636    unix_path=`$CYGPATH -u "$windows_path"`
21637    new_path="$unix_path"
21638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21640    new_path="$unix_path"
21641  fi
21642
21643
21644  # Now try to locate executable using which
21645  new_path=`$WHICH "$new_path" 2> /dev/null`
21646
21647  if test "x$new_path" = x; then
21648    # Oops. Which didn't find the executable.
21649    # The splitting of arguments from the executable at a space might have been incorrect,
21650    # since paths with space are more likely in Windows. Give it another try with the whole
21651    # argument.
21652    path="$complete"
21653    arguments="EOL"
21654    new_path="$path"
21655
21656  windows_path="$new_path"
21657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21658    unix_path=`$CYGPATH -u "$windows_path"`
21659    new_path="$unix_path"
21660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21662    new_path="$unix_path"
21663  fi
21664
21665
21666    new_path=`$WHICH "$new_path" 2> /dev/null`
21667
21668    if test "x$new_path" = x; then
21669      # It's still not found. Now this is an unrecoverable error.
21670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21671$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21672      has_space=`$ECHO "$complete" | $GREP " "`
21673      if test "x$has_space" != x; then
21674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21676      fi
21677      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21678    fi
21679  fi
21680
21681  # Now new_path has a complete unix path to the binary
21682  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21683    # Keep paths in /bin as-is, but remove trailing .exe if any
21684    new_path="${new_path/%.exe/}"
21685    # Do not save /bin paths to all_fixpath_prefixes!
21686  else
21687    # Not in mixed or Windows style, start by that.
21688    new_path=`cmd //c echo $new_path`
21689
21690  input_path="$new_path"
21691  # Check if we need to convert this using DOS-style short mode. If the path
21692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21693  # take no chances and rewrite it.
21694  # Note: m4 eats our [], so we need to use [ and ] instead.
21695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21696  if test "x$has_forbidden_chars" != x; then
21697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21699  fi
21700
21701    # Output is in $new_path
21702
21703  windows_path="$new_path"
21704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21705    unix_path=`$CYGPATH -u "$windows_path"`
21706    new_path="$unix_path"
21707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21709    new_path="$unix_path"
21710  fi
21711
21712    # remove trailing .exe if any
21713    new_path="${new_path/%.exe/}"
21714
21715    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21716    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21717  fi
21718
21719  else
21720    # We're on a posix platform. Hooray! :)
21721    # First separate the path from the arguments. This will split at the first
21722    # space.
21723    complete="$AR"
21724    path="${complete%% *}"
21725    tmp="$complete EOL"
21726    arguments="${tmp#* }"
21727
21728    # Cannot rely on the command "which" here since it doesn't always work.
21729    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21730    if test -z "$is_absolute_path"; then
21731      # Path to executable is not absolute. Find it.
21732      IFS_save="$IFS"
21733      IFS=:
21734      for p in $PATH; do
21735        if test -f "$p/$path" && test -x "$p/$path"; then
21736          new_path="$p/$path"
21737          break
21738        fi
21739      done
21740      IFS="$IFS_save"
21741    else
21742      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21743$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21744      new_path="$path"
21745    fi
21746
21747    if test "x$new_path" = x; then
21748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21749$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21750        has_space=`$ECHO "$complete" | $GREP " "`
21751        if test "x$has_space" != x; then
21752          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21753$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21754        fi
21755        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21756      fi
21757  fi
21758
21759      # Now join together the path and the arguments once again
21760      if test "x$arguments" != xEOL; then
21761        new_complete="$new_path ${arguments% *}"
21762      else
21763        new_complete="$new_path"
21764      fi
21765
21766  if test "x$complete" != "x$new_complete"; then
21767      AR="$new_complete"
21768      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21769$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21770    fi
21771
21772fi
21773if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21774    ARFLAGS="-r"
21775else
21776    ARFLAGS=""
21777fi
21778
21779
21780# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21781HOTSPOT_CXX="$CXX"
21782HOTSPOT_LD="$LD"
21783
21784
21785
21786COMPILER_NAME=gcc
21787COMPILER_TYPE=CC
21788if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21789
21790    # For now, assume that we are always compiling using cl.exe.
21791    CC_OUT_OPTION=-Fo
21792    EXE_OUT_OPTION=-out:
21793    LD_OUT_OPTION=-out:
21794    AR_OUT_OPTION=-out:
21795    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21796    # program for something completely different.
21797    # Extract the first word of "link", so it can be a program name with args.
21798set dummy link; ac_word=$2
21799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21800$as_echo_n "checking for $ac_word... " >&6; }
21801if test "${ac_cv_prog_WINLD+set}" = set; then :
21802  $as_echo_n "(cached) " >&6
21803else
21804  if test -n "$WINLD"; then
21805  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21806else
21807  ac_prog_rejected=no
21808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21809for as_dir in $PATH
21810do
21811  IFS=$as_save_IFS
21812  test -z "$as_dir" && as_dir=.
21813    for ac_exec_ext in '' $ac_executable_extensions; do
21814  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21815    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21816       ac_prog_rejected=yes
21817       continue
21818     fi
21819    ac_cv_prog_WINLD="link"
21820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21821    break 2
21822  fi
21823done
21824  done
21825IFS=$as_save_IFS
21826
21827if test $ac_prog_rejected = yes; then
21828  # We found a bogon in the path, so make sure we never use it.
21829  set dummy $ac_cv_prog_WINLD
21830  shift
21831  if test $# != 0; then
21832    # We chose a different compiler from the bogus one.
21833    # However, it has the same basename, so the bogon will be chosen
21834    # first if we set WINLD to just the basename; use the full file name.
21835    shift
21836    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21837  fi
21838fi
21839fi
21840fi
21841WINLD=$ac_cv_prog_WINLD
21842if test -n "$WINLD"; then
21843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21844$as_echo "$WINLD" >&6; }
21845else
21846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21847$as_echo "no" >&6; }
21848fi
21849
21850
21851    # Since we must ignore the first found link, WINLD will contain
21852    # the full path to the link.exe program.
21853
21854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21855
21856  # First separate the path from the arguments. This will split at the first
21857  # space.
21858  complete="$WINLD"
21859  path="${complete%% *}"
21860  tmp="$complete EOL"
21861  arguments="${tmp#* }"
21862
21863  # Input might be given as Windows format, start by converting to
21864  # unix format.
21865  new_path=`$CYGPATH -u "$path"`
21866
21867  # Now try to locate executable using which
21868  new_path=`$WHICH "$new_path" 2> /dev/null`
21869  # bat and cmd files are not always considered executable in cygwin causing which
21870  # to not find them
21871  if test "x$new_path" = x \
21872           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21873           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21874    new_path=`$CYGPATH -u "$path"`
21875  fi
21876  if test "x$new_path" = x; then
21877    # Oops. Which didn't find the executable.
21878    # The splitting of arguments from the executable at a space might have been incorrect,
21879    # since paths with space are more likely in Windows. Give it another try with the whole
21880    # argument.
21881    path="$complete"
21882    arguments="EOL"
21883    new_path=`$CYGPATH -u "$path"`
21884    new_path=`$WHICH "$new_path" 2> /dev/null`
21885    # bat and cmd files are not always considered executable in cygwin causing which
21886    # to not find them
21887    if test "x$new_path" = x \
21888             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21889             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21890      new_path=`$CYGPATH -u "$path"`
21891    fi
21892    if test "x$new_path" = x; then
21893      # It's still not found. Now this is an unrecoverable error.
21894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21895$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21896      has_space=`$ECHO "$complete" | $GREP " "`
21897      if test "x$has_space" != x; then
21898        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21899$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21900      fi
21901      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21902    fi
21903  fi
21904
21905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21908  # "foo.exe" is OK but "foo" is an error.
21909  #
21910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21911  # It is also a way to make sure we got the proper file name for the real test later on.
21912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21913  if test "x$test_shortpath" = x; then
21914    # Short path failed, file does not exist as specified.
21915    # Try adding .exe or .cmd
21916    if test -f "${new_path}.exe"; then
21917       input_to_shortpath="${new_path}.exe"
21918    elif test -f "${new_path}.cmd"; then
21919       input_to_shortpath="${new_path}.cmd"
21920    else
21921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21922$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21923      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21924$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21925      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21926    fi
21927  else
21928    input_to_shortpath="$new_path"
21929  fi
21930
21931  # Call helper function which possibly converts this using DOS-style short mode.
21932  # If so, the updated path is stored in $new_path.
21933  new_path="$input_to_shortpath"
21934
21935  input_path="$input_to_shortpath"
21936  # Check if we need to convert this using DOS-style short mode. If the path
21937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21938  # take no chances and rewrite it.
21939  # Note: m4 eats our [], so we need to use [ and ] instead.
21940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21941  if test "x$has_forbidden_chars" != x; then
21942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21946      # Going to short mode and back again did indeed matter. Since short mode is
21947      # case insensitive, let's make it lowercase to improve readability.
21948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21949      # Now convert it back to Unix-stile (cygpath)
21950      input_path=`$CYGPATH -u "$shortmode_path"`
21951      new_path="$input_path"
21952    fi
21953  fi
21954
21955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21956  if test "x$test_cygdrive_prefix" = x; then
21957    # As a simple fix, exclude /usr/bin since it's not a real path.
21958    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21960      # a path prefixed by /cygdrive for fixpath to work.
21961      new_path="$CYGWIN_ROOT_PATH$input_path"
21962    fi
21963  fi
21964
21965  # remove trailing .exe if any
21966  new_path="${new_path/%.exe/}"
21967
21968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21969
21970  # First separate the path from the arguments. This will split at the first
21971  # space.
21972  complete="$WINLD"
21973  path="${complete%% *}"
21974  tmp="$complete EOL"
21975  arguments="${tmp#* }"
21976
21977  # Input might be given as Windows format, start by converting to
21978  # unix format.
21979  new_path="$path"
21980
21981  windows_path="$new_path"
21982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21983    unix_path=`$CYGPATH -u "$windows_path"`
21984    new_path="$unix_path"
21985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21987    new_path="$unix_path"
21988  fi
21989
21990
21991  # Now try to locate executable using which
21992  new_path=`$WHICH "$new_path" 2> /dev/null`
21993
21994  if test "x$new_path" = x; then
21995    # Oops. Which didn't find the executable.
21996    # The splitting of arguments from the executable at a space might have been incorrect,
21997    # since paths with space are more likely in Windows. Give it another try with the whole
21998    # argument.
21999    path="$complete"
22000    arguments="EOL"
22001    new_path="$path"
22002
22003  windows_path="$new_path"
22004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22005    unix_path=`$CYGPATH -u "$windows_path"`
22006    new_path="$unix_path"
22007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22009    new_path="$unix_path"
22010  fi
22011
22012
22013    new_path=`$WHICH "$new_path" 2> /dev/null`
22014
22015    if test "x$new_path" = x; then
22016      # It's still not found. Now this is an unrecoverable error.
22017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22018$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22019      has_space=`$ECHO "$complete" | $GREP " "`
22020      if test "x$has_space" != x; then
22021        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22022$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22023      fi
22024      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22025    fi
22026  fi
22027
22028  # Now new_path has a complete unix path to the binary
22029  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22030    # Keep paths in /bin as-is, but remove trailing .exe if any
22031    new_path="${new_path/%.exe/}"
22032    # Do not save /bin paths to all_fixpath_prefixes!
22033  else
22034    # Not in mixed or Windows style, start by that.
22035    new_path=`cmd //c echo $new_path`
22036
22037  input_path="$new_path"
22038  # Check if we need to convert this using DOS-style short mode. If the path
22039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22040  # take no chances and rewrite it.
22041  # Note: m4 eats our [], so we need to use [ and ] instead.
22042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22043  if test "x$has_forbidden_chars" != x; then
22044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22046  fi
22047
22048    # Output is in $new_path
22049
22050  windows_path="$new_path"
22051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22052    unix_path=`$CYGPATH -u "$windows_path"`
22053    new_path="$unix_path"
22054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22056    new_path="$unix_path"
22057  fi
22058
22059    # remove trailing .exe if any
22060    new_path="${new_path/%.exe/}"
22061
22062    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22063    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22064  fi
22065
22066  else
22067    # We're on a posix platform. Hooray! :)
22068    # First separate the path from the arguments. This will split at the first
22069    # space.
22070    complete="$WINLD"
22071    path="${complete%% *}"
22072    tmp="$complete EOL"
22073    arguments="${tmp#* }"
22074
22075    # Cannot rely on the command "which" here since it doesn't always work.
22076    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22077    if test -z "$is_absolute_path"; then
22078      # Path to executable is not absolute. Find it.
22079      IFS_save="$IFS"
22080      IFS=:
22081      for p in $PATH; do
22082        if test -f "$p/$path" && test -x "$p/$path"; then
22083          new_path="$p/$path"
22084          break
22085        fi
22086      done
22087      IFS="$IFS_save"
22088    else
22089      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22090$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22091      new_path="$path"
22092    fi
22093
22094    if test "x$new_path" = x; then
22095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22096$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22097        has_space=`$ECHO "$complete" | $GREP " "`
22098        if test "x$has_space" != x; then
22099          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22100$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22101        fi
22102        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22103      fi
22104  fi
22105
22106      # Now join together the path and the arguments once again
22107      if test "x$arguments" != xEOL; then
22108        new_complete="$new_path ${arguments% *}"
22109      else
22110        new_complete="$new_path"
22111      fi
22112
22113  if test "x$complete" != "x$new_complete"; then
22114      WINLD="$new_complete"
22115      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22116$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22117    fi
22118
22119    printf "Windows linker was found at $WINLD\n"
22120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22121$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22122    "$WINLD" --version > /dev/null
22123    if test $? -eq 0 ; then
22124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22125$as_echo "no" >&6; }
22126      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22127    else
22128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22129$as_echo "yes" >&6; }
22130    fi
22131    LD="$WINLD"
22132    LDEXE="$WINLD"
22133    LDCXX="$WINLD"
22134    LDEXECXX="$WINLD"
22135
22136    # Extract the first word of "mt", so it can be a program name with args.
22137set dummy mt; ac_word=$2
22138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22139$as_echo_n "checking for $ac_word... " >&6; }
22140if test "${ac_cv_prog_MT+set}" = set; then :
22141  $as_echo_n "(cached) " >&6
22142else
22143  if test -n "$MT"; then
22144  ac_cv_prog_MT="$MT" # Let the user override the test.
22145else
22146  ac_prog_rejected=no
22147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22148for as_dir in $PATH
22149do
22150  IFS=$as_save_IFS
22151  test -z "$as_dir" && as_dir=.
22152    for ac_exec_ext in '' $ac_executable_extensions; do
22153  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22154    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22155       ac_prog_rejected=yes
22156       continue
22157     fi
22158    ac_cv_prog_MT="mt"
22159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22160    break 2
22161  fi
22162done
22163  done
22164IFS=$as_save_IFS
22165
22166if test $ac_prog_rejected = yes; then
22167  # We found a bogon in the path, so make sure we never use it.
22168  set dummy $ac_cv_prog_MT
22169  shift
22170  if test $# != 0; then
22171    # We chose a different compiler from the bogus one.
22172    # However, it has the same basename, so the bogon will be chosen
22173    # first if we set MT to just the basename; use the full file name.
22174    shift
22175    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22176  fi
22177fi
22178fi
22179fi
22180MT=$ac_cv_prog_MT
22181if test -n "$MT"; then
22182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22183$as_echo "$MT" >&6; }
22184else
22185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22186$as_echo "no" >&6; }
22187fi
22188
22189
22190
22191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22192
22193  # First separate the path from the arguments. This will split at the first
22194  # space.
22195  complete="$MT"
22196  path="${complete%% *}"
22197  tmp="$complete EOL"
22198  arguments="${tmp#* }"
22199
22200  # Input might be given as Windows format, start by converting to
22201  # unix format.
22202  new_path=`$CYGPATH -u "$path"`
22203
22204  # Now try to locate executable using which
22205  new_path=`$WHICH "$new_path" 2> /dev/null`
22206  # bat and cmd files are not always considered executable in cygwin causing which
22207  # to not find them
22208  if test "x$new_path" = x \
22209           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22210           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22211    new_path=`$CYGPATH -u "$path"`
22212  fi
22213  if test "x$new_path" = x; then
22214    # Oops. Which didn't find the executable.
22215    # The splitting of arguments from the executable at a space might have been incorrect,
22216    # since paths with space are more likely in Windows. Give it another try with the whole
22217    # argument.
22218    path="$complete"
22219    arguments="EOL"
22220    new_path=`$CYGPATH -u "$path"`
22221    new_path=`$WHICH "$new_path" 2> /dev/null`
22222    # bat and cmd files are not always considered executable in cygwin causing which
22223    # to not find them
22224    if test "x$new_path" = x \
22225             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22226             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22227      new_path=`$CYGPATH -u "$path"`
22228    fi
22229    if test "x$new_path" = x; then
22230      # It's still not found. Now this is an unrecoverable error.
22231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22232$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22233      has_space=`$ECHO "$complete" | $GREP " "`
22234      if test "x$has_space" != x; then
22235        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22236$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22237      fi
22238      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22239    fi
22240  fi
22241
22242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22245  # "foo.exe" is OK but "foo" is an error.
22246  #
22247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22248  # It is also a way to make sure we got the proper file name for the real test later on.
22249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22250  if test "x$test_shortpath" = x; then
22251    # Short path failed, file does not exist as specified.
22252    # Try adding .exe or .cmd
22253    if test -f "${new_path}.exe"; then
22254       input_to_shortpath="${new_path}.exe"
22255    elif test -f "${new_path}.cmd"; then
22256       input_to_shortpath="${new_path}.cmd"
22257    else
22258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22259$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22260      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22261$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22262      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22263    fi
22264  else
22265    input_to_shortpath="$new_path"
22266  fi
22267
22268  # Call helper function which possibly converts this using DOS-style short mode.
22269  # If so, the updated path is stored in $new_path.
22270  new_path="$input_to_shortpath"
22271
22272  input_path="$input_to_shortpath"
22273  # Check if we need to convert this using DOS-style short mode. If the path
22274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22275  # take no chances and rewrite it.
22276  # Note: m4 eats our [], so we need to use [ and ] instead.
22277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22278  if test "x$has_forbidden_chars" != x; then
22279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22283      # Going to short mode and back again did indeed matter. Since short mode is
22284      # case insensitive, let's make it lowercase to improve readability.
22285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22286      # Now convert it back to Unix-stile (cygpath)
22287      input_path=`$CYGPATH -u "$shortmode_path"`
22288      new_path="$input_path"
22289    fi
22290  fi
22291
22292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22293  if test "x$test_cygdrive_prefix" = x; then
22294    # As a simple fix, exclude /usr/bin since it's not a real path.
22295    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22297      # a path prefixed by /cygdrive for fixpath to work.
22298      new_path="$CYGWIN_ROOT_PATH$input_path"
22299    fi
22300  fi
22301
22302  # remove trailing .exe if any
22303  new_path="${new_path/%.exe/}"
22304
22305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22306
22307  # First separate the path from the arguments. This will split at the first
22308  # space.
22309  complete="$MT"
22310  path="${complete%% *}"
22311  tmp="$complete EOL"
22312  arguments="${tmp#* }"
22313
22314  # Input might be given as Windows format, start by converting to
22315  # unix format.
22316  new_path="$path"
22317
22318  windows_path="$new_path"
22319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22320    unix_path=`$CYGPATH -u "$windows_path"`
22321    new_path="$unix_path"
22322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22324    new_path="$unix_path"
22325  fi
22326
22327
22328  # Now try to locate executable using which
22329  new_path=`$WHICH "$new_path" 2> /dev/null`
22330
22331  if test "x$new_path" = x; then
22332    # Oops. Which didn't find the executable.
22333    # The splitting of arguments from the executable at a space might have been incorrect,
22334    # since paths with space are more likely in Windows. Give it another try with the whole
22335    # argument.
22336    path="$complete"
22337    arguments="EOL"
22338    new_path="$path"
22339
22340  windows_path="$new_path"
22341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22342    unix_path=`$CYGPATH -u "$windows_path"`
22343    new_path="$unix_path"
22344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22346    new_path="$unix_path"
22347  fi
22348
22349
22350    new_path=`$WHICH "$new_path" 2> /dev/null`
22351
22352    if test "x$new_path" = x; then
22353      # It's still not found. Now this is an unrecoverable error.
22354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22355$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22356      has_space=`$ECHO "$complete" | $GREP " "`
22357      if test "x$has_space" != x; then
22358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22360      fi
22361      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22362    fi
22363  fi
22364
22365  # Now new_path has a complete unix path to the binary
22366  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22367    # Keep paths in /bin as-is, but remove trailing .exe if any
22368    new_path="${new_path/%.exe/}"
22369    # Do not save /bin paths to all_fixpath_prefixes!
22370  else
22371    # Not in mixed or Windows style, start by that.
22372    new_path=`cmd //c echo $new_path`
22373
22374  input_path="$new_path"
22375  # Check if we need to convert this using DOS-style short mode. If the path
22376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22377  # take no chances and rewrite it.
22378  # Note: m4 eats our [], so we need to use [ and ] instead.
22379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22380  if test "x$has_forbidden_chars" != x; then
22381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22383  fi
22384
22385    # Output is in $new_path
22386
22387  windows_path="$new_path"
22388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22389    unix_path=`$CYGPATH -u "$windows_path"`
22390    new_path="$unix_path"
22391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22393    new_path="$unix_path"
22394  fi
22395
22396    # remove trailing .exe if any
22397    new_path="${new_path/%.exe/}"
22398
22399    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22400    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22401  fi
22402
22403  else
22404    # We're on a posix platform. Hooray! :)
22405    # First separate the path from the arguments. This will split at the first
22406    # space.
22407    complete="$MT"
22408    path="${complete%% *}"
22409    tmp="$complete EOL"
22410    arguments="${tmp#* }"
22411
22412    # Cannot rely on the command "which" here since it doesn't always work.
22413    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22414    if test -z "$is_absolute_path"; then
22415      # Path to executable is not absolute. Find it.
22416      IFS_save="$IFS"
22417      IFS=:
22418      for p in $PATH; do
22419        if test -f "$p/$path" && test -x "$p/$path"; then
22420          new_path="$p/$path"
22421          break
22422        fi
22423      done
22424      IFS="$IFS_save"
22425    else
22426      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22427$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22428      new_path="$path"
22429    fi
22430
22431    if test "x$new_path" = x; then
22432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22433$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22434        has_space=`$ECHO "$complete" | $GREP " "`
22435        if test "x$has_space" != x; then
22436          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22437$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22438        fi
22439        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22440      fi
22441  fi
22442
22443      # Now join together the path and the arguments once again
22444      if test "x$arguments" != xEOL; then
22445        new_complete="$new_path ${arguments% *}"
22446      else
22447        new_complete="$new_path"
22448      fi
22449
22450  if test "x$complete" != "x$new_complete"; then
22451      MT="$new_complete"
22452      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22453$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22454    fi
22455
22456    # The resource compiler
22457    # Extract the first word of "rc", so it can be a program name with args.
22458set dummy rc; ac_word=$2
22459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22460$as_echo_n "checking for $ac_word... " >&6; }
22461if test "${ac_cv_prog_RC+set}" = set; then :
22462  $as_echo_n "(cached) " >&6
22463else
22464  if test -n "$RC"; then
22465  ac_cv_prog_RC="$RC" # Let the user override the test.
22466else
22467  ac_prog_rejected=no
22468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22469for as_dir in $PATH
22470do
22471  IFS=$as_save_IFS
22472  test -z "$as_dir" && as_dir=.
22473    for ac_exec_ext in '' $ac_executable_extensions; do
22474  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22475    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22476       ac_prog_rejected=yes
22477       continue
22478     fi
22479    ac_cv_prog_RC="rc"
22480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22481    break 2
22482  fi
22483done
22484  done
22485IFS=$as_save_IFS
22486
22487if test $ac_prog_rejected = yes; then
22488  # We found a bogon in the path, so make sure we never use it.
22489  set dummy $ac_cv_prog_RC
22490  shift
22491  if test $# != 0; then
22492    # We chose a different compiler from the bogus one.
22493    # However, it has the same basename, so the bogon will be chosen
22494    # first if we set RC to just the basename; use the full file name.
22495    shift
22496    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22497  fi
22498fi
22499fi
22500fi
22501RC=$ac_cv_prog_RC
22502if test -n "$RC"; then
22503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22504$as_echo "$RC" >&6; }
22505else
22506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22507$as_echo "no" >&6; }
22508fi
22509
22510
22511
22512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22513
22514  # First separate the path from the arguments. This will split at the first
22515  # space.
22516  complete="$RC"
22517  path="${complete%% *}"
22518  tmp="$complete EOL"
22519  arguments="${tmp#* }"
22520
22521  # Input might be given as Windows format, start by converting to
22522  # unix format.
22523  new_path=`$CYGPATH -u "$path"`
22524
22525  # Now try to locate executable using which
22526  new_path=`$WHICH "$new_path" 2> /dev/null`
22527  # bat and cmd files are not always considered executable in cygwin causing which
22528  # to not find them
22529  if test "x$new_path" = x \
22530           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22531           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22532    new_path=`$CYGPATH -u "$path"`
22533  fi
22534  if test "x$new_path" = x; then
22535    # Oops. Which didn't find the executable.
22536    # The splitting of arguments from the executable at a space might have been incorrect,
22537    # since paths with space are more likely in Windows. Give it another try with the whole
22538    # argument.
22539    path="$complete"
22540    arguments="EOL"
22541    new_path=`$CYGPATH -u "$path"`
22542    new_path=`$WHICH "$new_path" 2> /dev/null`
22543    # bat and cmd files are not always considered executable in cygwin causing which
22544    # to not find them
22545    if test "x$new_path" = x \
22546             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22547             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22548      new_path=`$CYGPATH -u "$path"`
22549    fi
22550    if test "x$new_path" = x; then
22551      # It's still not found. Now this is an unrecoverable error.
22552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22553$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22554      has_space=`$ECHO "$complete" | $GREP " "`
22555      if test "x$has_space" != x; then
22556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22558      fi
22559      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22560    fi
22561  fi
22562
22563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22566  # "foo.exe" is OK but "foo" is an error.
22567  #
22568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22569  # It is also a way to make sure we got the proper file name for the real test later on.
22570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22571  if test "x$test_shortpath" = x; then
22572    # Short path failed, file does not exist as specified.
22573    # Try adding .exe or .cmd
22574    if test -f "${new_path}.exe"; then
22575       input_to_shortpath="${new_path}.exe"
22576    elif test -f "${new_path}.cmd"; then
22577       input_to_shortpath="${new_path}.cmd"
22578    else
22579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22580$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22581      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22582$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22583      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22584    fi
22585  else
22586    input_to_shortpath="$new_path"
22587  fi
22588
22589  # Call helper function which possibly converts this using DOS-style short mode.
22590  # If so, the updated path is stored in $new_path.
22591  new_path="$input_to_shortpath"
22592
22593  input_path="$input_to_shortpath"
22594  # Check if we need to convert this using DOS-style short mode. If the path
22595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22596  # take no chances and rewrite it.
22597  # Note: m4 eats our [], so we need to use [ and ] instead.
22598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22599  if test "x$has_forbidden_chars" != x; then
22600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22604      # Going to short mode and back again did indeed matter. Since short mode is
22605      # case insensitive, let's make it lowercase to improve readability.
22606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22607      # Now convert it back to Unix-stile (cygpath)
22608      input_path=`$CYGPATH -u "$shortmode_path"`
22609      new_path="$input_path"
22610    fi
22611  fi
22612
22613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22614  if test "x$test_cygdrive_prefix" = x; then
22615    # As a simple fix, exclude /usr/bin since it's not a real path.
22616    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22618      # a path prefixed by /cygdrive for fixpath to work.
22619      new_path="$CYGWIN_ROOT_PATH$input_path"
22620    fi
22621  fi
22622
22623  # remove trailing .exe if any
22624  new_path="${new_path/%.exe/}"
22625
22626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22627
22628  # First separate the path from the arguments. This will split at the first
22629  # space.
22630  complete="$RC"
22631  path="${complete%% *}"
22632  tmp="$complete EOL"
22633  arguments="${tmp#* }"
22634
22635  # Input might be given as Windows format, start by converting to
22636  # unix format.
22637  new_path="$path"
22638
22639  windows_path="$new_path"
22640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22641    unix_path=`$CYGPATH -u "$windows_path"`
22642    new_path="$unix_path"
22643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22645    new_path="$unix_path"
22646  fi
22647
22648
22649  # Now try to locate executable using which
22650  new_path=`$WHICH "$new_path" 2> /dev/null`
22651
22652  if test "x$new_path" = x; then
22653    # Oops. Which didn't find the executable.
22654    # The splitting of arguments from the executable at a space might have been incorrect,
22655    # since paths with space are more likely in Windows. Give it another try with the whole
22656    # argument.
22657    path="$complete"
22658    arguments="EOL"
22659    new_path="$path"
22660
22661  windows_path="$new_path"
22662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22663    unix_path=`$CYGPATH -u "$windows_path"`
22664    new_path="$unix_path"
22665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22667    new_path="$unix_path"
22668  fi
22669
22670
22671    new_path=`$WHICH "$new_path" 2> /dev/null`
22672
22673    if test "x$new_path" = x; then
22674      # It's still not found. Now this is an unrecoverable error.
22675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22676$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22677      has_space=`$ECHO "$complete" | $GREP " "`
22678      if test "x$has_space" != x; then
22679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22681      fi
22682      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22683    fi
22684  fi
22685
22686  # Now new_path has a complete unix path to the binary
22687  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22688    # Keep paths in /bin as-is, but remove trailing .exe if any
22689    new_path="${new_path/%.exe/}"
22690    # Do not save /bin paths to all_fixpath_prefixes!
22691  else
22692    # Not in mixed or Windows style, start by that.
22693    new_path=`cmd //c echo $new_path`
22694
22695  input_path="$new_path"
22696  # Check if we need to convert this using DOS-style short mode. If the path
22697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22698  # take no chances and rewrite it.
22699  # Note: m4 eats our [], so we need to use [ and ] instead.
22700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22701  if test "x$has_forbidden_chars" != x; then
22702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22704  fi
22705
22706    # Output is in $new_path
22707
22708  windows_path="$new_path"
22709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22710    unix_path=`$CYGPATH -u "$windows_path"`
22711    new_path="$unix_path"
22712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22714    new_path="$unix_path"
22715  fi
22716
22717    # remove trailing .exe if any
22718    new_path="${new_path/%.exe/}"
22719
22720    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22721    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22722  fi
22723
22724  else
22725    # We're on a posix platform. Hooray! :)
22726    # First separate the path from the arguments. This will split at the first
22727    # space.
22728    complete="$RC"
22729    path="${complete%% *}"
22730    tmp="$complete EOL"
22731    arguments="${tmp#* }"
22732
22733    # Cannot rely on the command "which" here since it doesn't always work.
22734    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22735    if test -z "$is_absolute_path"; then
22736      # Path to executable is not absolute. Find it.
22737      IFS_save="$IFS"
22738      IFS=:
22739      for p in $PATH; do
22740        if test -f "$p/$path" && test -x "$p/$path"; then
22741          new_path="$p/$path"
22742          break
22743        fi
22744      done
22745      IFS="$IFS_save"
22746    else
22747      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22748$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22749      new_path="$path"
22750    fi
22751
22752    if test "x$new_path" = x; then
22753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22754$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22755        has_space=`$ECHO "$complete" | $GREP " "`
22756        if test "x$has_space" != x; then
22757          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22758$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22759        fi
22760        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22761      fi
22762  fi
22763
22764      # Now join together the path and the arguments once again
22765      if test "x$arguments" != xEOL; then
22766        new_complete="$new_path ${arguments% *}"
22767      else
22768        new_complete="$new_path"
22769      fi
22770
22771  if test "x$complete" != "x$new_complete"; then
22772      RC="$new_complete"
22773      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22774$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22775    fi
22776
22777
22778    # For hotspot, we need these in Windows mixed path,
22779    # so rewrite them all. Need added .exe suffix.
22780    HOTSPOT_CXX="$CXX.exe"
22781    HOTSPOT_LD="$LD.exe"
22782    HOTSPOT_MT="$MT.exe"
22783    HOTSPOT_RC="$RC.exe"
22784
22785  unix_path="$HOTSPOT_CXX"
22786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22787    windows_path=`$CYGPATH -m "$unix_path"`
22788    HOTSPOT_CXX="$windows_path"
22789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22790    windows_path=`cmd //c echo $unix_path`
22791    HOTSPOT_CXX="$windows_path"
22792  fi
22793
22794
22795  unix_path="$HOTSPOT_LD"
22796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22797    windows_path=`$CYGPATH -m "$unix_path"`
22798    HOTSPOT_LD="$windows_path"
22799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22800    windows_path=`cmd //c echo $unix_path`
22801    HOTSPOT_LD="$windows_path"
22802  fi
22803
22804
22805  unix_path="$HOTSPOT_MT"
22806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22807    windows_path=`$CYGPATH -m "$unix_path"`
22808    HOTSPOT_MT="$windows_path"
22809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22810    windows_path=`cmd //c echo $unix_path`
22811    HOTSPOT_MT="$windows_path"
22812  fi
22813
22814
22815  unix_path="$HOTSPOT_RC"
22816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22817    windows_path=`$CYGPATH -m "$unix_path"`
22818    HOTSPOT_RC="$windows_path"
22819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22820    windows_path=`cmd //c echo $unix_path`
22821    HOTSPOT_RC="$windows_path"
22822  fi
22823
22824
22825
22826
22827    RC_FLAGS="-nologo -l 0x409 -r"
22828    if test "x$VARIANT" = xOPT; then :
22829
22830        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22831
22832fi
22833    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22834    if test "x$JDK_UPDATE_VERSION" = x; then :
22835
22836        JDK_UPDATE_VERSION_NOTNULL=0
22837
22838fi
22839    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22840    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22841    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22842    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22843    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22844    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22845    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22846
22847    # lib.exe is used to create static libraries.
22848    # Extract the first word of "lib", so it can be a program name with args.
22849set dummy lib; ac_word=$2
22850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22851$as_echo_n "checking for $ac_word... " >&6; }
22852if test "${ac_cv_prog_WINAR+set}" = set; then :
22853  $as_echo_n "(cached) " >&6
22854else
22855  if test -n "$WINAR"; then
22856  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22857else
22858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22859for as_dir in $PATH
22860do
22861  IFS=$as_save_IFS
22862  test -z "$as_dir" && as_dir=.
22863    for ac_exec_ext in '' $ac_executable_extensions; do
22864  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22865    ac_cv_prog_WINAR="lib"
22866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22867    break 2
22868  fi
22869done
22870  done
22871IFS=$as_save_IFS
22872
22873fi
22874fi
22875WINAR=$ac_cv_prog_WINAR
22876if test -n "$WINAR"; then
22877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22878$as_echo "$WINAR" >&6; }
22879else
22880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22881$as_echo "no" >&6; }
22882fi
22883
22884
22885
22886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22887
22888  # First separate the path from the arguments. This will split at the first
22889  # space.
22890  complete="$WINAR"
22891  path="${complete%% *}"
22892  tmp="$complete EOL"
22893  arguments="${tmp#* }"
22894
22895  # Input might be given as Windows format, start by converting to
22896  # unix format.
22897  new_path=`$CYGPATH -u "$path"`
22898
22899  # Now try to locate executable using which
22900  new_path=`$WHICH "$new_path" 2> /dev/null`
22901  # bat and cmd files are not always considered executable in cygwin causing which
22902  # to not find them
22903  if test "x$new_path" = x \
22904           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22905           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22906    new_path=`$CYGPATH -u "$path"`
22907  fi
22908  if test "x$new_path" = x; then
22909    # Oops. Which didn't find the executable.
22910    # The splitting of arguments from the executable at a space might have been incorrect,
22911    # since paths with space are more likely in Windows. Give it another try with the whole
22912    # argument.
22913    path="$complete"
22914    arguments="EOL"
22915    new_path=`$CYGPATH -u "$path"`
22916    new_path=`$WHICH "$new_path" 2> /dev/null`
22917    # bat and cmd files are not always considered executable in cygwin causing which
22918    # to not find them
22919    if test "x$new_path" = x \
22920             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22921             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22922      new_path=`$CYGPATH -u "$path"`
22923    fi
22924    if test "x$new_path" = x; then
22925      # It's still not found. Now this is an unrecoverable error.
22926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22927$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22928      has_space=`$ECHO "$complete" | $GREP " "`
22929      if test "x$has_space" != x; then
22930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22932      fi
22933      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22934    fi
22935  fi
22936
22937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22940  # "foo.exe" is OK but "foo" is an error.
22941  #
22942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22943  # It is also a way to make sure we got the proper file name for the real test later on.
22944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22945  if test "x$test_shortpath" = x; then
22946    # Short path failed, file does not exist as specified.
22947    # Try adding .exe or .cmd
22948    if test -f "${new_path}.exe"; then
22949       input_to_shortpath="${new_path}.exe"
22950    elif test -f "${new_path}.cmd"; then
22951       input_to_shortpath="${new_path}.cmd"
22952    else
22953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22954$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22955      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22956$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22957      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22958    fi
22959  else
22960    input_to_shortpath="$new_path"
22961  fi
22962
22963  # Call helper function which possibly converts this using DOS-style short mode.
22964  # If so, the updated path is stored in $new_path.
22965  new_path="$input_to_shortpath"
22966
22967  input_path="$input_to_shortpath"
22968  # Check if we need to convert this using DOS-style short mode. If the path
22969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22970  # take no chances and rewrite it.
22971  # Note: m4 eats our [], so we need to use [ and ] instead.
22972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22973  if test "x$has_forbidden_chars" != x; then
22974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22978      # Going to short mode and back again did indeed matter. Since short mode is
22979      # case insensitive, let's make it lowercase to improve readability.
22980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22981      # Now convert it back to Unix-stile (cygpath)
22982      input_path=`$CYGPATH -u "$shortmode_path"`
22983      new_path="$input_path"
22984    fi
22985  fi
22986
22987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22988  if test "x$test_cygdrive_prefix" = x; then
22989    # As a simple fix, exclude /usr/bin since it's not a real path.
22990    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22992      # a path prefixed by /cygdrive for fixpath to work.
22993      new_path="$CYGWIN_ROOT_PATH$input_path"
22994    fi
22995  fi
22996
22997  # remove trailing .exe if any
22998  new_path="${new_path/%.exe/}"
22999
23000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23001
23002  # First separate the path from the arguments. This will split at the first
23003  # space.
23004  complete="$WINAR"
23005  path="${complete%% *}"
23006  tmp="$complete EOL"
23007  arguments="${tmp#* }"
23008
23009  # Input might be given as Windows format, start by converting to
23010  # unix format.
23011  new_path="$path"
23012
23013  windows_path="$new_path"
23014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23015    unix_path=`$CYGPATH -u "$windows_path"`
23016    new_path="$unix_path"
23017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23019    new_path="$unix_path"
23020  fi
23021
23022
23023  # Now try to locate executable using which
23024  new_path=`$WHICH "$new_path" 2> /dev/null`
23025
23026  if test "x$new_path" = x; then
23027    # Oops. Which didn't find the executable.
23028    # The splitting of arguments from the executable at a space might have been incorrect,
23029    # since paths with space are more likely in Windows. Give it another try with the whole
23030    # argument.
23031    path="$complete"
23032    arguments="EOL"
23033    new_path="$path"
23034
23035  windows_path="$new_path"
23036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23037    unix_path=`$CYGPATH -u "$windows_path"`
23038    new_path="$unix_path"
23039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23041    new_path="$unix_path"
23042  fi
23043
23044
23045    new_path=`$WHICH "$new_path" 2> /dev/null`
23046
23047    if test "x$new_path" = x; then
23048      # It's still not found. Now this is an unrecoverable error.
23049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23050$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23051      has_space=`$ECHO "$complete" | $GREP " "`
23052      if test "x$has_space" != x; then
23053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23055      fi
23056      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23057    fi
23058  fi
23059
23060  # Now new_path has a complete unix path to the binary
23061  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23062    # Keep paths in /bin as-is, but remove trailing .exe if any
23063    new_path="${new_path/%.exe/}"
23064    # Do not save /bin paths to all_fixpath_prefixes!
23065  else
23066    # Not in mixed or Windows style, start by that.
23067    new_path=`cmd //c echo $new_path`
23068
23069  input_path="$new_path"
23070  # Check if we need to convert this using DOS-style short mode. If the path
23071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23072  # take no chances and rewrite it.
23073  # Note: m4 eats our [], so we need to use [ and ] instead.
23074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23075  if test "x$has_forbidden_chars" != x; then
23076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23078  fi
23079
23080    # Output is in $new_path
23081
23082  windows_path="$new_path"
23083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23084    unix_path=`$CYGPATH -u "$windows_path"`
23085    new_path="$unix_path"
23086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23088    new_path="$unix_path"
23089  fi
23090
23091    # remove trailing .exe if any
23092    new_path="${new_path/%.exe/}"
23093
23094    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23095    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23096  fi
23097
23098  else
23099    # We're on a posix platform. Hooray! :)
23100    # First separate the path from the arguments. This will split at the first
23101    # space.
23102    complete="$WINAR"
23103    path="${complete%% *}"
23104    tmp="$complete EOL"
23105    arguments="${tmp#* }"
23106
23107    # Cannot rely on the command "which" here since it doesn't always work.
23108    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23109    if test -z "$is_absolute_path"; then
23110      # Path to executable is not absolute. Find it.
23111      IFS_save="$IFS"
23112      IFS=:
23113      for p in $PATH; do
23114        if test -f "$p/$path" && test -x "$p/$path"; then
23115          new_path="$p/$path"
23116          break
23117        fi
23118      done
23119      IFS="$IFS_save"
23120    else
23121      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23122$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23123      new_path="$path"
23124    fi
23125
23126    if test "x$new_path" = x; then
23127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23128$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23129        has_space=`$ECHO "$complete" | $GREP " "`
23130        if test "x$has_space" != x; then
23131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23133        fi
23134        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23135      fi
23136  fi
23137
23138      # Now join together the path and the arguments once again
23139      if test "x$arguments" != xEOL; then
23140        new_complete="$new_path ${arguments% *}"
23141      else
23142        new_complete="$new_path"
23143      fi
23144
23145  if test "x$complete" != "x$new_complete"; then
23146      WINAR="$new_complete"
23147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23148$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23149    fi
23150
23151    AR="$WINAR"
23152    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23153
23154    # Extract the first word of "dumpbin", so it can be a program name with args.
23155set dummy dumpbin; ac_word=$2
23156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23157$as_echo_n "checking for $ac_word... " >&6; }
23158if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23159  $as_echo_n "(cached) " >&6
23160else
23161  if test -n "$DUMPBIN"; then
23162  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23163else
23164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23165for as_dir in $PATH
23166do
23167  IFS=$as_save_IFS
23168  test -z "$as_dir" && as_dir=.
23169    for ac_exec_ext in '' $ac_executable_extensions; do
23170  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23171    ac_cv_prog_DUMPBIN="dumpbin"
23172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23173    break 2
23174  fi
23175done
23176  done
23177IFS=$as_save_IFS
23178
23179fi
23180fi
23181DUMPBIN=$ac_cv_prog_DUMPBIN
23182if test -n "$DUMPBIN"; then
23183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23184$as_echo "$DUMPBIN" >&6; }
23185else
23186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23187$as_echo "no" >&6; }
23188fi
23189
23190
23191
23192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23193
23194  # First separate the path from the arguments. This will split at the first
23195  # space.
23196  complete="$DUMPBIN"
23197  path="${complete%% *}"
23198  tmp="$complete EOL"
23199  arguments="${tmp#* }"
23200
23201  # Input might be given as Windows format, start by converting to
23202  # unix format.
23203  new_path=`$CYGPATH -u "$path"`
23204
23205  # Now try to locate executable using which
23206  new_path=`$WHICH "$new_path" 2> /dev/null`
23207  # bat and cmd files are not always considered executable in cygwin causing which
23208  # to not find them
23209  if test "x$new_path" = x \
23210           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23211           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23212    new_path=`$CYGPATH -u "$path"`
23213  fi
23214  if test "x$new_path" = x; then
23215    # Oops. Which didn't find the executable.
23216    # The splitting of arguments from the executable at a space might have been incorrect,
23217    # since paths with space are more likely in Windows. Give it another try with the whole
23218    # argument.
23219    path="$complete"
23220    arguments="EOL"
23221    new_path=`$CYGPATH -u "$path"`
23222    new_path=`$WHICH "$new_path" 2> /dev/null`
23223    # bat and cmd files are not always considered executable in cygwin causing which
23224    # to not find them
23225    if test "x$new_path" = x \
23226             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23227             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23228      new_path=`$CYGPATH -u "$path"`
23229    fi
23230    if test "x$new_path" = x; then
23231      # It's still not found. Now this is an unrecoverable error.
23232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23233$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23234      has_space=`$ECHO "$complete" | $GREP " "`
23235      if test "x$has_space" != x; then
23236        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23237$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23238      fi
23239      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23240    fi
23241  fi
23242
23243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23246  # "foo.exe" is OK but "foo" is an error.
23247  #
23248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23249  # It is also a way to make sure we got the proper file name for the real test later on.
23250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23251  if test "x$test_shortpath" = x; then
23252    # Short path failed, file does not exist as specified.
23253    # Try adding .exe or .cmd
23254    if test -f "${new_path}.exe"; then
23255       input_to_shortpath="${new_path}.exe"
23256    elif test -f "${new_path}.cmd"; then
23257       input_to_shortpath="${new_path}.cmd"
23258    else
23259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23260$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23261      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23262$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23263      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23264    fi
23265  else
23266    input_to_shortpath="$new_path"
23267  fi
23268
23269  # Call helper function which possibly converts this using DOS-style short mode.
23270  # If so, the updated path is stored in $new_path.
23271  new_path="$input_to_shortpath"
23272
23273  input_path="$input_to_shortpath"
23274  # Check if we need to convert this using DOS-style short mode. If the path
23275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23276  # take no chances and rewrite it.
23277  # Note: m4 eats our [], so we need to use [ and ] instead.
23278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23279  if test "x$has_forbidden_chars" != x; then
23280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23284      # Going to short mode and back again did indeed matter. Since short mode is
23285      # case insensitive, let's make it lowercase to improve readability.
23286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23287      # Now convert it back to Unix-stile (cygpath)
23288      input_path=`$CYGPATH -u "$shortmode_path"`
23289      new_path="$input_path"
23290    fi
23291  fi
23292
23293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23294  if test "x$test_cygdrive_prefix" = x; then
23295    # As a simple fix, exclude /usr/bin since it's not a real path.
23296    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23298      # a path prefixed by /cygdrive for fixpath to work.
23299      new_path="$CYGWIN_ROOT_PATH$input_path"
23300    fi
23301  fi
23302
23303  # remove trailing .exe if any
23304  new_path="${new_path/%.exe/}"
23305
23306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23307
23308  # First separate the path from the arguments. This will split at the first
23309  # space.
23310  complete="$DUMPBIN"
23311  path="${complete%% *}"
23312  tmp="$complete EOL"
23313  arguments="${tmp#* }"
23314
23315  # Input might be given as Windows format, start by converting to
23316  # unix format.
23317  new_path="$path"
23318
23319  windows_path="$new_path"
23320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23321    unix_path=`$CYGPATH -u "$windows_path"`
23322    new_path="$unix_path"
23323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23325    new_path="$unix_path"
23326  fi
23327
23328
23329  # Now try to locate executable using which
23330  new_path=`$WHICH "$new_path" 2> /dev/null`
23331
23332  if test "x$new_path" = x; then
23333    # Oops. Which didn't find the executable.
23334    # The splitting of arguments from the executable at a space might have been incorrect,
23335    # since paths with space are more likely in Windows. Give it another try with the whole
23336    # argument.
23337    path="$complete"
23338    arguments="EOL"
23339    new_path="$path"
23340
23341  windows_path="$new_path"
23342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23343    unix_path=`$CYGPATH -u "$windows_path"`
23344    new_path="$unix_path"
23345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23347    new_path="$unix_path"
23348  fi
23349
23350
23351    new_path=`$WHICH "$new_path" 2> /dev/null`
23352
23353    if test "x$new_path" = x; then
23354      # It's still not found. Now this is an unrecoverable error.
23355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23356$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23357      has_space=`$ECHO "$complete" | $GREP " "`
23358      if test "x$has_space" != x; then
23359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23361      fi
23362      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23363    fi
23364  fi
23365
23366  # Now new_path has a complete unix path to the binary
23367  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23368    # Keep paths in /bin as-is, but remove trailing .exe if any
23369    new_path="${new_path/%.exe/}"
23370    # Do not save /bin paths to all_fixpath_prefixes!
23371  else
23372    # Not in mixed or Windows style, start by that.
23373    new_path=`cmd //c echo $new_path`
23374
23375  input_path="$new_path"
23376  # Check if we need to convert this using DOS-style short mode. If the path
23377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23378  # take no chances and rewrite it.
23379  # Note: m4 eats our [], so we need to use [ and ] instead.
23380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23381  if test "x$has_forbidden_chars" != x; then
23382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23384  fi
23385
23386    # Output is in $new_path
23387
23388  windows_path="$new_path"
23389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23390    unix_path=`$CYGPATH -u "$windows_path"`
23391    new_path="$unix_path"
23392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23394    new_path="$unix_path"
23395  fi
23396
23397    # remove trailing .exe if any
23398    new_path="${new_path/%.exe/}"
23399
23400    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23401    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23402  fi
23403
23404  else
23405    # We're on a posix platform. Hooray! :)
23406    # First separate the path from the arguments. This will split at the first
23407    # space.
23408    complete="$DUMPBIN"
23409    path="${complete%% *}"
23410    tmp="$complete EOL"
23411    arguments="${tmp#* }"
23412
23413    # Cannot rely on the command "which" here since it doesn't always work.
23414    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23415    if test -z "$is_absolute_path"; then
23416      # Path to executable is not absolute. Find it.
23417      IFS_save="$IFS"
23418      IFS=:
23419      for p in $PATH; do
23420        if test -f "$p/$path" && test -x "$p/$path"; then
23421          new_path="$p/$path"
23422          break
23423        fi
23424      done
23425      IFS="$IFS_save"
23426    else
23427      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23428$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23429      new_path="$path"
23430    fi
23431
23432    if test "x$new_path" = x; then
23433        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23434$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23435        has_space=`$ECHO "$complete" | $GREP " "`
23436        if test "x$has_space" != x; then
23437          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23438$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23439        fi
23440        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23441      fi
23442  fi
23443
23444      # Now join together the path and the arguments once again
23445      if test "x$arguments" != xEOL; then
23446        new_complete="$new_path ${arguments% *}"
23447      else
23448        new_complete="$new_path"
23449      fi
23450
23451  if test "x$complete" != "x$new_complete"; then
23452      DUMPBIN="$new_complete"
23453      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23454$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23455    fi
23456
23457
23458    COMPILER_TYPE=CL
23459    CCXXFLAGS="$CCXXFLAGS -nologo"
23460
23461fi
23462
23463
23464
23465ac_ext=c
23466ac_cpp='$CPP $CPPFLAGS'
23467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23469ac_compiler_gnu=$ac_cv_c_compiler_gnu
23470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23471$as_echo_n "checking how to run the C preprocessor... " >&6; }
23472# On Suns, sometimes $CPP names a directory.
23473if test -n "$CPP" && test -d "$CPP"; then
23474  CPP=
23475fi
23476if test -z "$CPP"; then
23477  if test "${ac_cv_prog_CPP+set}" = set; then :
23478  $as_echo_n "(cached) " >&6
23479else
23480      # Double quotes because CPP needs to be expanded
23481    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23482    do
23483      ac_preproc_ok=false
23484for ac_c_preproc_warn_flag in '' yes
23485do
23486  # Use a header file that comes with gcc, so configuring glibc
23487  # with a fresh cross-compiler works.
23488  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23489  # <limits.h> exists even on freestanding compilers.
23490  # On the NeXT, cc -E runs the code through the compiler's parser,
23491  # not just through cpp. "Syntax error" is here to catch this case.
23492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23493/* end confdefs.h.  */
23494#ifdef __STDC__
23495# include <limits.h>
23496#else
23497# include <assert.h>
23498#endif
23499		     Syntax error
23500_ACEOF
23501if ac_fn_c_try_cpp "$LINENO"; then :
23502
23503else
23504  # Broken: fails on valid input.
23505continue
23506fi
23507rm -f conftest.err conftest.i conftest.$ac_ext
23508
23509  # OK, works on sane cases.  Now check whether nonexistent headers
23510  # can be detected and how.
23511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23512/* end confdefs.h.  */
23513#include <ac_nonexistent.h>
23514_ACEOF
23515if ac_fn_c_try_cpp "$LINENO"; then :
23516  # Broken: success on invalid input.
23517continue
23518else
23519  # Passes both tests.
23520ac_preproc_ok=:
23521break
23522fi
23523rm -f conftest.err conftest.i conftest.$ac_ext
23524
23525done
23526# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23527rm -f conftest.i conftest.err conftest.$ac_ext
23528if $ac_preproc_ok; then :
23529  break
23530fi
23531
23532    done
23533    ac_cv_prog_CPP=$CPP
23534
23535fi
23536  CPP=$ac_cv_prog_CPP
23537else
23538  ac_cv_prog_CPP=$CPP
23539fi
23540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23541$as_echo "$CPP" >&6; }
23542ac_preproc_ok=false
23543for ac_c_preproc_warn_flag in '' yes
23544do
23545  # Use a header file that comes with gcc, so configuring glibc
23546  # with a fresh cross-compiler works.
23547  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23548  # <limits.h> exists even on freestanding compilers.
23549  # On the NeXT, cc -E runs the code through the compiler's parser,
23550  # not just through cpp. "Syntax error" is here to catch this case.
23551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23552/* end confdefs.h.  */
23553#ifdef __STDC__
23554# include <limits.h>
23555#else
23556# include <assert.h>
23557#endif
23558		     Syntax error
23559_ACEOF
23560if ac_fn_c_try_cpp "$LINENO"; then :
23561
23562else
23563  # Broken: fails on valid input.
23564continue
23565fi
23566rm -f conftest.err conftest.i conftest.$ac_ext
23567
23568  # OK, works on sane cases.  Now check whether nonexistent headers
23569  # can be detected and how.
23570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23571/* end confdefs.h.  */
23572#include <ac_nonexistent.h>
23573_ACEOF
23574if ac_fn_c_try_cpp "$LINENO"; then :
23575  # Broken: success on invalid input.
23576continue
23577else
23578  # Passes both tests.
23579ac_preproc_ok=:
23580break
23581fi
23582rm -f conftest.err conftest.i conftest.$ac_ext
23583
23584done
23585# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23586rm -f conftest.i conftest.err conftest.$ac_ext
23587if $ac_preproc_ok; then :
23588
23589else
23590  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23592as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23593See \`config.log' for more details" "$LINENO" 5 ; }
23594fi
23595
23596ac_ext=cpp
23597ac_cpp='$CXXCPP $CPPFLAGS'
23598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23601
23602
23603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23604
23605  # First separate the path from the arguments. This will split at the first
23606  # space.
23607  complete="$CPP"
23608  path="${complete%% *}"
23609  tmp="$complete EOL"
23610  arguments="${tmp#* }"
23611
23612  # Input might be given as Windows format, start by converting to
23613  # unix format.
23614  new_path=`$CYGPATH -u "$path"`
23615
23616  # Now try to locate executable using which
23617  new_path=`$WHICH "$new_path" 2> /dev/null`
23618  # bat and cmd files are not always considered executable in cygwin causing which
23619  # to not find them
23620  if test "x$new_path" = x \
23621           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23622           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23623    new_path=`$CYGPATH -u "$path"`
23624  fi
23625  if test "x$new_path" = x; then
23626    # Oops. Which didn't find the executable.
23627    # The splitting of arguments from the executable at a space might have been incorrect,
23628    # since paths with space are more likely in Windows. Give it another try with the whole
23629    # argument.
23630    path="$complete"
23631    arguments="EOL"
23632    new_path=`$CYGPATH -u "$path"`
23633    new_path=`$WHICH "$new_path" 2> /dev/null`
23634    # bat and cmd files are not always considered executable in cygwin causing which
23635    # to not find them
23636    if test "x$new_path" = x \
23637             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23638             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23639      new_path=`$CYGPATH -u "$path"`
23640    fi
23641    if test "x$new_path" = x; then
23642      # It's still not found. Now this is an unrecoverable error.
23643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23644$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23645      has_space=`$ECHO "$complete" | $GREP " "`
23646      if test "x$has_space" != x; then
23647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23649      fi
23650      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23651    fi
23652  fi
23653
23654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23657  # "foo.exe" is OK but "foo" is an error.
23658  #
23659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23660  # It is also a way to make sure we got the proper file name for the real test later on.
23661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23662  if test "x$test_shortpath" = x; then
23663    # Short path failed, file does not exist as specified.
23664    # Try adding .exe or .cmd
23665    if test -f "${new_path}.exe"; then
23666       input_to_shortpath="${new_path}.exe"
23667    elif test -f "${new_path}.cmd"; then
23668       input_to_shortpath="${new_path}.cmd"
23669    else
23670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23671$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23672      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23673$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23674      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23675    fi
23676  else
23677    input_to_shortpath="$new_path"
23678  fi
23679
23680  # Call helper function which possibly converts this using DOS-style short mode.
23681  # If so, the updated path is stored in $new_path.
23682  new_path="$input_to_shortpath"
23683
23684  input_path="$input_to_shortpath"
23685  # Check if we need to convert this using DOS-style short mode. If the path
23686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23687  # take no chances and rewrite it.
23688  # Note: m4 eats our [], so we need to use [ and ] instead.
23689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23690  if test "x$has_forbidden_chars" != x; then
23691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23695      # Going to short mode and back again did indeed matter. Since short mode is
23696      # case insensitive, let's make it lowercase to improve readability.
23697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23698      # Now convert it back to Unix-stile (cygpath)
23699      input_path=`$CYGPATH -u "$shortmode_path"`
23700      new_path="$input_path"
23701    fi
23702  fi
23703
23704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23705  if test "x$test_cygdrive_prefix" = x; then
23706    # As a simple fix, exclude /usr/bin since it's not a real path.
23707    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23709      # a path prefixed by /cygdrive for fixpath to work.
23710      new_path="$CYGWIN_ROOT_PATH$input_path"
23711    fi
23712  fi
23713
23714  # remove trailing .exe if any
23715  new_path="${new_path/%.exe/}"
23716
23717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23718
23719  # First separate the path from the arguments. This will split at the first
23720  # space.
23721  complete="$CPP"
23722  path="${complete%% *}"
23723  tmp="$complete EOL"
23724  arguments="${tmp#* }"
23725
23726  # Input might be given as Windows format, start by converting to
23727  # unix format.
23728  new_path="$path"
23729
23730  windows_path="$new_path"
23731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23732    unix_path=`$CYGPATH -u "$windows_path"`
23733    new_path="$unix_path"
23734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23736    new_path="$unix_path"
23737  fi
23738
23739
23740  # Now try to locate executable using which
23741  new_path=`$WHICH "$new_path" 2> /dev/null`
23742
23743  if test "x$new_path" = x; then
23744    # Oops. Which didn't find the executable.
23745    # The splitting of arguments from the executable at a space might have been incorrect,
23746    # since paths with space are more likely in Windows. Give it another try with the whole
23747    # argument.
23748    path="$complete"
23749    arguments="EOL"
23750    new_path="$path"
23751
23752  windows_path="$new_path"
23753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23754    unix_path=`$CYGPATH -u "$windows_path"`
23755    new_path="$unix_path"
23756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23758    new_path="$unix_path"
23759  fi
23760
23761
23762    new_path=`$WHICH "$new_path" 2> /dev/null`
23763
23764    if test "x$new_path" = x; then
23765      # It's still not found. Now this is an unrecoverable error.
23766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23767$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23768      has_space=`$ECHO "$complete" | $GREP " "`
23769      if test "x$has_space" != x; then
23770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23772      fi
23773      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23774    fi
23775  fi
23776
23777  # Now new_path has a complete unix path to the binary
23778  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23779    # Keep paths in /bin as-is, but remove trailing .exe if any
23780    new_path="${new_path/%.exe/}"
23781    # Do not save /bin paths to all_fixpath_prefixes!
23782  else
23783    # Not in mixed or Windows style, start by that.
23784    new_path=`cmd //c echo $new_path`
23785
23786  input_path="$new_path"
23787  # Check if we need to convert this using DOS-style short mode. If the path
23788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23789  # take no chances and rewrite it.
23790  # Note: m4 eats our [], so we need to use [ and ] instead.
23791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23792  if test "x$has_forbidden_chars" != x; then
23793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23795  fi
23796
23797    # Output is in $new_path
23798
23799  windows_path="$new_path"
23800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23801    unix_path=`$CYGPATH -u "$windows_path"`
23802    new_path="$unix_path"
23803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23805    new_path="$unix_path"
23806  fi
23807
23808    # remove trailing .exe if any
23809    new_path="${new_path/%.exe/}"
23810
23811    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23812    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23813  fi
23814
23815  else
23816    # We're on a posix platform. Hooray! :)
23817    # First separate the path from the arguments. This will split at the first
23818    # space.
23819    complete="$CPP"
23820    path="${complete%% *}"
23821    tmp="$complete EOL"
23822    arguments="${tmp#* }"
23823
23824    # Cannot rely on the command "which" here since it doesn't always work.
23825    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23826    if test -z "$is_absolute_path"; then
23827      # Path to executable is not absolute. Find it.
23828      IFS_save="$IFS"
23829      IFS=:
23830      for p in $PATH; do
23831        if test -f "$p/$path" && test -x "$p/$path"; then
23832          new_path="$p/$path"
23833          break
23834        fi
23835      done
23836      IFS="$IFS_save"
23837    else
23838      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23839$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23840      new_path="$path"
23841    fi
23842
23843    if test "x$new_path" = x; then
23844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23845$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23846        has_space=`$ECHO "$complete" | $GREP " "`
23847        if test "x$has_space" != x; then
23848          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23849$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23850        fi
23851        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23852      fi
23853  fi
23854
23855      # Now join together the path and the arguments once again
23856      if test "x$arguments" != xEOL; then
23857        new_complete="$new_path ${arguments% *}"
23858      else
23859        new_complete="$new_path"
23860      fi
23861
23862  if test "x$complete" != "x$new_complete"; then
23863      CPP="$new_complete"
23864      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23865$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23866    fi
23867
23868
23869ac_ext=cpp
23870ac_cpp='$CXXCPP $CPPFLAGS'
23871ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23872ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23873ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23875$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23876if test -z "$CXXCPP"; then
23877  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23878  $as_echo_n "(cached) " >&6
23879else
23880      # Double quotes because CXXCPP needs to be expanded
23881    for CXXCPP in "$CXX -E" "/lib/cpp"
23882    do
23883      ac_preproc_ok=false
23884for ac_cxx_preproc_warn_flag in '' yes
23885do
23886  # Use a header file that comes with gcc, so configuring glibc
23887  # with a fresh cross-compiler works.
23888  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23889  # <limits.h> exists even on freestanding compilers.
23890  # On the NeXT, cc -E runs the code through the compiler's parser,
23891  # not just through cpp. "Syntax error" is here to catch this case.
23892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23893/* end confdefs.h.  */
23894#ifdef __STDC__
23895# include <limits.h>
23896#else
23897# include <assert.h>
23898#endif
23899		     Syntax error
23900_ACEOF
23901if ac_fn_cxx_try_cpp "$LINENO"; then :
23902
23903else
23904  # Broken: fails on valid input.
23905continue
23906fi
23907rm -f conftest.err conftest.i conftest.$ac_ext
23908
23909  # OK, works on sane cases.  Now check whether nonexistent headers
23910  # can be detected and how.
23911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23912/* end confdefs.h.  */
23913#include <ac_nonexistent.h>
23914_ACEOF
23915if ac_fn_cxx_try_cpp "$LINENO"; then :
23916  # Broken: success on invalid input.
23917continue
23918else
23919  # Passes both tests.
23920ac_preproc_ok=:
23921break
23922fi
23923rm -f conftest.err conftest.i conftest.$ac_ext
23924
23925done
23926# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23927rm -f conftest.i conftest.err conftest.$ac_ext
23928if $ac_preproc_ok; then :
23929  break
23930fi
23931
23932    done
23933    ac_cv_prog_CXXCPP=$CXXCPP
23934
23935fi
23936  CXXCPP=$ac_cv_prog_CXXCPP
23937else
23938  ac_cv_prog_CXXCPP=$CXXCPP
23939fi
23940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23941$as_echo "$CXXCPP" >&6; }
23942ac_preproc_ok=false
23943for ac_cxx_preproc_warn_flag in '' yes
23944do
23945  # Use a header file that comes with gcc, so configuring glibc
23946  # with a fresh cross-compiler works.
23947  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23948  # <limits.h> exists even on freestanding compilers.
23949  # On the NeXT, cc -E runs the code through the compiler's parser,
23950  # not just through cpp. "Syntax error" is here to catch this case.
23951  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23952/* end confdefs.h.  */
23953#ifdef __STDC__
23954# include <limits.h>
23955#else
23956# include <assert.h>
23957#endif
23958		     Syntax error
23959_ACEOF
23960if ac_fn_cxx_try_cpp "$LINENO"; then :
23961
23962else
23963  # Broken: fails on valid input.
23964continue
23965fi
23966rm -f conftest.err conftest.i conftest.$ac_ext
23967
23968  # OK, works on sane cases.  Now check whether nonexistent headers
23969  # can be detected and how.
23970  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23971/* end confdefs.h.  */
23972#include <ac_nonexistent.h>
23973_ACEOF
23974if ac_fn_cxx_try_cpp "$LINENO"; then :
23975  # Broken: success on invalid input.
23976continue
23977else
23978  # Passes both tests.
23979ac_preproc_ok=:
23980break
23981fi
23982rm -f conftest.err conftest.i conftest.$ac_ext
23983
23984done
23985# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23986rm -f conftest.i conftest.err conftest.$ac_ext
23987if $ac_preproc_ok; then :
23988
23989else
23990  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23992as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23993See \`config.log' for more details" "$LINENO" 5 ; }
23994fi
23995
23996ac_ext=cpp
23997ac_cpp='$CXXCPP $CPPFLAGS'
23998ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23999ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24000ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24001
24002
24003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24004
24005  # First separate the path from the arguments. This will split at the first
24006  # space.
24007  complete="$CXXCPP"
24008  path="${complete%% *}"
24009  tmp="$complete EOL"
24010  arguments="${tmp#* }"
24011
24012  # Input might be given as Windows format, start by converting to
24013  # unix format.
24014  new_path=`$CYGPATH -u "$path"`
24015
24016  # Now try to locate executable using which
24017  new_path=`$WHICH "$new_path" 2> /dev/null`
24018  # bat and cmd files are not always considered executable in cygwin causing which
24019  # to not find them
24020  if test "x$new_path" = x \
24021           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24022           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24023    new_path=`$CYGPATH -u "$path"`
24024  fi
24025  if test "x$new_path" = x; then
24026    # Oops. Which didn't find the executable.
24027    # The splitting of arguments from the executable at a space might have been incorrect,
24028    # since paths with space are more likely in Windows. Give it another try with the whole
24029    # argument.
24030    path="$complete"
24031    arguments="EOL"
24032    new_path=`$CYGPATH -u "$path"`
24033    new_path=`$WHICH "$new_path" 2> /dev/null`
24034    # bat and cmd files are not always considered executable in cygwin causing which
24035    # to not find them
24036    if test "x$new_path" = x \
24037             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24038             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24039      new_path=`$CYGPATH -u "$path"`
24040    fi
24041    if test "x$new_path" = x; then
24042      # It's still not found. Now this is an unrecoverable error.
24043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24044$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24045      has_space=`$ECHO "$complete" | $GREP " "`
24046      if test "x$has_space" != x; then
24047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24049      fi
24050      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24051    fi
24052  fi
24053
24054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24057  # "foo.exe" is OK but "foo" is an error.
24058  #
24059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24060  # It is also a way to make sure we got the proper file name for the real test later on.
24061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24062  if test "x$test_shortpath" = x; then
24063    # Short path failed, file does not exist as specified.
24064    # Try adding .exe or .cmd
24065    if test -f "${new_path}.exe"; then
24066       input_to_shortpath="${new_path}.exe"
24067    elif test -f "${new_path}.cmd"; then
24068       input_to_shortpath="${new_path}.cmd"
24069    else
24070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24071$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24072      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24073$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24074      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24075    fi
24076  else
24077    input_to_shortpath="$new_path"
24078  fi
24079
24080  # Call helper function which possibly converts this using DOS-style short mode.
24081  # If so, the updated path is stored in $new_path.
24082  new_path="$input_to_shortpath"
24083
24084  input_path="$input_to_shortpath"
24085  # Check if we need to convert this using DOS-style short mode. If the path
24086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24087  # take no chances and rewrite it.
24088  # Note: m4 eats our [], so we need to use [ and ] instead.
24089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24090  if test "x$has_forbidden_chars" != x; then
24091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24095      # Going to short mode and back again did indeed matter. Since short mode is
24096      # case insensitive, let's make it lowercase to improve readability.
24097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24098      # Now convert it back to Unix-stile (cygpath)
24099      input_path=`$CYGPATH -u "$shortmode_path"`
24100      new_path="$input_path"
24101    fi
24102  fi
24103
24104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24105  if test "x$test_cygdrive_prefix" = x; then
24106    # As a simple fix, exclude /usr/bin since it's not a real path.
24107    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24109      # a path prefixed by /cygdrive for fixpath to work.
24110      new_path="$CYGWIN_ROOT_PATH$input_path"
24111    fi
24112  fi
24113
24114  # remove trailing .exe if any
24115  new_path="${new_path/%.exe/}"
24116
24117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24118
24119  # First separate the path from the arguments. This will split at the first
24120  # space.
24121  complete="$CXXCPP"
24122  path="${complete%% *}"
24123  tmp="$complete EOL"
24124  arguments="${tmp#* }"
24125
24126  # Input might be given as Windows format, start by converting to
24127  # unix format.
24128  new_path="$path"
24129
24130  windows_path="$new_path"
24131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24132    unix_path=`$CYGPATH -u "$windows_path"`
24133    new_path="$unix_path"
24134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24136    new_path="$unix_path"
24137  fi
24138
24139
24140  # Now try to locate executable using which
24141  new_path=`$WHICH "$new_path" 2> /dev/null`
24142
24143  if test "x$new_path" = x; then
24144    # Oops. Which didn't find the executable.
24145    # The splitting of arguments from the executable at a space might have been incorrect,
24146    # since paths with space are more likely in Windows. Give it another try with the whole
24147    # argument.
24148    path="$complete"
24149    arguments="EOL"
24150    new_path="$path"
24151
24152  windows_path="$new_path"
24153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24154    unix_path=`$CYGPATH -u "$windows_path"`
24155    new_path="$unix_path"
24156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24158    new_path="$unix_path"
24159  fi
24160
24161
24162    new_path=`$WHICH "$new_path" 2> /dev/null`
24163
24164    if test "x$new_path" = x; then
24165      # It's still not found. Now this is an unrecoverable error.
24166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24167$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24168      has_space=`$ECHO "$complete" | $GREP " "`
24169      if test "x$has_space" != x; then
24170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24172      fi
24173      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24174    fi
24175  fi
24176
24177  # Now new_path has a complete unix path to the binary
24178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24179    # Keep paths in /bin as-is, but remove trailing .exe if any
24180    new_path="${new_path/%.exe/}"
24181    # Do not save /bin paths to all_fixpath_prefixes!
24182  else
24183    # Not in mixed or Windows style, start by that.
24184    new_path=`cmd //c echo $new_path`
24185
24186  input_path="$new_path"
24187  # Check if we need to convert this using DOS-style short mode. If the path
24188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24189  # take no chances and rewrite it.
24190  # Note: m4 eats our [], so we need to use [ and ] instead.
24191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24192  if test "x$has_forbidden_chars" != x; then
24193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24195  fi
24196
24197    # Output is in $new_path
24198
24199  windows_path="$new_path"
24200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24201    unix_path=`$CYGPATH -u "$windows_path"`
24202    new_path="$unix_path"
24203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24205    new_path="$unix_path"
24206  fi
24207
24208    # remove trailing .exe if any
24209    new_path="${new_path/%.exe/}"
24210
24211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24213  fi
24214
24215  else
24216    # We're on a posix platform. Hooray! :)
24217    # First separate the path from the arguments. This will split at the first
24218    # space.
24219    complete="$CXXCPP"
24220    path="${complete%% *}"
24221    tmp="$complete EOL"
24222    arguments="${tmp#* }"
24223
24224    # Cannot rely on the command "which" here since it doesn't always work.
24225    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24226    if test -z "$is_absolute_path"; then
24227      # Path to executable is not absolute. Find it.
24228      IFS_save="$IFS"
24229      IFS=:
24230      for p in $PATH; do
24231        if test -f "$p/$path" && test -x "$p/$path"; then
24232          new_path="$p/$path"
24233          break
24234        fi
24235      done
24236      IFS="$IFS_save"
24237    else
24238      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24239$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24240      new_path="$path"
24241    fi
24242
24243    if test "x$new_path" = x; then
24244        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24245$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24246        has_space=`$ECHO "$complete" | $GREP " "`
24247        if test "x$has_space" != x; then
24248          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24249$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24250        fi
24251        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24252      fi
24253  fi
24254
24255      # Now join together the path and the arguments once again
24256      if test "x$arguments" != xEOL; then
24257        new_complete="$new_path ${arguments% *}"
24258      else
24259        new_complete="$new_path"
24260      fi
24261
24262  if test "x$complete" != "x$new_complete"; then
24263      CXXCPP="$new_complete"
24264      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24265$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24266    fi
24267
24268
24269if test "x$COMPILE_TYPE" != "xcross"; then
24270    # If we are not cross compiling, use the same compilers for
24271    # building the build platform executables. The cross-compilation
24272    # case needed to be done earlier, but this can only be done after
24273    # the native tools have been localized.
24274    BUILD_CC="$CC"
24275    BUILD_CXX="$CXX"
24276    BUILD_LD="$LD"
24277fi
24278
24279# for solaris we really need solaris tools, and not gnu equivalent
24280#   these seems to normally reside in /usr/ccs/bin so add that to path before
24281#   starting to probe
24282#
24283#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24284#         so that it can be overriden --with-tools-dir
24285if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24286    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24287fi
24288
24289# Find the right assembler.
24290if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24291    # Extract the first word of "as", so it can be a program name with args.
24292set dummy as; ac_word=$2
24293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24294$as_echo_n "checking for $ac_word... " >&6; }
24295if test "${ac_cv_path_AS+set}" = set; then :
24296  $as_echo_n "(cached) " >&6
24297else
24298  case $AS in
24299  [\\/]* | ?:[\\/]*)
24300  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24301  ;;
24302  *)
24303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24304for as_dir in $PATH
24305do
24306  IFS=$as_save_IFS
24307  test -z "$as_dir" && as_dir=.
24308    for ac_exec_ext in '' $ac_executable_extensions; do
24309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24310    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24312    break 2
24313  fi
24314done
24315  done
24316IFS=$as_save_IFS
24317
24318  ;;
24319esac
24320fi
24321AS=$ac_cv_path_AS
24322if test -n "$AS"; then
24323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24324$as_echo "$AS" >&6; }
24325else
24326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24327$as_echo "no" >&6; }
24328fi
24329
24330
24331
24332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24333
24334  # First separate the path from the arguments. This will split at the first
24335  # space.
24336  complete="$AS"
24337  path="${complete%% *}"
24338  tmp="$complete EOL"
24339  arguments="${tmp#* }"
24340
24341  # Input might be given as Windows format, start by converting to
24342  # unix format.
24343  new_path=`$CYGPATH -u "$path"`
24344
24345  # Now try to locate executable using which
24346  new_path=`$WHICH "$new_path" 2> /dev/null`
24347  # bat and cmd files are not always considered executable in cygwin causing which
24348  # to not find them
24349  if test "x$new_path" = x \
24350           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24351           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24352    new_path=`$CYGPATH -u "$path"`
24353  fi
24354  if test "x$new_path" = x; then
24355    # Oops. Which didn't find the executable.
24356    # The splitting of arguments from the executable at a space might have been incorrect,
24357    # since paths with space are more likely in Windows. Give it another try with the whole
24358    # argument.
24359    path="$complete"
24360    arguments="EOL"
24361    new_path=`$CYGPATH -u "$path"`
24362    new_path=`$WHICH "$new_path" 2> /dev/null`
24363    # bat and cmd files are not always considered executable in cygwin causing which
24364    # to not find them
24365    if test "x$new_path" = x \
24366             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24367             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24368      new_path=`$CYGPATH -u "$path"`
24369    fi
24370    if test "x$new_path" = x; then
24371      # It's still not found. Now this is an unrecoverable error.
24372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24373$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24374      has_space=`$ECHO "$complete" | $GREP " "`
24375      if test "x$has_space" != x; then
24376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24378      fi
24379      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24380    fi
24381  fi
24382
24383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24386  # "foo.exe" is OK but "foo" is an error.
24387  #
24388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24389  # It is also a way to make sure we got the proper file name for the real test later on.
24390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24391  if test "x$test_shortpath" = x; then
24392    # Short path failed, file does not exist as specified.
24393    # Try adding .exe or .cmd
24394    if test -f "${new_path}.exe"; then
24395       input_to_shortpath="${new_path}.exe"
24396    elif test -f "${new_path}.cmd"; then
24397       input_to_shortpath="${new_path}.cmd"
24398    else
24399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24400$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24403      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24404    fi
24405  else
24406    input_to_shortpath="$new_path"
24407  fi
24408
24409  # Call helper function which possibly converts this using DOS-style short mode.
24410  # If so, the updated path is stored in $new_path.
24411  new_path="$input_to_shortpath"
24412
24413  input_path="$input_to_shortpath"
24414  # Check if we need to convert this using DOS-style short mode. If the path
24415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24416  # take no chances and rewrite it.
24417  # Note: m4 eats our [], so we need to use [ and ] instead.
24418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24419  if test "x$has_forbidden_chars" != x; then
24420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24424      # Going to short mode and back again did indeed matter. Since short mode is
24425      # case insensitive, let's make it lowercase to improve readability.
24426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24427      # Now convert it back to Unix-stile (cygpath)
24428      input_path=`$CYGPATH -u "$shortmode_path"`
24429      new_path="$input_path"
24430    fi
24431  fi
24432
24433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24434  if test "x$test_cygdrive_prefix" = x; then
24435    # As a simple fix, exclude /usr/bin since it's not a real path.
24436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24438      # a path prefixed by /cygdrive for fixpath to work.
24439      new_path="$CYGWIN_ROOT_PATH$input_path"
24440    fi
24441  fi
24442
24443  # remove trailing .exe if any
24444  new_path="${new_path/%.exe/}"
24445
24446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24447
24448  # First separate the path from the arguments. This will split at the first
24449  # space.
24450  complete="$AS"
24451  path="${complete%% *}"
24452  tmp="$complete EOL"
24453  arguments="${tmp#* }"
24454
24455  # Input might be given as Windows format, start by converting to
24456  # unix format.
24457  new_path="$path"
24458
24459  windows_path="$new_path"
24460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24461    unix_path=`$CYGPATH -u "$windows_path"`
24462    new_path="$unix_path"
24463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24465    new_path="$unix_path"
24466  fi
24467
24468
24469  # Now try to locate executable using which
24470  new_path=`$WHICH "$new_path" 2> /dev/null`
24471
24472  if test "x$new_path" = x; then
24473    # Oops. Which didn't find the executable.
24474    # The splitting of arguments from the executable at a space might have been incorrect,
24475    # since paths with space are more likely in Windows. Give it another try with the whole
24476    # argument.
24477    path="$complete"
24478    arguments="EOL"
24479    new_path="$path"
24480
24481  windows_path="$new_path"
24482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24483    unix_path=`$CYGPATH -u "$windows_path"`
24484    new_path="$unix_path"
24485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24487    new_path="$unix_path"
24488  fi
24489
24490
24491    new_path=`$WHICH "$new_path" 2> /dev/null`
24492
24493    if test "x$new_path" = x; then
24494      # It's still not found. Now this is an unrecoverable error.
24495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24496$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24497      has_space=`$ECHO "$complete" | $GREP " "`
24498      if test "x$has_space" != x; then
24499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24501      fi
24502      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24503    fi
24504  fi
24505
24506  # Now new_path has a complete unix path to the binary
24507  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24508    # Keep paths in /bin as-is, but remove trailing .exe if any
24509    new_path="${new_path/%.exe/}"
24510    # Do not save /bin paths to all_fixpath_prefixes!
24511  else
24512    # Not in mixed or Windows style, start by that.
24513    new_path=`cmd //c echo $new_path`
24514
24515  input_path="$new_path"
24516  # Check if we need to convert this using DOS-style short mode. If the path
24517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24518  # take no chances and rewrite it.
24519  # Note: m4 eats our [], so we need to use [ and ] instead.
24520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24521  if test "x$has_forbidden_chars" != x; then
24522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24524  fi
24525
24526    # Output is in $new_path
24527
24528  windows_path="$new_path"
24529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24530    unix_path=`$CYGPATH -u "$windows_path"`
24531    new_path="$unix_path"
24532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24534    new_path="$unix_path"
24535  fi
24536
24537    # remove trailing .exe if any
24538    new_path="${new_path/%.exe/}"
24539
24540    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24541    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24542  fi
24543
24544  else
24545    # We're on a posix platform. Hooray! :)
24546    # First separate the path from the arguments. This will split at the first
24547    # space.
24548    complete="$AS"
24549    path="${complete%% *}"
24550    tmp="$complete EOL"
24551    arguments="${tmp#* }"
24552
24553    # Cannot rely on the command "which" here since it doesn't always work.
24554    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24555    if test -z "$is_absolute_path"; then
24556      # Path to executable is not absolute. Find it.
24557      IFS_save="$IFS"
24558      IFS=:
24559      for p in $PATH; do
24560        if test -f "$p/$path" && test -x "$p/$path"; then
24561          new_path="$p/$path"
24562          break
24563        fi
24564      done
24565      IFS="$IFS_save"
24566    else
24567      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24568$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24569      new_path="$path"
24570    fi
24571
24572    if test "x$new_path" = x; then
24573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24574$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24575        has_space=`$ECHO "$complete" | $GREP " "`
24576        if test "x$has_space" != x; then
24577          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24579        fi
24580        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24581      fi
24582  fi
24583
24584      # Now join together the path and the arguments once again
24585      if test "x$arguments" != xEOL; then
24586        new_complete="$new_path ${arguments% *}"
24587      else
24588        new_complete="$new_path"
24589      fi
24590
24591  if test "x$complete" != "x$new_complete"; then
24592      AS="$new_complete"
24593      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24594$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24595    fi
24596
24597else
24598    AS="$CC -c"
24599fi
24600
24601
24602if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24603    for ac_prog in gnm nm
24604do
24605  # Extract the first word of "$ac_prog", so it can be a program name with args.
24606set dummy $ac_prog; ac_word=$2
24607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24608$as_echo_n "checking for $ac_word... " >&6; }
24609if test "${ac_cv_path_NM+set}" = set; then :
24610  $as_echo_n "(cached) " >&6
24611else
24612  case $NM in
24613  [\\/]* | ?:[\\/]*)
24614  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24615  ;;
24616  *)
24617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24618for as_dir in $PATH
24619do
24620  IFS=$as_save_IFS
24621  test -z "$as_dir" && as_dir=.
24622    for ac_exec_ext in '' $ac_executable_extensions; do
24623  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24624    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24626    break 2
24627  fi
24628done
24629  done
24630IFS=$as_save_IFS
24631
24632  ;;
24633esac
24634fi
24635NM=$ac_cv_path_NM
24636if test -n "$NM"; then
24637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24638$as_echo "$NM" >&6; }
24639else
24640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24641$as_echo "no" >&6; }
24642fi
24643
24644
24645  test -n "$NM" && break
24646done
24647
24648
24649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24650
24651  # First separate the path from the arguments. This will split at the first
24652  # space.
24653  complete="$NM"
24654  path="${complete%% *}"
24655  tmp="$complete EOL"
24656  arguments="${tmp#* }"
24657
24658  # Input might be given as Windows format, start by converting to
24659  # unix format.
24660  new_path=`$CYGPATH -u "$path"`
24661
24662  # Now try to locate executable using which
24663  new_path=`$WHICH "$new_path" 2> /dev/null`
24664  # bat and cmd files are not always considered executable in cygwin causing which
24665  # to not find them
24666  if test "x$new_path" = x \
24667           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24668           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24669    new_path=`$CYGPATH -u "$path"`
24670  fi
24671  if test "x$new_path" = x; then
24672    # Oops. Which didn't find the executable.
24673    # The splitting of arguments from the executable at a space might have been incorrect,
24674    # since paths with space are more likely in Windows. Give it another try with the whole
24675    # argument.
24676    path="$complete"
24677    arguments="EOL"
24678    new_path=`$CYGPATH -u "$path"`
24679    new_path=`$WHICH "$new_path" 2> /dev/null`
24680    # bat and cmd files are not always considered executable in cygwin causing which
24681    # to not find them
24682    if test "x$new_path" = x \
24683             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24684             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24685      new_path=`$CYGPATH -u "$path"`
24686    fi
24687    if test "x$new_path" = x; then
24688      # It's still not found. Now this is an unrecoverable error.
24689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24690$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24691      has_space=`$ECHO "$complete" | $GREP " "`
24692      if test "x$has_space" != x; then
24693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24695      fi
24696      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24697    fi
24698  fi
24699
24700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24703  # "foo.exe" is OK but "foo" is an error.
24704  #
24705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24706  # It is also a way to make sure we got the proper file name for the real test later on.
24707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24708  if test "x$test_shortpath" = x; then
24709    # Short path failed, file does not exist as specified.
24710    # Try adding .exe or .cmd
24711    if test -f "${new_path}.exe"; then
24712       input_to_shortpath="${new_path}.exe"
24713    elif test -f "${new_path}.cmd"; then
24714       input_to_shortpath="${new_path}.cmd"
24715    else
24716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24717$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24718      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24719$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24720      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24721    fi
24722  else
24723    input_to_shortpath="$new_path"
24724  fi
24725
24726  # Call helper function which possibly converts this using DOS-style short mode.
24727  # If so, the updated path is stored in $new_path.
24728  new_path="$input_to_shortpath"
24729
24730  input_path="$input_to_shortpath"
24731  # Check if we need to convert this using DOS-style short mode. If the path
24732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24733  # take no chances and rewrite it.
24734  # Note: m4 eats our [], so we need to use [ and ] instead.
24735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24736  if test "x$has_forbidden_chars" != x; then
24737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24741      # Going to short mode and back again did indeed matter. Since short mode is
24742      # case insensitive, let's make it lowercase to improve readability.
24743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24744      # Now convert it back to Unix-stile (cygpath)
24745      input_path=`$CYGPATH -u "$shortmode_path"`
24746      new_path="$input_path"
24747    fi
24748  fi
24749
24750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24751  if test "x$test_cygdrive_prefix" = x; then
24752    # As a simple fix, exclude /usr/bin since it's not a real path.
24753    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24755      # a path prefixed by /cygdrive for fixpath to work.
24756      new_path="$CYGWIN_ROOT_PATH$input_path"
24757    fi
24758  fi
24759
24760  # remove trailing .exe if any
24761  new_path="${new_path/%.exe/}"
24762
24763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24764
24765  # First separate the path from the arguments. This will split at the first
24766  # space.
24767  complete="$NM"
24768  path="${complete%% *}"
24769  tmp="$complete EOL"
24770  arguments="${tmp#* }"
24771
24772  # Input might be given as Windows format, start by converting to
24773  # unix format.
24774  new_path="$path"
24775
24776  windows_path="$new_path"
24777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24778    unix_path=`$CYGPATH -u "$windows_path"`
24779    new_path="$unix_path"
24780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24782    new_path="$unix_path"
24783  fi
24784
24785
24786  # Now try to locate executable using which
24787  new_path=`$WHICH "$new_path" 2> /dev/null`
24788
24789  if test "x$new_path" = x; then
24790    # Oops. Which didn't find the executable.
24791    # The splitting of arguments from the executable at a space might have been incorrect,
24792    # since paths with space are more likely in Windows. Give it another try with the whole
24793    # argument.
24794    path="$complete"
24795    arguments="EOL"
24796    new_path="$path"
24797
24798  windows_path="$new_path"
24799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24800    unix_path=`$CYGPATH -u "$windows_path"`
24801    new_path="$unix_path"
24802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24804    new_path="$unix_path"
24805  fi
24806
24807
24808    new_path=`$WHICH "$new_path" 2> /dev/null`
24809
24810    if test "x$new_path" = x; then
24811      # It's still not found. Now this is an unrecoverable error.
24812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24813$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24814      has_space=`$ECHO "$complete" | $GREP " "`
24815      if test "x$has_space" != x; then
24816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24818      fi
24819      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24820    fi
24821  fi
24822
24823  # Now new_path has a complete unix path to the binary
24824  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24825    # Keep paths in /bin as-is, but remove trailing .exe if any
24826    new_path="${new_path/%.exe/}"
24827    # Do not save /bin paths to all_fixpath_prefixes!
24828  else
24829    # Not in mixed or Windows style, start by that.
24830    new_path=`cmd //c echo $new_path`
24831
24832  input_path="$new_path"
24833  # Check if we need to convert this using DOS-style short mode. If the path
24834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24835  # take no chances and rewrite it.
24836  # Note: m4 eats our [], so we need to use [ and ] instead.
24837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24838  if test "x$has_forbidden_chars" != x; then
24839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24841  fi
24842
24843    # Output is in $new_path
24844
24845  windows_path="$new_path"
24846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24847    unix_path=`$CYGPATH -u "$windows_path"`
24848    new_path="$unix_path"
24849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24851    new_path="$unix_path"
24852  fi
24853
24854    # remove trailing .exe if any
24855    new_path="${new_path/%.exe/}"
24856
24857    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24858    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24859  fi
24860
24861  else
24862    # We're on a posix platform. Hooray! :)
24863    # First separate the path from the arguments. This will split at the first
24864    # space.
24865    complete="$NM"
24866    path="${complete%% *}"
24867    tmp="$complete EOL"
24868    arguments="${tmp#* }"
24869
24870    # Cannot rely on the command "which" here since it doesn't always work.
24871    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24872    if test -z "$is_absolute_path"; then
24873      # Path to executable is not absolute. Find it.
24874      IFS_save="$IFS"
24875      IFS=:
24876      for p in $PATH; do
24877        if test -f "$p/$path" && test -x "$p/$path"; then
24878          new_path="$p/$path"
24879          break
24880        fi
24881      done
24882      IFS="$IFS_save"
24883    else
24884      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24885$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24886      new_path="$path"
24887    fi
24888
24889    if test "x$new_path" = x; then
24890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24891$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24892        has_space=`$ECHO "$complete" | $GREP " "`
24893        if test "x$has_space" != x; then
24894          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24896        fi
24897        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24898      fi
24899  fi
24900
24901      # Now join together the path and the arguments once again
24902      if test "x$arguments" != xEOL; then
24903        new_complete="$new_path ${arguments% *}"
24904      else
24905        new_complete="$new_path"
24906      fi
24907
24908  if test "x$complete" != "x$new_complete"; then
24909      NM="$new_complete"
24910      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24911$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24912    fi
24913
24914    # Extract the first word of "strip", so it can be a program name with args.
24915set dummy strip; ac_word=$2
24916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24917$as_echo_n "checking for $ac_word... " >&6; }
24918if test "${ac_cv_path_STRIP+set}" = set; then :
24919  $as_echo_n "(cached) " >&6
24920else
24921  case $STRIP in
24922  [\\/]* | ?:[\\/]*)
24923  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24924  ;;
24925  *)
24926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24927for as_dir in $PATH
24928do
24929  IFS=$as_save_IFS
24930  test -z "$as_dir" && as_dir=.
24931    for ac_exec_ext in '' $ac_executable_extensions; do
24932  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24933    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24935    break 2
24936  fi
24937done
24938  done
24939IFS=$as_save_IFS
24940
24941  ;;
24942esac
24943fi
24944STRIP=$ac_cv_path_STRIP
24945if test -n "$STRIP"; then
24946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24947$as_echo "$STRIP" >&6; }
24948else
24949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24950$as_echo "no" >&6; }
24951fi
24952
24953
24954
24955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24956
24957  # First separate the path from the arguments. This will split at the first
24958  # space.
24959  complete="$STRIP"
24960  path="${complete%% *}"
24961  tmp="$complete EOL"
24962  arguments="${tmp#* }"
24963
24964  # Input might be given as Windows format, start by converting to
24965  # unix format.
24966  new_path=`$CYGPATH -u "$path"`
24967
24968  # Now try to locate executable using which
24969  new_path=`$WHICH "$new_path" 2> /dev/null`
24970  # bat and cmd files are not always considered executable in cygwin causing which
24971  # to not find them
24972  if test "x$new_path" = x \
24973           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24974           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24975    new_path=`$CYGPATH -u "$path"`
24976  fi
24977  if test "x$new_path" = x; then
24978    # Oops. Which didn't find the executable.
24979    # The splitting of arguments from the executable at a space might have been incorrect,
24980    # since paths with space are more likely in Windows. Give it another try with the whole
24981    # argument.
24982    path="$complete"
24983    arguments="EOL"
24984    new_path=`$CYGPATH -u "$path"`
24985    new_path=`$WHICH "$new_path" 2> /dev/null`
24986    # bat and cmd files are not always considered executable in cygwin causing which
24987    # to not find them
24988    if test "x$new_path" = x \
24989             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24990             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24991      new_path=`$CYGPATH -u "$path"`
24992    fi
24993    if test "x$new_path" = x; then
24994      # It's still not found. Now this is an unrecoverable error.
24995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24996$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24997      has_space=`$ECHO "$complete" | $GREP " "`
24998      if test "x$has_space" != x; then
24999        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25000$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25001      fi
25002      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25003    fi
25004  fi
25005
25006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25009  # "foo.exe" is OK but "foo" is an error.
25010  #
25011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25012  # It is also a way to make sure we got the proper file name for the real test later on.
25013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25014  if test "x$test_shortpath" = x; then
25015    # Short path failed, file does not exist as specified.
25016    # Try adding .exe or .cmd
25017    if test -f "${new_path}.exe"; then
25018       input_to_shortpath="${new_path}.exe"
25019    elif test -f "${new_path}.cmd"; then
25020       input_to_shortpath="${new_path}.cmd"
25021    else
25022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25023$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25024      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25025$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25026      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25027    fi
25028  else
25029    input_to_shortpath="$new_path"
25030  fi
25031
25032  # Call helper function which possibly converts this using DOS-style short mode.
25033  # If so, the updated path is stored in $new_path.
25034  new_path="$input_to_shortpath"
25035
25036  input_path="$input_to_shortpath"
25037  # Check if we need to convert this using DOS-style short mode. If the path
25038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25039  # take no chances and rewrite it.
25040  # Note: m4 eats our [], so we need to use [ and ] instead.
25041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25042  if test "x$has_forbidden_chars" != x; then
25043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25047      # Going to short mode and back again did indeed matter. Since short mode is
25048      # case insensitive, let's make it lowercase to improve readability.
25049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25050      # Now convert it back to Unix-stile (cygpath)
25051      input_path=`$CYGPATH -u "$shortmode_path"`
25052      new_path="$input_path"
25053    fi
25054  fi
25055
25056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25057  if test "x$test_cygdrive_prefix" = x; then
25058    # As a simple fix, exclude /usr/bin since it's not a real path.
25059    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25061      # a path prefixed by /cygdrive for fixpath to work.
25062      new_path="$CYGWIN_ROOT_PATH$input_path"
25063    fi
25064  fi
25065
25066  # remove trailing .exe if any
25067  new_path="${new_path/%.exe/}"
25068
25069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25070
25071  # First separate the path from the arguments. This will split at the first
25072  # space.
25073  complete="$STRIP"
25074  path="${complete%% *}"
25075  tmp="$complete EOL"
25076  arguments="${tmp#* }"
25077
25078  # Input might be given as Windows format, start by converting to
25079  # unix format.
25080  new_path="$path"
25081
25082  windows_path="$new_path"
25083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25084    unix_path=`$CYGPATH -u "$windows_path"`
25085    new_path="$unix_path"
25086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25088    new_path="$unix_path"
25089  fi
25090
25091
25092  # Now try to locate executable using which
25093  new_path=`$WHICH "$new_path" 2> /dev/null`
25094
25095  if test "x$new_path" = x; then
25096    # Oops. Which didn't find the executable.
25097    # The splitting of arguments from the executable at a space might have been incorrect,
25098    # since paths with space are more likely in Windows. Give it another try with the whole
25099    # argument.
25100    path="$complete"
25101    arguments="EOL"
25102    new_path="$path"
25103
25104  windows_path="$new_path"
25105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25106    unix_path=`$CYGPATH -u "$windows_path"`
25107    new_path="$unix_path"
25108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25110    new_path="$unix_path"
25111  fi
25112
25113
25114    new_path=`$WHICH "$new_path" 2> /dev/null`
25115
25116    if test "x$new_path" = x; then
25117      # It's still not found. Now this is an unrecoverable error.
25118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25119$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25120      has_space=`$ECHO "$complete" | $GREP " "`
25121      if test "x$has_space" != x; then
25122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25124      fi
25125      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25126    fi
25127  fi
25128
25129  # Now new_path has a complete unix path to the binary
25130  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25131    # Keep paths in /bin as-is, but remove trailing .exe if any
25132    new_path="${new_path/%.exe/}"
25133    # Do not save /bin paths to all_fixpath_prefixes!
25134  else
25135    # Not in mixed or Windows style, start by that.
25136    new_path=`cmd //c echo $new_path`
25137
25138  input_path="$new_path"
25139  # Check if we need to convert this using DOS-style short mode. If the path
25140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25141  # take no chances and rewrite it.
25142  # Note: m4 eats our [], so we need to use [ and ] instead.
25143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25144  if test "x$has_forbidden_chars" != x; then
25145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25147  fi
25148
25149    # Output is in $new_path
25150
25151  windows_path="$new_path"
25152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25153    unix_path=`$CYGPATH -u "$windows_path"`
25154    new_path="$unix_path"
25155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25157    new_path="$unix_path"
25158  fi
25159
25160    # remove trailing .exe if any
25161    new_path="${new_path/%.exe/}"
25162
25163    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25164    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25165  fi
25166
25167  else
25168    # We're on a posix platform. Hooray! :)
25169    # First separate the path from the arguments. This will split at the first
25170    # space.
25171    complete="$STRIP"
25172    path="${complete%% *}"
25173    tmp="$complete EOL"
25174    arguments="${tmp#* }"
25175
25176    # Cannot rely on the command "which" here since it doesn't always work.
25177    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25178    if test -z "$is_absolute_path"; then
25179      # Path to executable is not absolute. Find it.
25180      IFS_save="$IFS"
25181      IFS=:
25182      for p in $PATH; do
25183        if test -f "$p/$path" && test -x "$p/$path"; then
25184          new_path="$p/$path"
25185          break
25186        fi
25187      done
25188      IFS="$IFS_save"
25189    else
25190      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25191$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25192      new_path="$path"
25193    fi
25194
25195    if test "x$new_path" = x; then
25196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25197$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25198        has_space=`$ECHO "$complete" | $GREP " "`
25199        if test "x$has_space" != x; then
25200          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25201$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25202        fi
25203        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25204      fi
25205  fi
25206
25207      # Now join together the path and the arguments once again
25208      if test "x$arguments" != xEOL; then
25209        new_complete="$new_path ${arguments% *}"
25210      else
25211        new_complete="$new_path"
25212      fi
25213
25214  if test "x$complete" != "x$new_complete"; then
25215      STRIP="$new_complete"
25216      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25217$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25218    fi
25219
25220    # Extract the first word of "mcs", so it can be a program name with args.
25221set dummy mcs; ac_word=$2
25222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25223$as_echo_n "checking for $ac_word... " >&6; }
25224if test "${ac_cv_path_MCS+set}" = set; then :
25225  $as_echo_n "(cached) " >&6
25226else
25227  case $MCS in
25228  [\\/]* | ?:[\\/]*)
25229  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25230  ;;
25231  *)
25232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25233for as_dir in $PATH
25234do
25235  IFS=$as_save_IFS
25236  test -z "$as_dir" && as_dir=.
25237    for ac_exec_ext in '' $ac_executable_extensions; do
25238  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25239    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25241    break 2
25242  fi
25243done
25244  done
25245IFS=$as_save_IFS
25246
25247  ;;
25248esac
25249fi
25250MCS=$ac_cv_path_MCS
25251if test -n "$MCS"; then
25252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25253$as_echo "$MCS" >&6; }
25254else
25255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25256$as_echo "no" >&6; }
25257fi
25258
25259
25260
25261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25262
25263  # First separate the path from the arguments. This will split at the first
25264  # space.
25265  complete="$MCS"
25266  path="${complete%% *}"
25267  tmp="$complete EOL"
25268  arguments="${tmp#* }"
25269
25270  # Input might be given as Windows format, start by converting to
25271  # unix format.
25272  new_path=`$CYGPATH -u "$path"`
25273
25274  # Now try to locate executable using which
25275  new_path=`$WHICH "$new_path" 2> /dev/null`
25276  # bat and cmd files are not always considered executable in cygwin causing which
25277  # to not find them
25278  if test "x$new_path" = x \
25279           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25280           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25281    new_path=`$CYGPATH -u "$path"`
25282  fi
25283  if test "x$new_path" = x; then
25284    # Oops. Which didn't find the executable.
25285    # The splitting of arguments from the executable at a space might have been incorrect,
25286    # since paths with space are more likely in Windows. Give it another try with the whole
25287    # argument.
25288    path="$complete"
25289    arguments="EOL"
25290    new_path=`$CYGPATH -u "$path"`
25291    new_path=`$WHICH "$new_path" 2> /dev/null`
25292    # bat and cmd files are not always considered executable in cygwin causing which
25293    # to not find them
25294    if test "x$new_path" = x \
25295             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25296             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25297      new_path=`$CYGPATH -u "$path"`
25298    fi
25299    if test "x$new_path" = x; then
25300      # It's still not found. Now this is an unrecoverable error.
25301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25302$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25303      has_space=`$ECHO "$complete" | $GREP " "`
25304      if test "x$has_space" != x; then
25305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25307      fi
25308      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25309    fi
25310  fi
25311
25312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25315  # "foo.exe" is OK but "foo" is an error.
25316  #
25317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25318  # It is also a way to make sure we got the proper file name for the real test later on.
25319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25320  if test "x$test_shortpath" = x; then
25321    # Short path failed, file does not exist as specified.
25322    # Try adding .exe or .cmd
25323    if test -f "${new_path}.exe"; then
25324       input_to_shortpath="${new_path}.exe"
25325    elif test -f "${new_path}.cmd"; then
25326       input_to_shortpath="${new_path}.cmd"
25327    else
25328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25329$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25332      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25333    fi
25334  else
25335    input_to_shortpath="$new_path"
25336  fi
25337
25338  # Call helper function which possibly converts this using DOS-style short mode.
25339  # If so, the updated path is stored in $new_path.
25340  new_path="$input_to_shortpath"
25341
25342  input_path="$input_to_shortpath"
25343  # Check if we need to convert this using DOS-style short mode. If the path
25344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25345  # take no chances and rewrite it.
25346  # Note: m4 eats our [], so we need to use [ and ] instead.
25347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25348  if test "x$has_forbidden_chars" != x; then
25349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25353      # Going to short mode and back again did indeed matter. Since short mode is
25354      # case insensitive, let's make it lowercase to improve readability.
25355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25356      # Now convert it back to Unix-stile (cygpath)
25357      input_path=`$CYGPATH -u "$shortmode_path"`
25358      new_path="$input_path"
25359    fi
25360  fi
25361
25362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25363  if test "x$test_cygdrive_prefix" = x; then
25364    # As a simple fix, exclude /usr/bin since it's not a real path.
25365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25367      # a path prefixed by /cygdrive for fixpath to work.
25368      new_path="$CYGWIN_ROOT_PATH$input_path"
25369    fi
25370  fi
25371
25372  # remove trailing .exe if any
25373  new_path="${new_path/%.exe/}"
25374
25375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25376
25377  # First separate the path from the arguments. This will split at the first
25378  # space.
25379  complete="$MCS"
25380  path="${complete%% *}"
25381  tmp="$complete EOL"
25382  arguments="${tmp#* }"
25383
25384  # Input might be given as Windows format, start by converting to
25385  # unix format.
25386  new_path="$path"
25387
25388  windows_path="$new_path"
25389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25390    unix_path=`$CYGPATH -u "$windows_path"`
25391    new_path="$unix_path"
25392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25394    new_path="$unix_path"
25395  fi
25396
25397
25398  # Now try to locate executable using which
25399  new_path=`$WHICH "$new_path" 2> /dev/null`
25400
25401  if test "x$new_path" = x; then
25402    # Oops. Which didn't find the executable.
25403    # The splitting of arguments from the executable at a space might have been incorrect,
25404    # since paths with space are more likely in Windows. Give it another try with the whole
25405    # argument.
25406    path="$complete"
25407    arguments="EOL"
25408    new_path="$path"
25409
25410  windows_path="$new_path"
25411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25412    unix_path=`$CYGPATH -u "$windows_path"`
25413    new_path="$unix_path"
25414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25416    new_path="$unix_path"
25417  fi
25418
25419
25420    new_path=`$WHICH "$new_path" 2> /dev/null`
25421
25422    if test "x$new_path" = x; then
25423      # It's still not found. Now this is an unrecoverable error.
25424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25425$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25426      has_space=`$ECHO "$complete" | $GREP " "`
25427      if test "x$has_space" != x; then
25428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25430      fi
25431      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25432    fi
25433  fi
25434
25435  # Now new_path has a complete unix path to the binary
25436  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25437    # Keep paths in /bin as-is, but remove trailing .exe if any
25438    new_path="${new_path/%.exe/}"
25439    # Do not save /bin paths to all_fixpath_prefixes!
25440  else
25441    # Not in mixed or Windows style, start by that.
25442    new_path=`cmd //c echo $new_path`
25443
25444  input_path="$new_path"
25445  # Check if we need to convert this using DOS-style short mode. If the path
25446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25447  # take no chances and rewrite it.
25448  # Note: m4 eats our [], so we need to use [ and ] instead.
25449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25450  if test "x$has_forbidden_chars" != x; then
25451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25453  fi
25454
25455    # Output is in $new_path
25456
25457  windows_path="$new_path"
25458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25459    unix_path=`$CYGPATH -u "$windows_path"`
25460    new_path="$unix_path"
25461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25463    new_path="$unix_path"
25464  fi
25465
25466    # remove trailing .exe if any
25467    new_path="${new_path/%.exe/}"
25468
25469    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25470    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25471  fi
25472
25473  else
25474    # We're on a posix platform. Hooray! :)
25475    # First separate the path from the arguments. This will split at the first
25476    # space.
25477    complete="$MCS"
25478    path="${complete%% *}"
25479    tmp="$complete EOL"
25480    arguments="${tmp#* }"
25481
25482    # Cannot rely on the command "which" here since it doesn't always work.
25483    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25484    if test -z "$is_absolute_path"; then
25485      # Path to executable is not absolute. Find it.
25486      IFS_save="$IFS"
25487      IFS=:
25488      for p in $PATH; do
25489        if test -f "$p/$path" && test -x "$p/$path"; then
25490          new_path="$p/$path"
25491          break
25492        fi
25493      done
25494      IFS="$IFS_save"
25495    else
25496      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25497$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25498      new_path="$path"
25499    fi
25500
25501    if test "x$new_path" = x; then
25502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25503$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25504        has_space=`$ECHO "$complete" | $GREP " "`
25505        if test "x$has_space" != x; then
25506          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25507$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25508        fi
25509        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25510      fi
25511  fi
25512
25513      # Now join together the path and the arguments once again
25514      if test "x$arguments" != xEOL; then
25515        new_complete="$new_path ${arguments% *}"
25516      else
25517        new_complete="$new_path"
25518      fi
25519
25520  if test "x$complete" != "x$new_complete"; then
25521      MCS="$new_complete"
25522      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25523$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25524    fi
25525
25526elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25527    if test -n "$ac_tool_prefix"; then
25528  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25529set dummy ${ac_tool_prefix}nm; ac_word=$2
25530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25531$as_echo_n "checking for $ac_word... " >&6; }
25532if test "${ac_cv_prog_NM+set}" = set; then :
25533  $as_echo_n "(cached) " >&6
25534else
25535  if test -n "$NM"; then
25536  ac_cv_prog_NM="$NM" # Let the user override the test.
25537else
25538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25539for as_dir in $PATH
25540do
25541  IFS=$as_save_IFS
25542  test -z "$as_dir" && as_dir=.
25543    for ac_exec_ext in '' $ac_executable_extensions; do
25544  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25545    ac_cv_prog_NM="${ac_tool_prefix}nm"
25546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25547    break 2
25548  fi
25549done
25550  done
25551IFS=$as_save_IFS
25552
25553fi
25554fi
25555NM=$ac_cv_prog_NM
25556if test -n "$NM"; then
25557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25558$as_echo "$NM" >&6; }
25559else
25560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25561$as_echo "no" >&6; }
25562fi
25563
25564
25565fi
25566if test -z "$ac_cv_prog_NM"; then
25567  ac_ct_NM=$NM
25568  # Extract the first word of "nm", so it can be a program name with args.
25569set dummy nm; ac_word=$2
25570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25571$as_echo_n "checking for $ac_word... " >&6; }
25572if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25573  $as_echo_n "(cached) " >&6
25574else
25575  if test -n "$ac_ct_NM"; then
25576  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25577else
25578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25579for as_dir in $PATH
25580do
25581  IFS=$as_save_IFS
25582  test -z "$as_dir" && as_dir=.
25583    for ac_exec_ext in '' $ac_executable_extensions; do
25584  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25585    ac_cv_prog_ac_ct_NM="nm"
25586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25587    break 2
25588  fi
25589done
25590  done
25591IFS=$as_save_IFS
25592
25593fi
25594fi
25595ac_ct_NM=$ac_cv_prog_ac_ct_NM
25596if test -n "$ac_ct_NM"; then
25597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25598$as_echo "$ac_ct_NM" >&6; }
25599else
25600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25601$as_echo "no" >&6; }
25602fi
25603
25604  if test "x$ac_ct_NM" = x; then
25605    NM=""
25606  else
25607    case $cross_compiling:$ac_tool_warned in
25608yes:)
25609{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25610$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25611ac_tool_warned=yes ;;
25612esac
25613    NM=$ac_ct_NM
25614  fi
25615else
25616  NM="$ac_cv_prog_NM"
25617fi
25618
25619
25620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25621
25622  # First separate the path from the arguments. This will split at the first
25623  # space.
25624  complete="$NM"
25625  path="${complete%% *}"
25626  tmp="$complete EOL"
25627  arguments="${tmp#* }"
25628
25629  # Input might be given as Windows format, start by converting to
25630  # unix format.
25631  new_path=`$CYGPATH -u "$path"`
25632
25633  # Now try to locate executable using which
25634  new_path=`$WHICH "$new_path" 2> /dev/null`
25635  # bat and cmd files are not always considered executable in cygwin causing which
25636  # to not find them
25637  if test "x$new_path" = x \
25638           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25639           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25640    new_path=`$CYGPATH -u "$path"`
25641  fi
25642  if test "x$new_path" = x; then
25643    # Oops. Which didn't find the executable.
25644    # The splitting of arguments from the executable at a space might have been incorrect,
25645    # since paths with space are more likely in Windows. Give it another try with the whole
25646    # argument.
25647    path="$complete"
25648    arguments="EOL"
25649    new_path=`$CYGPATH -u "$path"`
25650    new_path=`$WHICH "$new_path" 2> /dev/null`
25651    # bat and cmd files are not always considered executable in cygwin causing which
25652    # to not find them
25653    if test "x$new_path" = x \
25654             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25655             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25656      new_path=`$CYGPATH -u "$path"`
25657    fi
25658    if test "x$new_path" = x; then
25659      # It's still not found. Now this is an unrecoverable error.
25660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25661$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25662      has_space=`$ECHO "$complete" | $GREP " "`
25663      if test "x$has_space" != x; then
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25666      fi
25667      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25668    fi
25669  fi
25670
25671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25674  # "foo.exe" is OK but "foo" is an error.
25675  #
25676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25677  # It is also a way to make sure we got the proper file name for the real test later on.
25678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25679  if test "x$test_shortpath" = x; then
25680    # Short path failed, file does not exist as specified.
25681    # Try adding .exe or .cmd
25682    if test -f "${new_path}.exe"; then
25683       input_to_shortpath="${new_path}.exe"
25684    elif test -f "${new_path}.cmd"; then
25685       input_to_shortpath="${new_path}.cmd"
25686    else
25687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25688$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25689      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25690$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25691      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25692    fi
25693  else
25694    input_to_shortpath="$new_path"
25695  fi
25696
25697  # Call helper function which possibly converts this using DOS-style short mode.
25698  # If so, the updated path is stored in $new_path.
25699  new_path="$input_to_shortpath"
25700
25701  input_path="$input_to_shortpath"
25702  # Check if we need to convert this using DOS-style short mode. If the path
25703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25704  # take no chances and rewrite it.
25705  # Note: m4 eats our [], so we need to use [ and ] instead.
25706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25707  if test "x$has_forbidden_chars" != x; then
25708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25712      # Going to short mode and back again did indeed matter. Since short mode is
25713      # case insensitive, let's make it lowercase to improve readability.
25714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25715      # Now convert it back to Unix-stile (cygpath)
25716      input_path=`$CYGPATH -u "$shortmode_path"`
25717      new_path="$input_path"
25718    fi
25719  fi
25720
25721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25722  if test "x$test_cygdrive_prefix" = x; then
25723    # As a simple fix, exclude /usr/bin since it's not a real path.
25724    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25726      # a path prefixed by /cygdrive for fixpath to work.
25727      new_path="$CYGWIN_ROOT_PATH$input_path"
25728    fi
25729  fi
25730
25731  # remove trailing .exe if any
25732  new_path="${new_path/%.exe/}"
25733
25734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25735
25736  # First separate the path from the arguments. This will split at the first
25737  # space.
25738  complete="$NM"
25739  path="${complete%% *}"
25740  tmp="$complete EOL"
25741  arguments="${tmp#* }"
25742
25743  # Input might be given as Windows format, start by converting to
25744  # unix format.
25745  new_path="$path"
25746
25747  windows_path="$new_path"
25748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25749    unix_path=`$CYGPATH -u "$windows_path"`
25750    new_path="$unix_path"
25751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25753    new_path="$unix_path"
25754  fi
25755
25756
25757  # Now try to locate executable using which
25758  new_path=`$WHICH "$new_path" 2> /dev/null`
25759
25760  if test "x$new_path" = x; then
25761    # Oops. Which didn't find the executable.
25762    # The splitting of arguments from the executable at a space might have been incorrect,
25763    # since paths with space are more likely in Windows. Give it another try with the whole
25764    # argument.
25765    path="$complete"
25766    arguments="EOL"
25767    new_path="$path"
25768
25769  windows_path="$new_path"
25770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25771    unix_path=`$CYGPATH -u "$windows_path"`
25772    new_path="$unix_path"
25773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25775    new_path="$unix_path"
25776  fi
25777
25778
25779    new_path=`$WHICH "$new_path" 2> /dev/null`
25780
25781    if test "x$new_path" = x; then
25782      # It's still not found. Now this is an unrecoverable error.
25783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25784$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25785      has_space=`$ECHO "$complete" | $GREP " "`
25786      if test "x$has_space" != x; then
25787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25789      fi
25790      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25791    fi
25792  fi
25793
25794  # Now new_path has a complete unix path to the binary
25795  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25796    # Keep paths in /bin as-is, but remove trailing .exe if any
25797    new_path="${new_path/%.exe/}"
25798    # Do not save /bin paths to all_fixpath_prefixes!
25799  else
25800    # Not in mixed or Windows style, start by that.
25801    new_path=`cmd //c echo $new_path`
25802
25803  input_path="$new_path"
25804  # Check if we need to convert this using DOS-style short mode. If the path
25805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25806  # take no chances and rewrite it.
25807  # Note: m4 eats our [], so we need to use [ and ] instead.
25808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25809  if test "x$has_forbidden_chars" != x; then
25810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25812  fi
25813
25814    # Output is in $new_path
25815
25816  windows_path="$new_path"
25817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25818    unix_path=`$CYGPATH -u "$windows_path"`
25819    new_path="$unix_path"
25820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25822    new_path="$unix_path"
25823  fi
25824
25825    # remove trailing .exe if any
25826    new_path="${new_path/%.exe/}"
25827
25828    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25829    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25830  fi
25831
25832  else
25833    # We're on a posix platform. Hooray! :)
25834    # First separate the path from the arguments. This will split at the first
25835    # space.
25836    complete="$NM"
25837    path="${complete%% *}"
25838    tmp="$complete EOL"
25839    arguments="${tmp#* }"
25840
25841    # Cannot rely on the command "which" here since it doesn't always work.
25842    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25843    if test -z "$is_absolute_path"; then
25844      # Path to executable is not absolute. Find it.
25845      IFS_save="$IFS"
25846      IFS=:
25847      for p in $PATH; do
25848        if test -f "$p/$path" && test -x "$p/$path"; then
25849          new_path="$p/$path"
25850          break
25851        fi
25852      done
25853      IFS="$IFS_save"
25854    else
25855      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25856$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25857      new_path="$path"
25858    fi
25859
25860    if test "x$new_path" = x; then
25861        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25862$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25863        has_space=`$ECHO "$complete" | $GREP " "`
25864        if test "x$has_space" != x; then
25865          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25866$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25867        fi
25868        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25869      fi
25870  fi
25871
25872      # Now join together the path and the arguments once again
25873      if test "x$arguments" != xEOL; then
25874        new_complete="$new_path ${arguments% *}"
25875      else
25876        new_complete="$new_path"
25877      fi
25878
25879  if test "x$complete" != "x$new_complete"; then
25880      NM="$new_complete"
25881      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25882$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25883    fi
25884
25885    if test -n "$ac_tool_prefix"; then
25886  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25887set dummy ${ac_tool_prefix}strip; ac_word=$2
25888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25889$as_echo_n "checking for $ac_word... " >&6; }
25890if test "${ac_cv_prog_STRIP+set}" = set; then :
25891  $as_echo_n "(cached) " >&6
25892else
25893  if test -n "$STRIP"; then
25894  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25895else
25896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25897for as_dir in $PATH
25898do
25899  IFS=$as_save_IFS
25900  test -z "$as_dir" && as_dir=.
25901    for ac_exec_ext in '' $ac_executable_extensions; do
25902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25903    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25905    break 2
25906  fi
25907done
25908  done
25909IFS=$as_save_IFS
25910
25911fi
25912fi
25913STRIP=$ac_cv_prog_STRIP
25914if test -n "$STRIP"; then
25915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25916$as_echo "$STRIP" >&6; }
25917else
25918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25919$as_echo "no" >&6; }
25920fi
25921
25922
25923fi
25924if test -z "$ac_cv_prog_STRIP"; then
25925  ac_ct_STRIP=$STRIP
25926  # Extract the first word of "strip", so it can be a program name with args.
25927set dummy strip; ac_word=$2
25928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25929$as_echo_n "checking for $ac_word... " >&6; }
25930if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25931  $as_echo_n "(cached) " >&6
25932else
25933  if test -n "$ac_ct_STRIP"; then
25934  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25935else
25936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25937for as_dir in $PATH
25938do
25939  IFS=$as_save_IFS
25940  test -z "$as_dir" && as_dir=.
25941    for ac_exec_ext in '' $ac_executable_extensions; do
25942  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25943    ac_cv_prog_ac_ct_STRIP="strip"
25944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25945    break 2
25946  fi
25947done
25948  done
25949IFS=$as_save_IFS
25950
25951fi
25952fi
25953ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25954if test -n "$ac_ct_STRIP"; then
25955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25956$as_echo "$ac_ct_STRIP" >&6; }
25957else
25958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25959$as_echo "no" >&6; }
25960fi
25961
25962  if test "x$ac_ct_STRIP" = x; then
25963    STRIP=""
25964  else
25965    case $cross_compiling:$ac_tool_warned in
25966yes:)
25967{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25968$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25969ac_tool_warned=yes ;;
25970esac
25971    STRIP=$ac_ct_STRIP
25972  fi
25973else
25974  STRIP="$ac_cv_prog_STRIP"
25975fi
25976
25977
25978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25979
25980  # First separate the path from the arguments. This will split at the first
25981  # space.
25982  complete="$STRIP"
25983  path="${complete%% *}"
25984  tmp="$complete EOL"
25985  arguments="${tmp#* }"
25986
25987  # Input might be given as Windows format, start by converting to
25988  # unix format.
25989  new_path=`$CYGPATH -u "$path"`
25990
25991  # Now try to locate executable using which
25992  new_path=`$WHICH "$new_path" 2> /dev/null`
25993  # bat and cmd files are not always considered executable in cygwin causing which
25994  # to not find them
25995  if test "x$new_path" = x \
25996           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25997           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25998    new_path=`$CYGPATH -u "$path"`
25999  fi
26000  if test "x$new_path" = x; then
26001    # Oops. Which didn't find the executable.
26002    # The splitting of arguments from the executable at a space might have been incorrect,
26003    # since paths with space are more likely in Windows. Give it another try with the whole
26004    # argument.
26005    path="$complete"
26006    arguments="EOL"
26007    new_path=`$CYGPATH -u "$path"`
26008    new_path=`$WHICH "$new_path" 2> /dev/null`
26009    # bat and cmd files are not always considered executable in cygwin causing which
26010    # to not find them
26011    if test "x$new_path" = x \
26012             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26013             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26014      new_path=`$CYGPATH -u "$path"`
26015    fi
26016    if test "x$new_path" = x; then
26017      # It's still not found. Now this is an unrecoverable error.
26018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26019$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26020      has_space=`$ECHO "$complete" | $GREP " "`
26021      if test "x$has_space" != x; then
26022        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26023$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26024      fi
26025      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26026    fi
26027  fi
26028
26029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26032  # "foo.exe" is OK but "foo" is an error.
26033  #
26034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26035  # It is also a way to make sure we got the proper file name for the real test later on.
26036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26037  if test "x$test_shortpath" = x; then
26038    # Short path failed, file does not exist as specified.
26039    # Try adding .exe or .cmd
26040    if test -f "${new_path}.exe"; then
26041       input_to_shortpath="${new_path}.exe"
26042    elif test -f "${new_path}.cmd"; then
26043       input_to_shortpath="${new_path}.cmd"
26044    else
26045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26046$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26047      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26048$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26049      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26050    fi
26051  else
26052    input_to_shortpath="$new_path"
26053  fi
26054
26055  # Call helper function which possibly converts this using DOS-style short mode.
26056  # If so, the updated path is stored in $new_path.
26057  new_path="$input_to_shortpath"
26058
26059  input_path="$input_to_shortpath"
26060  # Check if we need to convert this using DOS-style short mode. If the path
26061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26062  # take no chances and rewrite it.
26063  # Note: m4 eats our [], so we need to use [ and ] instead.
26064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26065  if test "x$has_forbidden_chars" != x; then
26066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26070      # Going to short mode and back again did indeed matter. Since short mode is
26071      # case insensitive, let's make it lowercase to improve readability.
26072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26073      # Now convert it back to Unix-stile (cygpath)
26074      input_path=`$CYGPATH -u "$shortmode_path"`
26075      new_path="$input_path"
26076    fi
26077  fi
26078
26079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26080  if test "x$test_cygdrive_prefix" = x; then
26081    # As a simple fix, exclude /usr/bin since it's not a real path.
26082    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26084      # a path prefixed by /cygdrive for fixpath to work.
26085      new_path="$CYGWIN_ROOT_PATH$input_path"
26086    fi
26087  fi
26088
26089  # remove trailing .exe if any
26090  new_path="${new_path/%.exe/}"
26091
26092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26093
26094  # First separate the path from the arguments. This will split at the first
26095  # space.
26096  complete="$STRIP"
26097  path="${complete%% *}"
26098  tmp="$complete EOL"
26099  arguments="${tmp#* }"
26100
26101  # Input might be given as Windows format, start by converting to
26102  # unix format.
26103  new_path="$path"
26104
26105  windows_path="$new_path"
26106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26107    unix_path=`$CYGPATH -u "$windows_path"`
26108    new_path="$unix_path"
26109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26111    new_path="$unix_path"
26112  fi
26113
26114
26115  # Now try to locate executable using which
26116  new_path=`$WHICH "$new_path" 2> /dev/null`
26117
26118  if test "x$new_path" = x; then
26119    # Oops. Which didn't find the executable.
26120    # The splitting of arguments from the executable at a space might have been incorrect,
26121    # since paths with space are more likely in Windows. Give it another try with the whole
26122    # argument.
26123    path="$complete"
26124    arguments="EOL"
26125    new_path="$path"
26126
26127  windows_path="$new_path"
26128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26129    unix_path=`$CYGPATH -u "$windows_path"`
26130    new_path="$unix_path"
26131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26133    new_path="$unix_path"
26134  fi
26135
26136
26137    new_path=`$WHICH "$new_path" 2> /dev/null`
26138
26139    if test "x$new_path" = x; then
26140      # It's still not found. Now this is an unrecoverable error.
26141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26142$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26143      has_space=`$ECHO "$complete" | $GREP " "`
26144      if test "x$has_space" != x; then
26145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26147      fi
26148      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26149    fi
26150  fi
26151
26152  # Now new_path has a complete unix path to the binary
26153  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26154    # Keep paths in /bin as-is, but remove trailing .exe if any
26155    new_path="${new_path/%.exe/}"
26156    # Do not save /bin paths to all_fixpath_prefixes!
26157  else
26158    # Not in mixed or Windows style, start by that.
26159    new_path=`cmd //c echo $new_path`
26160
26161  input_path="$new_path"
26162  # Check if we need to convert this using DOS-style short mode. If the path
26163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26164  # take no chances and rewrite it.
26165  # Note: m4 eats our [], so we need to use [ and ] instead.
26166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26167  if test "x$has_forbidden_chars" != x; then
26168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26170  fi
26171
26172    # Output is in $new_path
26173
26174  windows_path="$new_path"
26175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26176    unix_path=`$CYGPATH -u "$windows_path"`
26177    new_path="$unix_path"
26178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26180    new_path="$unix_path"
26181  fi
26182
26183    # remove trailing .exe if any
26184    new_path="${new_path/%.exe/}"
26185
26186    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26187    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26188  fi
26189
26190  else
26191    # We're on a posix platform. Hooray! :)
26192    # First separate the path from the arguments. This will split at the first
26193    # space.
26194    complete="$STRIP"
26195    path="${complete%% *}"
26196    tmp="$complete EOL"
26197    arguments="${tmp#* }"
26198
26199    # Cannot rely on the command "which" here since it doesn't always work.
26200    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26201    if test -z "$is_absolute_path"; then
26202      # Path to executable is not absolute. Find it.
26203      IFS_save="$IFS"
26204      IFS=:
26205      for p in $PATH; do
26206        if test -f "$p/$path" && test -x "$p/$path"; then
26207          new_path="$p/$path"
26208          break
26209        fi
26210      done
26211      IFS="$IFS_save"
26212    else
26213      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26214$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26215      new_path="$path"
26216    fi
26217
26218    if test "x$new_path" = x; then
26219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26220$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26221        has_space=`$ECHO "$complete" | $GREP " "`
26222        if test "x$has_space" != x; then
26223          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26224$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26225        fi
26226        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26227      fi
26228  fi
26229
26230      # Now join together the path and the arguments once again
26231      if test "x$arguments" != xEOL; then
26232        new_complete="$new_path ${arguments% *}"
26233      else
26234        new_complete="$new_path"
26235      fi
26236
26237  if test "x$complete" != "x$new_complete"; then
26238      STRIP="$new_complete"
26239      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26240$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26241    fi
26242
26243fi
26244
26245# objcopy is used for moving debug symbols to separate files when
26246# full debug symbols are enabled.
26247if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26248    if test -n "$ac_tool_prefix"; then
26249  for ac_prog in gobjcopy objcopy
26250  do
26251    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26252set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26254$as_echo_n "checking for $ac_word... " >&6; }
26255if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26256  $as_echo_n "(cached) " >&6
26257else
26258  if test -n "$OBJCOPY"; then
26259  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26260else
26261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26262for as_dir in $PATH
26263do
26264  IFS=$as_save_IFS
26265  test -z "$as_dir" && as_dir=.
26266    for ac_exec_ext in '' $ac_executable_extensions; do
26267  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26268    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26270    break 2
26271  fi
26272done
26273  done
26274IFS=$as_save_IFS
26275
26276fi
26277fi
26278OBJCOPY=$ac_cv_prog_OBJCOPY
26279if test -n "$OBJCOPY"; then
26280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26281$as_echo "$OBJCOPY" >&6; }
26282else
26283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26284$as_echo "no" >&6; }
26285fi
26286
26287
26288    test -n "$OBJCOPY" && break
26289  done
26290fi
26291if test -z "$OBJCOPY"; then
26292  ac_ct_OBJCOPY=$OBJCOPY
26293  for ac_prog in gobjcopy objcopy
26294do
26295  # Extract the first word of "$ac_prog", so it can be a program name with args.
26296set dummy $ac_prog; ac_word=$2
26297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26298$as_echo_n "checking for $ac_word... " >&6; }
26299if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26300  $as_echo_n "(cached) " >&6
26301else
26302  if test -n "$ac_ct_OBJCOPY"; then
26303  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26304else
26305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26306for as_dir in $PATH
26307do
26308  IFS=$as_save_IFS
26309  test -z "$as_dir" && as_dir=.
26310    for ac_exec_ext in '' $ac_executable_extensions; do
26311  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26312    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26314    break 2
26315  fi
26316done
26317  done
26318IFS=$as_save_IFS
26319
26320fi
26321fi
26322ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26323if test -n "$ac_ct_OBJCOPY"; then
26324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26325$as_echo "$ac_ct_OBJCOPY" >&6; }
26326else
26327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26328$as_echo "no" >&6; }
26329fi
26330
26331
26332  test -n "$ac_ct_OBJCOPY" && break
26333done
26334
26335  if test "x$ac_ct_OBJCOPY" = x; then
26336    OBJCOPY=""
26337  else
26338    case $cross_compiling:$ac_tool_warned in
26339yes:)
26340{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26341$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26342ac_tool_warned=yes ;;
26343esac
26344    OBJCOPY=$ac_ct_OBJCOPY
26345  fi
26346fi
26347
26348    # Only call fixup if objcopy was found.
26349    if test -n "$OBJCOPY"; then
26350
26351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26352
26353  # First separate the path from the arguments. This will split at the first
26354  # space.
26355  complete="$OBJCOPY"
26356  path="${complete%% *}"
26357  tmp="$complete EOL"
26358  arguments="${tmp#* }"
26359
26360  # Input might be given as Windows format, start by converting to
26361  # unix format.
26362  new_path=`$CYGPATH -u "$path"`
26363
26364  # Now try to locate executable using which
26365  new_path=`$WHICH "$new_path" 2> /dev/null`
26366  # bat and cmd files are not always considered executable in cygwin causing which
26367  # to not find them
26368  if test "x$new_path" = x \
26369           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26370           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26371    new_path=`$CYGPATH -u "$path"`
26372  fi
26373  if test "x$new_path" = x; then
26374    # Oops. Which didn't find the executable.
26375    # The splitting of arguments from the executable at a space might have been incorrect,
26376    # since paths with space are more likely in Windows. Give it another try with the whole
26377    # argument.
26378    path="$complete"
26379    arguments="EOL"
26380    new_path=`$CYGPATH -u "$path"`
26381    new_path=`$WHICH "$new_path" 2> /dev/null`
26382    # bat and cmd files are not always considered executable in cygwin causing which
26383    # to not find them
26384    if test "x$new_path" = x \
26385             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26386             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26387      new_path=`$CYGPATH -u "$path"`
26388    fi
26389    if test "x$new_path" = x; then
26390      # It's still not found. Now this is an unrecoverable error.
26391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26392$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26393      has_space=`$ECHO "$complete" | $GREP " "`
26394      if test "x$has_space" != x; then
26395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26397      fi
26398      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26399    fi
26400  fi
26401
26402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26405  # "foo.exe" is OK but "foo" is an error.
26406  #
26407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26408  # It is also a way to make sure we got the proper file name for the real test later on.
26409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26410  if test "x$test_shortpath" = x; then
26411    # Short path failed, file does not exist as specified.
26412    # Try adding .exe or .cmd
26413    if test -f "${new_path}.exe"; then
26414       input_to_shortpath="${new_path}.exe"
26415    elif test -f "${new_path}.cmd"; then
26416       input_to_shortpath="${new_path}.cmd"
26417    else
26418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26419$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26422      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26423    fi
26424  else
26425    input_to_shortpath="$new_path"
26426  fi
26427
26428  # Call helper function which possibly converts this using DOS-style short mode.
26429  # If so, the updated path is stored in $new_path.
26430  new_path="$input_to_shortpath"
26431
26432  input_path="$input_to_shortpath"
26433  # Check if we need to convert this using DOS-style short mode. If the path
26434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26435  # take no chances and rewrite it.
26436  # Note: m4 eats our [], so we need to use [ and ] instead.
26437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26438  if test "x$has_forbidden_chars" != x; then
26439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26443      # Going to short mode and back again did indeed matter. Since short mode is
26444      # case insensitive, let's make it lowercase to improve readability.
26445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26446      # Now convert it back to Unix-stile (cygpath)
26447      input_path=`$CYGPATH -u "$shortmode_path"`
26448      new_path="$input_path"
26449    fi
26450  fi
26451
26452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26453  if test "x$test_cygdrive_prefix" = x; then
26454    # As a simple fix, exclude /usr/bin since it's not a real path.
26455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26457      # a path prefixed by /cygdrive for fixpath to work.
26458      new_path="$CYGWIN_ROOT_PATH$input_path"
26459    fi
26460  fi
26461
26462  # remove trailing .exe if any
26463  new_path="${new_path/%.exe/}"
26464
26465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26466
26467  # First separate the path from the arguments. This will split at the first
26468  # space.
26469  complete="$OBJCOPY"
26470  path="${complete%% *}"
26471  tmp="$complete EOL"
26472  arguments="${tmp#* }"
26473
26474  # Input might be given as Windows format, start by converting to
26475  # unix format.
26476  new_path="$path"
26477
26478  windows_path="$new_path"
26479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26480    unix_path=`$CYGPATH -u "$windows_path"`
26481    new_path="$unix_path"
26482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26484    new_path="$unix_path"
26485  fi
26486
26487
26488  # Now try to locate executable using which
26489  new_path=`$WHICH "$new_path" 2> /dev/null`
26490
26491  if test "x$new_path" = x; then
26492    # Oops. Which didn't find the executable.
26493    # The splitting of arguments from the executable at a space might have been incorrect,
26494    # since paths with space are more likely in Windows. Give it another try with the whole
26495    # argument.
26496    path="$complete"
26497    arguments="EOL"
26498    new_path="$path"
26499
26500  windows_path="$new_path"
26501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26502    unix_path=`$CYGPATH -u "$windows_path"`
26503    new_path="$unix_path"
26504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26506    new_path="$unix_path"
26507  fi
26508
26509
26510    new_path=`$WHICH "$new_path" 2> /dev/null`
26511
26512    if test "x$new_path" = x; then
26513      # It's still not found. Now this is an unrecoverable error.
26514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26515$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26516      has_space=`$ECHO "$complete" | $GREP " "`
26517      if test "x$has_space" != x; then
26518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26520      fi
26521      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26522    fi
26523  fi
26524
26525  # Now new_path has a complete unix path to the binary
26526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26527    # Keep paths in /bin as-is, but remove trailing .exe if any
26528    new_path="${new_path/%.exe/}"
26529    # Do not save /bin paths to all_fixpath_prefixes!
26530  else
26531    # Not in mixed or Windows style, start by that.
26532    new_path=`cmd //c echo $new_path`
26533
26534  input_path="$new_path"
26535  # Check if we need to convert this using DOS-style short mode. If the path
26536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26537  # take no chances and rewrite it.
26538  # Note: m4 eats our [], so we need to use [ and ] instead.
26539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26540  if test "x$has_forbidden_chars" != x; then
26541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26543  fi
26544
26545    # Output is in $new_path
26546
26547  windows_path="$new_path"
26548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26549    unix_path=`$CYGPATH -u "$windows_path"`
26550    new_path="$unix_path"
26551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26553    new_path="$unix_path"
26554  fi
26555
26556    # remove trailing .exe if any
26557    new_path="${new_path/%.exe/}"
26558
26559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26561  fi
26562
26563  else
26564    # We're on a posix platform. Hooray! :)
26565    # First separate the path from the arguments. This will split at the first
26566    # space.
26567    complete="$OBJCOPY"
26568    path="${complete%% *}"
26569    tmp="$complete EOL"
26570    arguments="${tmp#* }"
26571
26572    # Cannot rely on the command "which" here since it doesn't always work.
26573    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26574    if test -z "$is_absolute_path"; then
26575      # Path to executable is not absolute. Find it.
26576      IFS_save="$IFS"
26577      IFS=:
26578      for p in $PATH; do
26579        if test -f "$p/$path" && test -x "$p/$path"; then
26580          new_path="$p/$path"
26581          break
26582        fi
26583      done
26584      IFS="$IFS_save"
26585    else
26586      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26587$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26588      new_path="$path"
26589    fi
26590
26591    if test "x$new_path" = x; then
26592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26593$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26594        has_space=`$ECHO "$complete" | $GREP " "`
26595        if test "x$has_space" != x; then
26596          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26597$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26598        fi
26599        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26600      fi
26601  fi
26602
26603      # Now join together the path and the arguments once again
26604      if test "x$arguments" != xEOL; then
26605        new_complete="$new_path ${arguments% *}"
26606      else
26607        new_complete="$new_path"
26608      fi
26609
26610  if test "x$complete" != "x$new_complete"; then
26611      OBJCOPY="$new_complete"
26612      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26613$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26614    fi
26615
26616    fi
26617fi
26618
26619if test -n "$ac_tool_prefix"; then
26620  for ac_prog in gobjdump objdump
26621  do
26622    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26623set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26625$as_echo_n "checking for $ac_word... " >&6; }
26626if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26627  $as_echo_n "(cached) " >&6
26628else
26629  if test -n "$OBJDUMP"; then
26630  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26631else
26632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26633for as_dir in $PATH
26634do
26635  IFS=$as_save_IFS
26636  test -z "$as_dir" && as_dir=.
26637    for ac_exec_ext in '' $ac_executable_extensions; do
26638  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26639    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26641    break 2
26642  fi
26643done
26644  done
26645IFS=$as_save_IFS
26646
26647fi
26648fi
26649OBJDUMP=$ac_cv_prog_OBJDUMP
26650if test -n "$OBJDUMP"; then
26651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26652$as_echo "$OBJDUMP" >&6; }
26653else
26654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26655$as_echo "no" >&6; }
26656fi
26657
26658
26659    test -n "$OBJDUMP" && break
26660  done
26661fi
26662if test -z "$OBJDUMP"; then
26663  ac_ct_OBJDUMP=$OBJDUMP
26664  for ac_prog in gobjdump objdump
26665do
26666  # Extract the first word of "$ac_prog", so it can be a program name with args.
26667set dummy $ac_prog; ac_word=$2
26668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26669$as_echo_n "checking for $ac_word... " >&6; }
26670if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26671  $as_echo_n "(cached) " >&6
26672else
26673  if test -n "$ac_ct_OBJDUMP"; then
26674  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26675else
26676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26677for as_dir in $PATH
26678do
26679  IFS=$as_save_IFS
26680  test -z "$as_dir" && as_dir=.
26681    for ac_exec_ext in '' $ac_executable_extensions; do
26682  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26683    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26685    break 2
26686  fi
26687done
26688  done
26689IFS=$as_save_IFS
26690
26691fi
26692fi
26693ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26694if test -n "$ac_ct_OBJDUMP"; then
26695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26696$as_echo "$ac_ct_OBJDUMP" >&6; }
26697else
26698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26699$as_echo "no" >&6; }
26700fi
26701
26702
26703  test -n "$ac_ct_OBJDUMP" && break
26704done
26705
26706  if test "x$ac_ct_OBJDUMP" = x; then
26707    OBJDUMP=""
26708  else
26709    case $cross_compiling:$ac_tool_warned in
26710yes:)
26711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26713ac_tool_warned=yes ;;
26714esac
26715    OBJDUMP=$ac_ct_OBJDUMP
26716  fi
26717fi
26718
26719if test "x$OBJDUMP" != x; then
26720  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26721
26722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26723
26724  # First separate the path from the arguments. This will split at the first
26725  # space.
26726  complete="$OBJDUMP"
26727  path="${complete%% *}"
26728  tmp="$complete EOL"
26729  arguments="${tmp#* }"
26730
26731  # Input might be given as Windows format, start by converting to
26732  # unix format.
26733  new_path=`$CYGPATH -u "$path"`
26734
26735  # Now try to locate executable using which
26736  new_path=`$WHICH "$new_path" 2> /dev/null`
26737  # bat and cmd files are not always considered executable in cygwin causing which
26738  # to not find them
26739  if test "x$new_path" = x \
26740           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26741           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26742    new_path=`$CYGPATH -u "$path"`
26743  fi
26744  if test "x$new_path" = x; then
26745    # Oops. Which didn't find the executable.
26746    # The splitting of arguments from the executable at a space might have been incorrect,
26747    # since paths with space are more likely in Windows. Give it another try with the whole
26748    # argument.
26749    path="$complete"
26750    arguments="EOL"
26751    new_path=`$CYGPATH -u "$path"`
26752    new_path=`$WHICH "$new_path" 2> /dev/null`
26753    # bat and cmd files are not always considered executable in cygwin causing which
26754    # to not find them
26755    if test "x$new_path" = x \
26756             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26757             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26758      new_path=`$CYGPATH -u "$path"`
26759    fi
26760    if test "x$new_path" = x; then
26761      # It's still not found. Now this is an unrecoverable error.
26762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26763$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26764      has_space=`$ECHO "$complete" | $GREP " "`
26765      if test "x$has_space" != x; then
26766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26768      fi
26769      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26770    fi
26771  fi
26772
26773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26776  # "foo.exe" is OK but "foo" is an error.
26777  #
26778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26779  # It is also a way to make sure we got the proper file name for the real test later on.
26780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26781  if test "x$test_shortpath" = x; then
26782    # Short path failed, file does not exist as specified.
26783    # Try adding .exe or .cmd
26784    if test -f "${new_path}.exe"; then
26785       input_to_shortpath="${new_path}.exe"
26786    elif test -f "${new_path}.cmd"; then
26787       input_to_shortpath="${new_path}.cmd"
26788    else
26789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26790$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26793      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26794    fi
26795  else
26796    input_to_shortpath="$new_path"
26797  fi
26798
26799  # Call helper function which possibly converts this using DOS-style short mode.
26800  # If so, the updated path is stored in $new_path.
26801  new_path="$input_to_shortpath"
26802
26803  input_path="$input_to_shortpath"
26804  # Check if we need to convert this using DOS-style short mode. If the path
26805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26806  # take no chances and rewrite it.
26807  # Note: m4 eats our [], so we need to use [ and ] instead.
26808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26809  if test "x$has_forbidden_chars" != x; then
26810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26814      # Going to short mode and back again did indeed matter. Since short mode is
26815      # case insensitive, let's make it lowercase to improve readability.
26816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26817      # Now convert it back to Unix-stile (cygpath)
26818      input_path=`$CYGPATH -u "$shortmode_path"`
26819      new_path="$input_path"
26820    fi
26821  fi
26822
26823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26824  if test "x$test_cygdrive_prefix" = x; then
26825    # As a simple fix, exclude /usr/bin since it's not a real path.
26826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26828      # a path prefixed by /cygdrive for fixpath to work.
26829      new_path="$CYGWIN_ROOT_PATH$input_path"
26830    fi
26831  fi
26832
26833  # remove trailing .exe if any
26834  new_path="${new_path/%.exe/}"
26835
26836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26837
26838  # First separate the path from the arguments. This will split at the first
26839  # space.
26840  complete="$OBJDUMP"
26841  path="${complete%% *}"
26842  tmp="$complete EOL"
26843  arguments="${tmp#* }"
26844
26845  # Input might be given as Windows format, start by converting to
26846  # unix format.
26847  new_path="$path"
26848
26849  windows_path="$new_path"
26850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26851    unix_path=`$CYGPATH -u "$windows_path"`
26852    new_path="$unix_path"
26853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26855    new_path="$unix_path"
26856  fi
26857
26858
26859  # Now try to locate executable using which
26860  new_path=`$WHICH "$new_path" 2> /dev/null`
26861
26862  if test "x$new_path" = x; then
26863    # Oops. Which didn't find the executable.
26864    # The splitting of arguments from the executable at a space might have been incorrect,
26865    # since paths with space are more likely in Windows. Give it another try with the whole
26866    # argument.
26867    path="$complete"
26868    arguments="EOL"
26869    new_path="$path"
26870
26871  windows_path="$new_path"
26872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26873    unix_path=`$CYGPATH -u "$windows_path"`
26874    new_path="$unix_path"
26875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26877    new_path="$unix_path"
26878  fi
26879
26880
26881    new_path=`$WHICH "$new_path" 2> /dev/null`
26882
26883    if test "x$new_path" = x; then
26884      # It's still not found. Now this is an unrecoverable error.
26885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26886$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26887      has_space=`$ECHO "$complete" | $GREP " "`
26888      if test "x$has_space" != x; then
26889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26891      fi
26892      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26893    fi
26894  fi
26895
26896  # Now new_path has a complete unix path to the binary
26897  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26898    # Keep paths in /bin as-is, but remove trailing .exe if any
26899    new_path="${new_path/%.exe/}"
26900    # Do not save /bin paths to all_fixpath_prefixes!
26901  else
26902    # Not in mixed or Windows style, start by that.
26903    new_path=`cmd //c echo $new_path`
26904
26905  input_path="$new_path"
26906  # Check if we need to convert this using DOS-style short mode. If the path
26907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26908  # take no chances and rewrite it.
26909  # Note: m4 eats our [], so we need to use [ and ] instead.
26910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26911  if test "x$has_forbidden_chars" != x; then
26912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26914  fi
26915
26916    # Output is in $new_path
26917
26918  windows_path="$new_path"
26919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26920    unix_path=`$CYGPATH -u "$windows_path"`
26921    new_path="$unix_path"
26922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26924    new_path="$unix_path"
26925  fi
26926
26927    # remove trailing .exe if any
26928    new_path="${new_path/%.exe/}"
26929
26930    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26931    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26932  fi
26933
26934  else
26935    # We're on a posix platform. Hooray! :)
26936    # First separate the path from the arguments. This will split at the first
26937    # space.
26938    complete="$OBJDUMP"
26939    path="${complete%% *}"
26940    tmp="$complete EOL"
26941    arguments="${tmp#* }"
26942
26943    # Cannot rely on the command "which" here since it doesn't always work.
26944    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26945    if test -z "$is_absolute_path"; then
26946      # Path to executable is not absolute. Find it.
26947      IFS_save="$IFS"
26948      IFS=:
26949      for p in $PATH; do
26950        if test -f "$p/$path" && test -x "$p/$path"; then
26951          new_path="$p/$path"
26952          break
26953        fi
26954      done
26955      IFS="$IFS_save"
26956    else
26957      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26958$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26959      new_path="$path"
26960    fi
26961
26962    if test "x$new_path" = x; then
26963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26964$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26965        has_space=`$ECHO "$complete" | $GREP " "`
26966        if test "x$has_space" != x; then
26967          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26969        fi
26970        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26971      fi
26972  fi
26973
26974      # Now join together the path and the arguments once again
26975      if test "x$arguments" != xEOL; then
26976        new_complete="$new_path ${arguments% *}"
26977      else
26978        new_complete="$new_path"
26979      fi
26980
26981  if test "x$complete" != "x$new_complete"; then
26982      OBJDUMP="$new_complete"
26983      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26984$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26985    fi
26986
26987fi
26988
26989if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26990   # Extract the first word of "lipo", so it can be a program name with args.
26991set dummy lipo; ac_word=$2
26992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26993$as_echo_n "checking for $ac_word... " >&6; }
26994if test "${ac_cv_path_LIPO+set}" = set; then :
26995  $as_echo_n "(cached) " >&6
26996else
26997  case $LIPO in
26998  [\\/]* | ?:[\\/]*)
26999  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27000  ;;
27001  *)
27002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27003for as_dir in $PATH
27004do
27005  IFS=$as_save_IFS
27006  test -z "$as_dir" && as_dir=.
27007    for ac_exec_ext in '' $ac_executable_extensions; do
27008  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27009    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27011    break 2
27012  fi
27013done
27014  done
27015IFS=$as_save_IFS
27016
27017  ;;
27018esac
27019fi
27020LIPO=$ac_cv_path_LIPO
27021if test -n "$LIPO"; then
27022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27023$as_echo "$LIPO" >&6; }
27024else
27025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27026$as_echo "no" >&6; }
27027fi
27028
27029
27030
27031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27032
27033  # First separate the path from the arguments. This will split at the first
27034  # space.
27035  complete="$LIPO"
27036  path="${complete%% *}"
27037  tmp="$complete EOL"
27038  arguments="${tmp#* }"
27039
27040  # Input might be given as Windows format, start by converting to
27041  # unix format.
27042  new_path=`$CYGPATH -u "$path"`
27043
27044  # Now try to locate executable using which
27045  new_path=`$WHICH "$new_path" 2> /dev/null`
27046  # bat and cmd files are not always considered executable in cygwin causing which
27047  # to not find them
27048  if test "x$new_path" = x \
27049           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27050           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27051    new_path=`$CYGPATH -u "$path"`
27052  fi
27053  if test "x$new_path" = x; then
27054    # Oops. Which didn't find the executable.
27055    # The splitting of arguments from the executable at a space might have been incorrect,
27056    # since paths with space are more likely in Windows. Give it another try with the whole
27057    # argument.
27058    path="$complete"
27059    arguments="EOL"
27060    new_path=`$CYGPATH -u "$path"`
27061    new_path=`$WHICH "$new_path" 2> /dev/null`
27062    # bat and cmd files are not always considered executable in cygwin causing which
27063    # to not find them
27064    if test "x$new_path" = x \
27065             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27066             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27067      new_path=`$CYGPATH -u "$path"`
27068    fi
27069    if test "x$new_path" = x; then
27070      # It's still not found. Now this is an unrecoverable error.
27071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27072$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27073      has_space=`$ECHO "$complete" | $GREP " "`
27074      if test "x$has_space" != x; then
27075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27077      fi
27078      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27079    fi
27080  fi
27081
27082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27085  # "foo.exe" is OK but "foo" is an error.
27086  #
27087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27088  # It is also a way to make sure we got the proper file name for the real test later on.
27089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27090  if test "x$test_shortpath" = x; then
27091    # Short path failed, file does not exist as specified.
27092    # Try adding .exe or .cmd
27093    if test -f "${new_path}.exe"; then
27094       input_to_shortpath="${new_path}.exe"
27095    elif test -f "${new_path}.cmd"; then
27096       input_to_shortpath="${new_path}.cmd"
27097    else
27098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27099$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27102      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27103    fi
27104  else
27105    input_to_shortpath="$new_path"
27106  fi
27107
27108  # Call helper function which possibly converts this using DOS-style short mode.
27109  # If so, the updated path is stored in $new_path.
27110  new_path="$input_to_shortpath"
27111
27112  input_path="$input_to_shortpath"
27113  # Check if we need to convert this using DOS-style short mode. If the path
27114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27115  # take no chances and rewrite it.
27116  # Note: m4 eats our [], so we need to use [ and ] instead.
27117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27118  if test "x$has_forbidden_chars" != x; then
27119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27123      # Going to short mode and back again did indeed matter. Since short mode is
27124      # case insensitive, let's make it lowercase to improve readability.
27125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27126      # Now convert it back to Unix-stile (cygpath)
27127      input_path=`$CYGPATH -u "$shortmode_path"`
27128      new_path="$input_path"
27129    fi
27130  fi
27131
27132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27133  if test "x$test_cygdrive_prefix" = x; then
27134    # As a simple fix, exclude /usr/bin since it's not a real path.
27135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27137      # a path prefixed by /cygdrive for fixpath to work.
27138      new_path="$CYGWIN_ROOT_PATH$input_path"
27139    fi
27140  fi
27141
27142  # remove trailing .exe if any
27143  new_path="${new_path/%.exe/}"
27144
27145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27146
27147  # First separate the path from the arguments. This will split at the first
27148  # space.
27149  complete="$LIPO"
27150  path="${complete%% *}"
27151  tmp="$complete EOL"
27152  arguments="${tmp#* }"
27153
27154  # Input might be given as Windows format, start by converting to
27155  # unix format.
27156  new_path="$path"
27157
27158  windows_path="$new_path"
27159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27160    unix_path=`$CYGPATH -u "$windows_path"`
27161    new_path="$unix_path"
27162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27164    new_path="$unix_path"
27165  fi
27166
27167
27168  # Now try to locate executable using which
27169  new_path=`$WHICH "$new_path" 2> /dev/null`
27170
27171  if test "x$new_path" = x; then
27172    # Oops. Which didn't find the executable.
27173    # The splitting of arguments from the executable at a space might have been incorrect,
27174    # since paths with space are more likely in Windows. Give it another try with the whole
27175    # argument.
27176    path="$complete"
27177    arguments="EOL"
27178    new_path="$path"
27179
27180  windows_path="$new_path"
27181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27182    unix_path=`$CYGPATH -u "$windows_path"`
27183    new_path="$unix_path"
27184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27186    new_path="$unix_path"
27187  fi
27188
27189
27190    new_path=`$WHICH "$new_path" 2> /dev/null`
27191
27192    if test "x$new_path" = x; then
27193      # It's still not found. Now this is an unrecoverable error.
27194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27195$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27196      has_space=`$ECHO "$complete" | $GREP " "`
27197      if test "x$has_space" != x; then
27198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27200      fi
27201      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27202    fi
27203  fi
27204
27205  # Now new_path has a complete unix path to the binary
27206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27207    # Keep paths in /bin as-is, but remove trailing .exe if any
27208    new_path="${new_path/%.exe/}"
27209    # Do not save /bin paths to all_fixpath_prefixes!
27210  else
27211    # Not in mixed or Windows style, start by that.
27212    new_path=`cmd //c echo $new_path`
27213
27214  input_path="$new_path"
27215  # Check if we need to convert this using DOS-style short mode. If the path
27216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27217  # take no chances and rewrite it.
27218  # Note: m4 eats our [], so we need to use [ and ] instead.
27219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27220  if test "x$has_forbidden_chars" != x; then
27221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27223  fi
27224
27225    # Output is in $new_path
27226
27227  windows_path="$new_path"
27228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27229    unix_path=`$CYGPATH -u "$windows_path"`
27230    new_path="$unix_path"
27231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27233    new_path="$unix_path"
27234  fi
27235
27236    # remove trailing .exe if any
27237    new_path="${new_path/%.exe/}"
27238
27239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27241  fi
27242
27243  else
27244    # We're on a posix platform. Hooray! :)
27245    # First separate the path from the arguments. This will split at the first
27246    # space.
27247    complete="$LIPO"
27248    path="${complete%% *}"
27249    tmp="$complete EOL"
27250    arguments="${tmp#* }"
27251
27252    # Cannot rely on the command "which" here since it doesn't always work.
27253    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27254    if test -z "$is_absolute_path"; then
27255      # Path to executable is not absolute. Find it.
27256      IFS_save="$IFS"
27257      IFS=:
27258      for p in $PATH; do
27259        if test -f "$p/$path" && test -x "$p/$path"; then
27260          new_path="$p/$path"
27261          break
27262        fi
27263      done
27264      IFS="$IFS_save"
27265    else
27266      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27267$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27268      new_path="$path"
27269    fi
27270
27271    if test "x$new_path" = x; then
27272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27273$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27274        has_space=`$ECHO "$complete" | $GREP " "`
27275        if test "x$has_space" != x; then
27276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27278        fi
27279        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27280      fi
27281  fi
27282
27283      # Now join together the path and the arguments once again
27284      if test "x$arguments" != xEOL; then
27285        new_complete="$new_path ${arguments% *}"
27286      else
27287        new_complete="$new_path"
27288      fi
27289
27290  if test "x$complete" != "x$new_complete"; then
27291      LIPO="$new_complete"
27292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27293$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27294    fi
27295
27296fi
27297
27298# Restore old path without tools dir
27299PATH="$OLD_PATH"
27300
27301
27302# FIXME: Currently we must test this after paths but before flags. Fix!
27303
27304# And we can test some aspects on the target using configure macros.
27305
27306
27307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27308$as_echo_n "checking for ANSI C header files... " >&6; }
27309if test "${ac_cv_header_stdc+set}" = set; then :
27310  $as_echo_n "(cached) " >&6
27311else
27312  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27313/* end confdefs.h.  */
27314#include <stdlib.h>
27315#include <stdarg.h>
27316#include <string.h>
27317#include <float.h>
27318
27319int
27320main ()
27321{
27322
27323  ;
27324  return 0;
27325}
27326_ACEOF
27327if ac_fn_cxx_try_compile "$LINENO"; then :
27328  ac_cv_header_stdc=yes
27329else
27330  ac_cv_header_stdc=no
27331fi
27332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27333
27334if test $ac_cv_header_stdc = yes; then
27335  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27337/* end confdefs.h.  */
27338#include <string.h>
27339
27340_ACEOF
27341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27342  $EGREP "memchr" >/dev/null 2>&1; then :
27343
27344else
27345  ac_cv_header_stdc=no
27346fi
27347rm -f conftest*
27348
27349fi
27350
27351if test $ac_cv_header_stdc = yes; then
27352  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27354/* end confdefs.h.  */
27355#include <stdlib.h>
27356
27357_ACEOF
27358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27359  $EGREP "free" >/dev/null 2>&1; then :
27360
27361else
27362  ac_cv_header_stdc=no
27363fi
27364rm -f conftest*
27365
27366fi
27367
27368if test $ac_cv_header_stdc = yes; then
27369  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27370  if test "$cross_compiling" = yes; then :
27371  :
27372else
27373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27374/* end confdefs.h.  */
27375#include <ctype.h>
27376#include <stdlib.h>
27377#if ((' ' & 0x0FF) == 0x020)
27378# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27379# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27380#else
27381# define ISLOWER(c) \
27382		   (('a' <= (c) && (c) <= 'i') \
27383		     || ('j' <= (c) && (c) <= 'r') \
27384		     || ('s' <= (c) && (c) <= 'z'))
27385# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27386#endif
27387
27388#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27389int
27390main ()
27391{
27392  int i;
27393  for (i = 0; i < 256; i++)
27394    if (XOR (islower (i), ISLOWER (i))
27395	|| toupper (i) != TOUPPER (i))
27396      return 2;
27397  return 0;
27398}
27399_ACEOF
27400if ac_fn_cxx_try_run "$LINENO"; then :
27401
27402else
27403  ac_cv_header_stdc=no
27404fi
27405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27406  conftest.$ac_objext conftest.beam conftest.$ac_ext
27407fi
27408
27409fi
27410fi
27411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27412$as_echo "$ac_cv_header_stdc" >&6; }
27413if test $ac_cv_header_stdc = yes; then
27414
27415$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27416
27417fi
27418
27419# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27420for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27421		  inttypes.h stdint.h unistd.h
27422do :
27423  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27424ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27425"
27426if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27427  cat >>confdefs.h <<_ACEOF
27428#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27429_ACEOF
27430
27431fi
27432
27433done
27434
27435
27436
27437###############################################################################
27438#
27439# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27440# (The JVM can use 32 or 64 bit Java pointers but that decision
27441# is made at runtime.)
27442#
27443if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27444  # Always specify -m flags on Solaris
27445
27446  # keep track of c/cxx flags that we added outselves...
27447  #   to prevent emitting warning...
27448  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27449  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27450  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27451
27452  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27453  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27454  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27455
27456  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27457  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27458  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27459
27460elif test "x$COMPILE_TYPE" = xreduced; then
27461  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27462    # Specify -m if running reduced on other Posix platforms
27463
27464  # keep track of c/cxx flags that we added outselves...
27465  #   to prevent emitting warning...
27466  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27467  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27468  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27469
27470  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27471  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27472  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27473
27474  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27475  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27476  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27477
27478  fi
27479fi
27480
27481# Make compilation sanity check
27482for ac_header in stdio.h
27483do :
27484  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27485if test "x$ac_cv_header_stdio_h" = x""yes; then :
27486  cat >>confdefs.h <<_ACEOF
27487#define HAVE_STDIO_H 1
27488_ACEOF
27489
27490else
27491
27492  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27493$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27494  if test "x$COMPILE_TYPE" = xreduced; then
27495    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27496$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27497  elif test "x$COMPILE_TYPE" = xcross; then
27498    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27499$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27500  fi
27501  as_fn_error $? "Cannot continue." "$LINENO" 5
27502
27503fi
27504
27505done
27506
27507
27508# The cast to long int works around a bug in the HP C Compiler
27509# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27510# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27511# This bug is HP SR number 8606223364.
27512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27513$as_echo_n "checking size of int *... " >&6; }
27514if test "${ac_cv_sizeof_int_p+set}" = set; then :
27515  $as_echo_n "(cached) " >&6
27516else
27517  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27518
27519else
27520  if test "$ac_cv_type_int_p" = yes; then
27521     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27523as_fn_error 77 "cannot compute sizeof (int *)
27524See \`config.log' for more details" "$LINENO" 5 ; }
27525   else
27526     ac_cv_sizeof_int_p=0
27527   fi
27528fi
27529
27530fi
27531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27532$as_echo "$ac_cv_sizeof_int_p" >&6; }
27533
27534
27535
27536cat >>confdefs.h <<_ACEOF
27537#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27538_ACEOF
27539
27540
27541
27542if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27543  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27544  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27545fi
27546
27547if test "x$SIZEOF_INT_P" = x; then
27548    # The test failed, lets stick to the assumed value.
27549    { $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
27550$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27551else
27552    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27553
27554    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27555        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
27556    fi
27557fi
27558
27559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27560$as_echo_n "checking for target address size... " >&6; }
27561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27562$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27563
27564
27565###############################################################################
27566#
27567# Is the target little of big endian?
27568#
27569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27570$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27571if test "${ac_cv_c_bigendian+set}" = set; then :
27572  $as_echo_n "(cached) " >&6
27573else
27574  ac_cv_c_bigendian=unknown
27575    # See if we're dealing with a universal compiler.
27576    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27577/* end confdefs.h.  */
27578#ifndef __APPLE_CC__
27579	       not a universal capable compiler
27580	     #endif
27581	     typedef int dummy;
27582
27583_ACEOF
27584if ac_fn_cxx_try_compile "$LINENO"; then :
27585
27586	# Check for potential -arch flags.  It is not universal unless
27587	# there are at least two -arch flags with different values.
27588	ac_arch=
27589	ac_prev=
27590	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27591	 if test -n "$ac_prev"; then
27592	   case $ac_word in
27593	     i?86 | x86_64 | ppc | ppc64)
27594	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27595		 ac_arch=$ac_word
27596	       else
27597		 ac_cv_c_bigendian=universal
27598		 break
27599	       fi
27600	       ;;
27601	   esac
27602	   ac_prev=
27603	 elif test "x$ac_word" = "x-arch"; then
27604	   ac_prev=arch
27605	 fi
27606       done
27607fi
27608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27609    if test $ac_cv_c_bigendian = unknown; then
27610      # See if sys/param.h defines the BYTE_ORDER macro.
27611      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27612/* end confdefs.h.  */
27613#include <sys/types.h>
27614	     #include <sys/param.h>
27615
27616int
27617main ()
27618{
27619#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27620		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27621		     && LITTLE_ENDIAN)
27622	      bogus endian macros
27623	     #endif
27624
27625  ;
27626  return 0;
27627}
27628_ACEOF
27629if ac_fn_cxx_try_compile "$LINENO"; then :
27630  # It does; now see whether it defined to BIG_ENDIAN or not.
27631	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27632/* end confdefs.h.  */
27633#include <sys/types.h>
27634		#include <sys/param.h>
27635
27636int
27637main ()
27638{
27639#if BYTE_ORDER != BIG_ENDIAN
27640		 not big endian
27641		#endif
27642
27643  ;
27644  return 0;
27645}
27646_ACEOF
27647if ac_fn_cxx_try_compile "$LINENO"; then :
27648  ac_cv_c_bigendian=yes
27649else
27650  ac_cv_c_bigendian=no
27651fi
27652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27653fi
27654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27655    fi
27656    if test $ac_cv_c_bigendian = unknown; then
27657      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27658      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27659/* end confdefs.h.  */
27660#include <limits.h>
27661
27662int
27663main ()
27664{
27665#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27666	      bogus endian macros
27667	     #endif
27668
27669  ;
27670  return 0;
27671}
27672_ACEOF
27673if ac_fn_cxx_try_compile "$LINENO"; then :
27674  # It does; now see whether it defined to _BIG_ENDIAN or not.
27675	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27676/* end confdefs.h.  */
27677#include <limits.h>
27678
27679int
27680main ()
27681{
27682#ifndef _BIG_ENDIAN
27683		 not big endian
27684		#endif
27685
27686  ;
27687  return 0;
27688}
27689_ACEOF
27690if ac_fn_cxx_try_compile "$LINENO"; then :
27691  ac_cv_c_bigendian=yes
27692else
27693  ac_cv_c_bigendian=no
27694fi
27695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27696fi
27697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27698    fi
27699    if test $ac_cv_c_bigendian = unknown; then
27700      # Compile a test program.
27701      if test "$cross_compiling" = yes; then :
27702  # Try to guess by grepping values from an object file.
27703	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27704/* end confdefs.h.  */
27705short int ascii_mm[] =
27706		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27707		short int ascii_ii[] =
27708		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27709		int use_ascii (int i) {
27710		  return ascii_mm[i] + ascii_ii[i];
27711		}
27712		short int ebcdic_ii[] =
27713		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27714		short int ebcdic_mm[] =
27715		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27716		int use_ebcdic (int i) {
27717		  return ebcdic_mm[i] + ebcdic_ii[i];
27718		}
27719		extern int foo;
27720
27721int
27722main ()
27723{
27724return use_ascii (foo) == use_ebcdic (foo);
27725  ;
27726  return 0;
27727}
27728_ACEOF
27729if ac_fn_cxx_try_compile "$LINENO"; then :
27730  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27731	      ac_cv_c_bigendian=yes
27732	    fi
27733	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27734	      if test "$ac_cv_c_bigendian" = unknown; then
27735		ac_cv_c_bigendian=no
27736	      else
27737		# finding both strings is unlikely to happen, but who knows?
27738		ac_cv_c_bigendian=unknown
27739	      fi
27740	    fi
27741fi
27742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27743else
27744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27745/* end confdefs.h.  */
27746$ac_includes_default
27747int
27748main ()
27749{
27750
27751	     /* Are we little or big endian?  From Harbison&Steele.  */
27752	     union
27753	     {
27754	       long int l;
27755	       char c[sizeof (long int)];
27756	     } u;
27757	     u.l = 1;
27758	     return u.c[sizeof (long int) - 1] == 1;
27759
27760  ;
27761  return 0;
27762}
27763_ACEOF
27764if ac_fn_cxx_try_run "$LINENO"; then :
27765  ac_cv_c_bigendian=no
27766else
27767  ac_cv_c_bigendian=yes
27768fi
27769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27770  conftest.$ac_objext conftest.beam conftest.$ac_ext
27771fi
27772
27773    fi
27774fi
27775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27776$as_echo "$ac_cv_c_bigendian" >&6; }
27777 case $ac_cv_c_bigendian in #(
27778   yes)
27779     ENDIAN="big";; #(
27780   no)
27781     ENDIAN="little" ;; #(
27782   universal)
27783     ENDIAN="universal_endianness"
27784     ;; #(
27785   *)
27786     ENDIAN="unknown" ;;
27787 esac
27788
27789
27790if test "x$ENDIAN" = xuniversal_endianness; then
27791    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27792fi
27793if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27794    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
27795fi
27796
27797
27798# Configure flags for the tools
27799
27800
27801###############################################################################
27802#
27803# How to compile shared libraries.
27804#
27805
27806if test "x$GCC" = xyes; then
27807    COMPILER_NAME=gcc
27808    PICFLAG="-fPIC"
27809    LIBRARY_PREFIX=lib
27810    SHARED_LIBRARY='lib$1.so'
27811    STATIC_LIBRARY='lib$1.a'
27812    SHARED_LIBRARY_FLAGS="-shared"
27813    SHARED_LIBRARY_SUFFIX='.so'
27814    STATIC_LIBRARY_SUFFIX='.a'
27815    OBJ_SUFFIX='.o'
27816    EXE_SUFFIX=''
27817    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27818    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27819    C_FLAG_REORDER=''
27820    CXX_FLAG_REORDER=''
27821    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27822    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27823    LD="$CC"
27824    LDEXE="$CC"
27825    LDCXX="$CXX"
27826    LDEXECXX="$CXX"
27827    POST_STRIP_CMD="$STRIP -g"
27828
27829    # Linking is different on MacOSX
27830    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27831        # Might change in the future to clang.
27832        COMPILER_NAME=gcc
27833        SHARED_LIBRARY='lib$1.dylib'
27834        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27835        SHARED_LIBRARY_SUFFIX='.dylib'
27836        EXE_SUFFIX=''
27837        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27838        SET_SHARED_LIBRARY_MAPFILE=''
27839        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27840        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27841        POST_STRIP_CMD="$STRIP -S"
27842    fi
27843else
27844    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27845        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27846        COMPILER_NAME=ossc
27847        PICFLAG="-KPIC"
27848        LIBRARY_PREFIX=lib
27849        SHARED_LIBRARY='lib$1.so'
27850        STATIC_LIBRARY='lib$1.a'
27851        SHARED_LIBRARY_FLAGS="-G"
27852        SHARED_LIBRARY_SUFFIX='.so'
27853        STATIC_LIBRARY_SUFFIX='.a'
27854        OBJ_SUFFIX='.o'
27855        EXE_SUFFIX=''
27856        SET_SHARED_LIBRARY_NAME=''
27857        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27858	C_FLAG_REORDER='-xF'
27859	CXX_FLAG_REORDER='-xF'
27860        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27861        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27862        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27863        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27864        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27865        POST_STRIP_CMD="$STRIP -x"
27866        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27867    fi
27868    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27869        # If it is not gcc, then assume it is the MS Visual Studio compiler
27870        COMPILER_NAME=cl
27871        PICFLAG=""
27872        LIBRARY_PREFIX=
27873        SHARED_LIBRARY='$1.dll'
27874        STATIC_LIBRARY='$1.lib'
27875        SHARED_LIBRARY_FLAGS="-LD"
27876        SHARED_LIBRARY_SUFFIX='.dll'
27877        STATIC_LIBRARY_SUFFIX='.lib'
27878        OBJ_SUFFIX='.obj'
27879        EXE_SUFFIX='.exe'
27880        SET_SHARED_LIBRARY_NAME=''
27881        SET_SHARED_LIBRARY_MAPFILE=''
27882        SET_SHARED_LIBRARY_ORIGIN=''
27883        SET_EXECUTABLE_ORIGIN=''
27884    fi
27885fi
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904# The (cross) compiler is now configured, we can now test capabilities
27905# of the target platform.
27906
27907
27908
27909###############################################################################
27910#
27911# Setup the opt flags for different compilers
27912# and different operating systems.
27913#
27914
27915#
27916# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27917#
27918if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27919    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27920    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27921    CFLAGS="$CFLAGS -mstackrealign"
27922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27923$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27924    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27925/* end confdefs.h.  */
27926int main() { return 0; }
27927_ACEOF
27928if ac_fn_cxx_try_link "$LINENO"; then :
27929
27930		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27931$as_echo "yes" >&6; }
27932
27933else
27934
27935		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27936$as_echo "no" >&6; }
27937	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27938
27939fi
27940rm -f core conftest.err conftest.$ac_objext \
27941    conftest$ac_exeext conftest.$ac_ext
27942fi
27943
27944C_FLAG_DEPS="-MMD -MF"
27945CXX_FLAG_DEPS="-MMD -MF"
27946
27947case $COMPILER_TYPE in
27948  CC )
27949    D_FLAG="-g"
27950    case $COMPILER_NAME in
27951      gcc )
27952      	case $OPENJDK_TARGET_OS in
27953	  macosx )
27954	    # On MacOSX we optimize for size, something
27955	    # we should do for all platforms?
27956	    C_O_FLAG_HI="-Os"
27957	    C_O_FLAG_NORM="-Os"
27958	    C_O_FLAG_NONE=""
27959	    ;;
27960	  *)
27961	    C_O_FLAG_HI="-O3"
27962	    C_O_FLAG_NORM="-O2"
27963	    C_O_FLAG_NONE="-O0"
27964	    CFLAGS_DEBUG_SYMBOLS="-g"
27965	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27966	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27967	       CFLAGS_DEBUG_SYMBOLS="-g1"
27968	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27969	    fi
27970	    ;;
27971	esac
27972        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27973        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27974        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27975        ;;
27976      ossc )
27977        #
27978        # Forte has different names for this with their C++ compiler...
27979        #
27980        C_FLAG_DEPS="-xMMD -xMF"
27981        CXX_FLAG_DEPS="-xMMD -xMF"
27982
27983        # Extra options used with HIGHEST
27984        #
27985        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27986        #          done with care, there are some assumptions below that need to
27987        #          be understood about the use of pointers, and IEEE behavior.
27988        #
27989        # Use non-standard floating point mode (not IEEE 754)
27990        CC_HIGHEST="$CC_HIGHEST -fns"
27991        # Do some simplification of floating point arithmetic (not IEEE 754)
27992        CC_HIGHEST="$CC_HIGHEST -fsimple"
27993        # Use single precision floating point with 'float'
27994        CC_HIGHEST="$CC_HIGHEST -fsingle"
27995        # Assume memory references via basic pointer types do not alias
27996        #   (Source with excessing pointer casting and data access with mixed
27997        #    pointer types are not recommended)
27998        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27999        # Use intrinsic or inline versions for math/std functions
28000        #   (If you expect perfect errno behavior, do not use this)
28001        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28002        # Loop data dependency optimizations (need -xO3 or higher)
28003        CC_HIGHEST="$CC_HIGHEST -xdepend"
28004        # Pointer parameters to functions do not overlap
28005        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28006        #    If you pass in multiple pointers to the same data, do not use this)
28007        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28008        # Inline some library routines
28009        #   (If you expect perfect errno behavior, do not use this)
28010        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28011        # Use optimized math routines
28012        #   (If you expect perfect errno behavior, do not use this)
28013        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28014        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28015
28016        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28017          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28018          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28019        fi
28020
28021        case $OPENJDK_TARGET_CPU_ARCH in
28022          x86)
28023            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28024            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28025            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28026            C_O_FLAG_NONE="-xregs=no%frameptr"
28027            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28028            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28029            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28030            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28031            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28032               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28033               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28034            fi
28035            ;;
28036          sparc)
28037            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28038            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28039            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28040            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28041            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28042            C_O_FLAG_NONE=""
28043            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28044            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28045            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28046            CXX_O_FLAG_NONE=""
28047            ;;
28048        esac
28049
28050    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28051    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28052    esac
28053    ;;
28054  CL )
28055    D_FLAG=
28056    C_O_FLAG_HIGHEST="-O2"
28057    C_O_FLAG_HI="-O1"
28058    C_O_FLAG_NORM="-O1"
28059    C_O_FLAG_NONE="-Od"
28060    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28061    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28062    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28063    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28064    ;;
28065esac
28066
28067if test -z "$C_O_FLAG_HIGHEST"; then
28068   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28069fi
28070
28071if test -z "$CXX_O_FLAG_HIGHEST"; then
28072   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28073fi
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28089   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28090$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28091fi
28092
28093if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28094   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28095$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28096fi
28097
28098if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28099   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28100$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28101fi
28102
28103
28104# Check whether --with-extra-cflags was given.
28105if test "${with_extra_cflags+set}" = set; then :
28106  withval=$with_extra_cflags;
28107fi
28108
28109
28110
28111# Check whether --with-extra-cxxflags was given.
28112if test "${with_extra_cxxflags+set}" = set; then :
28113  withval=$with_extra_cxxflags;
28114fi
28115
28116
28117
28118# Check whether --with-extra-ldflags was given.
28119if test "${with_extra_ldflags+set}" = set; then :
28120  withval=$with_extra_ldflags;
28121fi
28122
28123
28124CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28125CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28126LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28127
28128# Hotspot needs these set in their legacy form
28129LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28130LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28131LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28132
28133
28134
28135
28136
28137###############################################################################
28138#
28139# Now setup the CFLAGS and LDFLAGS for the JDK build.
28140# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28141#
28142case $COMPILER_NAME in
28143      gcc )
28144      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28145                          -pipe \
28146                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28147	  case $OPENJDK_TARGET_CPU_ARCH in
28148	  arm )
28149            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28150	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28151	  ;;
28152	  ppc )
28153            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28154	  ;;
28155	  * )
28156	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28157	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28158          ;;
28159	  esac
28160          ;;
28161      ossc )
28162          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28163          case $OPENJDK_TARGET_CPU_ARCH in
28164          x86 )
28165            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28166       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28167          ;;
28168          esac
28169
28170      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28171      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28172
28173          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28174          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28175          ;;
28176      cl )
28177          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28178               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28179	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28180	       -DWIN32 -DIAL"
28181          case $OPENJDK_TARGET_CPU in
28182              x86 )
28183                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28184                  ;;
28185              x86_64 )
28186                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28187                  ;;
28188          esac
28189          ;;
28190esac
28191
28192###############################################################################
28193
28194CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28195
28196# The package path is used only on macosx?
28197PACKAGE_PATH=/opt/local
28198
28199
28200if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28201    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28202    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28203    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28204    #   Note: -Dmacro         is the same as    #define macro 1
28205    #         -Dmacro=	    is the same as    #define macro
28206    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28207        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28208    else
28209        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28210    fi
28211else
28212    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28213fi
28214if test "x$OPENJDK_TARGET_OS" = xlinux; then
28215    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28216fi
28217if test "x$OPENJDK_TARGET_OS" = xwindows; then
28218    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28219fi
28220if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28221    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28222fi
28223if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28224    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28225fi
28226if test "x$OPENJDK_TARGET_OS" = xbsd; then
28227    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28228fi
28229if test "x$DEBUG_LEVEL" = xrelease; then
28230    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28231    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28232        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28233    fi
28234else
28235    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28236fi
28237
28238CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28239CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28240
28241CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28242        -I${JDK_OUTPUTDIR}/include \
28243        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28244        -I${JDK_TOPDIR}/src/share/javavm/export \
28245        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28246        -I${JDK_TOPDIR}/src/share/native/common \
28247        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28248
28249# The shared libraries are compiled using the picflag.
28250CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28251CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28252
28253# Executable flags
28254CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28255CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28256
28257# Now this is odd. The JDK native libraries have to link against libjvm.so
28258# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28259# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28260# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28261# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28262# libraries will link to whatever is in memory. Yuck.
28263#
28264# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28265if test "x$COMPILER_NAME" = xcl; then
28266    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28267    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28268        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28269    fi
28270    # TODO: make -debug optional "--disable-full-debug-symbols"
28271    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28272    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28273    LDFLAGS_JDKLIB_SUFFIX=""
28274    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28275        LDFLAGS_STACK_SIZE=1048576
28276    else
28277        LDFLAGS_STACK_SIZE=327680
28278    fi
28279    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28280else
28281    if test "x$COMPILER_NAME" = xgcc; then
28282        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28283        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28284        if test -n "$HAS_GNU_HASH"; then
28285            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28286        fi
28287        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28288          # And since we now know that the linker is gnu, then add -z defs, to forbid
28289          # undefined symbols in object files.
28290          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28291          if test "x$DEBUG_LEVEL" = "xrelease"; then
28292              # When building release libraries, tell the linker optimize them.
28293              # Should this be supplied to the OSS linker as well?
28294              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28295          fi
28296        fi
28297    fi
28298    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28299                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28300
28301    # On some platforms (mac) the linker warns about non existing -L dirs.
28302    # Add server first if available. Linking aginst client does not always produce the same results.
28303    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28304    # Default to server for other variants.
28305    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28306        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28307    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28308        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28309    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28310        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28311    else
28312        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28313    fi
28314
28315    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28316    if test "x$COMPILER_NAME" = xossc; then
28317        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28318    fi
28319
28320    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28321    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28322        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28323    fi
28324fi
28325
28326# Adjust flags according to debug level.
28327case $DEBUG_LEVEL in
28328      fastdebug )
28329              CFLAGS="$CFLAGS $D_FLAG"
28330              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28331              ;;
28332      slowdebug )
28333              CFLAGS="$CFLAGS $D_FLAG"
28334	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28335	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28336	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28337	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28338              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28339              ;;
28340esac
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356# Setup debug symbols (need objcopy from the toolchain for that)
28357
28358#
28359# ENABLE_DEBUG_SYMBOLS
28360# This must be done after the toolchain is setup, since we're looking at objcopy.
28361#
28362# Check whether --enable-debug-symbols was given.
28363if test "${enable_debug_symbols+set}" = set; then :
28364  enableval=$enable_debug_symbols;
28365fi
28366
28367
28368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28369$as_echo_n "checking if we should generate debug symbols... " >&6; }
28370
28371if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28372   # explicit enabling of enable-debug-symbols and can't find objcopy
28373   #   this is an error
28374   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28375fi
28376
28377if test "x$enable_debug_symbols" = "xyes"; then
28378  ENABLE_DEBUG_SYMBOLS=true
28379elif test "x$enable_debug_symbols" = "xno"; then
28380  ENABLE_DEBUG_SYMBOLS=false
28381else
28382  # default on macosx is false
28383  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28384    ENABLE_DEBUG_SYMBOLS=false
28385  # Default is on if objcopy is found, otherwise off
28386  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28387    ENABLE_DEBUG_SYMBOLS=true
28388  else
28389    ENABLE_DEBUG_SYMBOLS=false
28390  fi
28391fi
28392
28393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28394$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28395
28396#
28397# ZIP_DEBUGINFO_FILES
28398#
28399# Check whether --enable-zip-debug-info was given.
28400if test "${enable_zip_debug_info+set}" = set; then :
28401  enableval=$enable_zip_debug_info;
28402fi
28403
28404
28405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28406$as_echo_n "checking if we should zip debug-info files... " >&6; }
28407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28408$as_echo "${enable_zip_debug_info}" >&6; }
28409
28410if test "x${enable_zip_debug_info}" = "xno"; then
28411   ZIP_DEBUGINFO_FILES=false
28412else
28413   ZIP_DEBUGINFO_FILES=true
28414fi
28415
28416
28417
28418
28419
28420
28421
28422###############################################################################
28423#
28424# Check dependencies for external and internal libraries.
28425#
28426###############################################################################
28427
28428
28429
28430###############################################################################
28431#
28432# OS specific settings that we never will need to probe.
28433#
28434if test "x$OPENJDK_TARGET_OS" = xlinux; then
28435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28436$as_echo_n "checking what is not needed on Linux?... " >&6; }
28437    PULSE_NOT_NEEDED=yes
28438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28439$as_echo "pulse" >&6; }
28440fi
28441
28442if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28444$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28445    ALSA_NOT_NEEDED=yes
28446    PULSE_NOT_NEEDED=yes
28447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28448$as_echo "alsa pulse" >&6; }
28449fi
28450
28451if test "x$OPENJDK_TARGET_OS" = xwindows; then
28452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28453$as_echo_n "checking what is not needed on Windows?... " >&6; }
28454    CUPS_NOT_NEEDED=yes
28455    ALSA_NOT_NEEDED=yes
28456    PULSE_NOT_NEEDED=yes
28457    X11_NOT_NEEDED=yes
28458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28459$as_echo "alsa cups pulse x11" >&6; }
28460fi
28461
28462if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28464$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28465    ALSA_NOT_NEEDED=yes
28466    PULSE_NOT_NEEDED=yes
28467    X11_NOT_NEEDED=yes
28468    FREETYPE2_NOT_NEEDED=yes
28469    # If the java runtime framework is disabled, then we need X11.
28470    # This will be adjusted below.
28471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28472$as_echo "alsa pulse x11" >&6; }
28473fi
28474
28475if test "x$OPENJDK_TARGET_OS" = xbsd; then
28476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28477$as_echo_n "checking what is not needed on bsd?... " >&6; }
28478    ALSA_NOT_NEEDED=yes
28479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28480$as_echo "alsa" >&6; }
28481fi
28482
28483if test "x$OPENJDK" = "xfalse"; then
28484    FREETYPE2_NOT_NEEDED=yes
28485fi
28486
28487if test "x$SUPPORT_HEADFUL" = xno; then
28488    X11_NOT_NEEDED=yes
28489fi
28490
28491###############################################################################
28492#
28493# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28494# that uses this API.
28495#
28496# Check whether --enable-macosx-runtime-support was given.
28497if test "${enable_macosx_runtime_support+set}" = set; then :
28498  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28499else
28500  MACOSX_RUNTIME_SUPPORT="no"
28501fi
28502
28503
28504USE_MACOSX_RUNTIME_SUPPORT=no
28505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28506$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28507if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28508    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28509        MACOSX_RUNTIME_SUPPORT=yes
28510        USE_MACOSX_RUNTIME_SUPPORT=yes
28511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28512$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28513    else
28514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28515$as_echo "yes, but explicitly disabled." >&6; }
28516    fi
28517else
28518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28519$as_echo "no" >&6; }
28520fi
28521
28522if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28524$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28525    X11_NOT_NEEDED=
28526    FREETYPE2_NOT_NEEDED=
28527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28528$as_echo "alsa pulse" >&6; }
28529fi
28530
28531
28532
28533
28534###############################################################################
28535#
28536# Check for X Windows
28537#
28538
28539# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28540# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28541# --x-libraries for the sysroot, if that seems to be correct.
28542if test "x$SYS_ROOT" != "x/"; then
28543  if test "x$x_includes" = xNONE; then
28544    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28545      x_includes="$SYS_ROOT/usr/X11R6/include"
28546    fi
28547  fi
28548  if test "x$x_libraries" = xNONE; then
28549    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28550      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28551    fi
28552  fi
28553fi
28554
28555# Now let autoconf do it's magic
28556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28557$as_echo_n "checking for X... " >&6; }
28558
28559
28560# Check whether --with-x was given.
28561if test "${with_x+set}" = set; then :
28562  withval=$with_x;
28563fi
28564
28565# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28566if test "x$with_x" = xno; then
28567  # The user explicitly disabled X.
28568  have_x=disabled
28569else
28570  case $x_includes,$x_libraries in #(
28571    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28572    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28573  $as_echo_n "(cached) " >&6
28574else
28575  # One or both of the vars are not set, and there is no cached value.
28576ac_x_includes=no ac_x_libraries=no
28577rm -f -r conftest.dir
28578if mkdir conftest.dir; then
28579  cd conftest.dir
28580  cat >Imakefile <<'_ACEOF'
28581incroot:
28582	@echo incroot='${INCROOT}'
28583usrlibdir:
28584	@echo usrlibdir='${USRLIBDIR}'
28585libdir:
28586	@echo libdir='${LIBDIR}'
28587_ACEOF
28588  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28589    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28590    for ac_var in incroot usrlibdir libdir; do
28591      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28592    done
28593    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28594    for ac_extension in a so sl dylib la dll; do
28595      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28596	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28597	ac_im_usrlibdir=$ac_im_libdir; break
28598      fi
28599    done
28600    # Screen out bogus values from the imake configuration.  They are
28601    # bogus both because they are the default anyway, and because
28602    # using them would break gcc on systems where it needs fixed includes.
28603    case $ac_im_incroot in
28604	/usr/include) ac_x_includes= ;;
28605	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28606    esac
28607    case $ac_im_usrlibdir in
28608	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28609	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28610    esac
28611  fi
28612  cd ..
28613  rm -f -r conftest.dir
28614fi
28615
28616# Standard set of common directories for X headers.
28617# Check X11 before X11Rn because it is often a symlink to the current release.
28618ac_x_header_dirs='
28619/usr/X11/include
28620/usr/X11R7/include
28621/usr/X11R6/include
28622/usr/X11R5/include
28623/usr/X11R4/include
28624
28625/usr/include/X11
28626/usr/include/X11R7
28627/usr/include/X11R6
28628/usr/include/X11R5
28629/usr/include/X11R4
28630
28631/usr/local/X11/include
28632/usr/local/X11R7/include
28633/usr/local/X11R6/include
28634/usr/local/X11R5/include
28635/usr/local/X11R4/include
28636
28637/usr/local/include/X11
28638/usr/local/include/X11R7
28639/usr/local/include/X11R6
28640/usr/local/include/X11R5
28641/usr/local/include/X11R4
28642
28643/usr/X386/include
28644/usr/x386/include
28645/usr/XFree86/include/X11
28646
28647/usr/include
28648/usr/local/include
28649/usr/unsupported/include
28650/usr/athena/include
28651/usr/local/x11r5/include
28652/usr/lpp/Xamples/include
28653
28654/usr/openwin/include
28655/usr/openwin/share/include'
28656
28657if test "$ac_x_includes" = no; then
28658  # Guess where to find include files, by looking for Xlib.h.
28659  # First, try using that file with no special directory specified.
28660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28661/* end confdefs.h.  */
28662#include <X11/Xlib.h>
28663_ACEOF
28664if ac_fn_cxx_try_cpp "$LINENO"; then :
28665  # We can compile using X headers with no special include directory.
28666ac_x_includes=
28667else
28668  for ac_dir in $ac_x_header_dirs; do
28669  if test -r "$ac_dir/X11/Xlib.h"; then
28670    ac_x_includes=$ac_dir
28671    break
28672  fi
28673done
28674fi
28675rm -f conftest.err conftest.i conftest.$ac_ext
28676fi # $ac_x_includes = no
28677
28678if test "$ac_x_libraries" = no; then
28679  # Check for the libraries.
28680  # See if we find them without any special options.
28681  # Don't add to $LIBS permanently.
28682  ac_save_LIBS=$LIBS
28683  LIBS="-lX11 $LIBS"
28684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28685/* end confdefs.h.  */
28686#include <X11/Xlib.h>
28687int
28688main ()
28689{
28690XrmInitialize ()
28691  ;
28692  return 0;
28693}
28694_ACEOF
28695if ac_fn_cxx_try_link "$LINENO"; then :
28696  LIBS=$ac_save_LIBS
28697# We can link X programs with no special library path.
28698ac_x_libraries=
28699else
28700  LIBS=$ac_save_LIBS
28701for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28702do
28703  # Don't even attempt the hair of trying to link an X program!
28704  for ac_extension in a so sl dylib la dll; do
28705    if test -r "$ac_dir/libX11.$ac_extension"; then
28706      ac_x_libraries=$ac_dir
28707      break 2
28708    fi
28709  done
28710done
28711fi
28712rm -f core conftest.err conftest.$ac_objext \
28713    conftest$ac_exeext conftest.$ac_ext
28714fi # $ac_x_libraries = no
28715
28716case $ac_x_includes,$ac_x_libraries in #(
28717  no,* | *,no | *\'*)
28718    # Didn't find X, or a directory has "'" in its name.
28719    ac_cv_have_x="have_x=no";; #(
28720  *)
28721    # Record where we found X for the cache.
28722    ac_cv_have_x="have_x=yes\
28723	ac_x_includes='$ac_x_includes'\
28724	ac_x_libraries='$ac_x_libraries'"
28725esac
28726fi
28727;; #(
28728    *) have_x=yes;;
28729  esac
28730  eval "$ac_cv_have_x"
28731fi # $with_x != no
28732
28733if test "$have_x" != yes; then
28734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28735$as_echo "$have_x" >&6; }
28736  no_x=yes
28737else
28738  # If each of the values was on the command line, it overrides each guess.
28739  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28740  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28741  # Update the cache value to reflect the command line values.
28742  ac_cv_have_x="have_x=yes\
28743	ac_x_includes='$x_includes'\
28744	ac_x_libraries='$x_libraries'"
28745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28746$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28747fi
28748
28749if test "$no_x" = yes; then
28750  # Not all programs may use this symbol, but it does not hurt to define it.
28751
28752$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28753
28754  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28755else
28756  if test -n "$x_includes"; then
28757    X_CFLAGS="$X_CFLAGS -I$x_includes"
28758  fi
28759
28760  # It would also be nice to do this for all -L options, not just this one.
28761  if test -n "$x_libraries"; then
28762    X_LIBS="$X_LIBS -L$x_libraries"
28763    # For Solaris; some versions of Sun CC require a space after -R and
28764    # others require no space.  Words are not sufficient . . . .
28765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28766$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28767    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28768    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28769    ac_cxx_werror_flag=yes
28770    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28771/* end confdefs.h.  */
28772
28773int
28774main ()
28775{
28776
28777  ;
28778  return 0;
28779}
28780_ACEOF
28781if ac_fn_cxx_try_link "$LINENO"; then :
28782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28783$as_echo "no" >&6; }
28784       X_LIBS="$X_LIBS -R$x_libraries"
28785else
28786  LIBS="$ac_xsave_LIBS -R $x_libraries"
28787       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28788/* end confdefs.h.  */
28789
28790int
28791main ()
28792{
28793
28794  ;
28795  return 0;
28796}
28797_ACEOF
28798if ac_fn_cxx_try_link "$LINENO"; then :
28799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28800$as_echo "yes" >&6; }
28801	  X_LIBS="$X_LIBS -R $x_libraries"
28802else
28803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28804$as_echo "neither works" >&6; }
28805fi
28806rm -f core conftest.err conftest.$ac_objext \
28807    conftest$ac_exeext conftest.$ac_ext
28808fi
28809rm -f core conftest.err conftest.$ac_objext \
28810    conftest$ac_exeext conftest.$ac_ext
28811    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28812    LIBS=$ac_xsave_LIBS
28813  fi
28814
28815  # Check for system-dependent libraries X programs must link with.
28816  # Do this before checking for the system-independent R6 libraries
28817  # (-lICE), since we may need -lsocket or whatever for X linking.
28818
28819  if test "$ISC" = yes; then
28820    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28821  else
28822    # Martyn Johnson says this is needed for Ultrix, if the X
28823    # libraries were built with DECnet support.  And Karl Berry says
28824    # the Alpha needs dnet_stub (dnet does not exist).
28825    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28826    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28827/* end confdefs.h.  */
28828
28829/* Override any GCC internal prototype to avoid an error.
28830   Use char because int might match the return type of a GCC
28831   builtin and then its argument prototype would still apply.  */
28832#ifdef __cplusplus
28833extern "C"
28834#endif
28835char XOpenDisplay ();
28836int
28837main ()
28838{
28839return XOpenDisplay ();
28840  ;
28841  return 0;
28842}
28843_ACEOF
28844if ac_fn_cxx_try_link "$LINENO"; then :
28845
28846else
28847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28848$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28849if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28850  $as_echo_n "(cached) " >&6
28851else
28852  ac_check_lib_save_LIBS=$LIBS
28853LIBS="-ldnet  $LIBS"
28854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28855/* end confdefs.h.  */
28856
28857/* Override any GCC internal prototype to avoid an error.
28858   Use char because int might match the return type of a GCC
28859   builtin and then its argument prototype would still apply.  */
28860#ifdef __cplusplus
28861extern "C"
28862#endif
28863char dnet_ntoa ();
28864int
28865main ()
28866{
28867return dnet_ntoa ();
28868  ;
28869  return 0;
28870}
28871_ACEOF
28872if ac_fn_cxx_try_link "$LINENO"; then :
28873  ac_cv_lib_dnet_dnet_ntoa=yes
28874else
28875  ac_cv_lib_dnet_dnet_ntoa=no
28876fi
28877rm -f core conftest.err conftest.$ac_objext \
28878    conftest$ac_exeext conftest.$ac_ext
28879LIBS=$ac_check_lib_save_LIBS
28880fi
28881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28882$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28883if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28884  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28885fi
28886
28887    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28888      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28889$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28890if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28891  $as_echo_n "(cached) " >&6
28892else
28893  ac_check_lib_save_LIBS=$LIBS
28894LIBS="-ldnet_stub  $LIBS"
28895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28896/* end confdefs.h.  */
28897
28898/* Override any GCC internal prototype to avoid an error.
28899   Use char because int might match the return type of a GCC
28900   builtin and then its argument prototype would still apply.  */
28901#ifdef __cplusplus
28902extern "C"
28903#endif
28904char dnet_ntoa ();
28905int
28906main ()
28907{
28908return dnet_ntoa ();
28909  ;
28910  return 0;
28911}
28912_ACEOF
28913if ac_fn_cxx_try_link "$LINENO"; then :
28914  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28915else
28916  ac_cv_lib_dnet_stub_dnet_ntoa=no
28917fi
28918rm -f core conftest.err conftest.$ac_objext \
28919    conftest$ac_exeext conftest.$ac_ext
28920LIBS=$ac_check_lib_save_LIBS
28921fi
28922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28923$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28924if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28925  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28926fi
28927
28928    fi
28929fi
28930rm -f core conftest.err conftest.$ac_objext \
28931    conftest$ac_exeext conftest.$ac_ext
28932    LIBS="$ac_xsave_LIBS"
28933
28934    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28935    # to get the SysV transport functions.
28936    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28937    # needs -lnsl.
28938    # The nsl library prevents programs from opening the X display
28939    # on Irix 5.2, according to T.E. Dickey.
28940    # The functions gethostbyname, getservbyname, and inet_addr are
28941    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28942    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28943if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28944
28945fi
28946
28947    if test $ac_cv_func_gethostbyname = no; then
28948      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28949$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28950if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28951  $as_echo_n "(cached) " >&6
28952else
28953  ac_check_lib_save_LIBS=$LIBS
28954LIBS="-lnsl  $LIBS"
28955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28956/* end confdefs.h.  */
28957
28958/* Override any GCC internal prototype to avoid an error.
28959   Use char because int might match the return type of a GCC
28960   builtin and then its argument prototype would still apply.  */
28961#ifdef __cplusplus
28962extern "C"
28963#endif
28964char gethostbyname ();
28965int
28966main ()
28967{
28968return gethostbyname ();
28969  ;
28970  return 0;
28971}
28972_ACEOF
28973if ac_fn_cxx_try_link "$LINENO"; then :
28974  ac_cv_lib_nsl_gethostbyname=yes
28975else
28976  ac_cv_lib_nsl_gethostbyname=no
28977fi
28978rm -f core conftest.err conftest.$ac_objext \
28979    conftest$ac_exeext conftest.$ac_ext
28980LIBS=$ac_check_lib_save_LIBS
28981fi
28982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28983$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28984if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28985  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28986fi
28987
28988      if test $ac_cv_lib_nsl_gethostbyname = no; then
28989	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28990$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28991if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28992  $as_echo_n "(cached) " >&6
28993else
28994  ac_check_lib_save_LIBS=$LIBS
28995LIBS="-lbsd  $LIBS"
28996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28997/* end confdefs.h.  */
28998
28999/* Override any GCC internal prototype to avoid an error.
29000   Use char because int might match the return type of a GCC
29001   builtin and then its argument prototype would still apply.  */
29002#ifdef __cplusplus
29003extern "C"
29004#endif
29005char gethostbyname ();
29006int
29007main ()
29008{
29009return gethostbyname ();
29010  ;
29011  return 0;
29012}
29013_ACEOF
29014if ac_fn_cxx_try_link "$LINENO"; then :
29015  ac_cv_lib_bsd_gethostbyname=yes
29016else
29017  ac_cv_lib_bsd_gethostbyname=no
29018fi
29019rm -f core conftest.err conftest.$ac_objext \
29020    conftest$ac_exeext conftest.$ac_ext
29021LIBS=$ac_check_lib_save_LIBS
29022fi
29023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29024$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29025if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29026  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29027fi
29028
29029      fi
29030    fi
29031
29032    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29033    # socket/setsockopt and other routines are undefined under SCO ODT
29034    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29035    # on later versions), says Simon Leinen: it contains gethostby*
29036    # variants that don't use the name server (or something).  -lsocket
29037    # must be given before -lnsl if both are needed.  We assume that
29038    # if connect needs -lnsl, so does gethostbyname.
29039    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29040if test "x$ac_cv_func_connect" = x""yes; then :
29041
29042fi
29043
29044    if test $ac_cv_func_connect = no; then
29045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29046$as_echo_n "checking for connect in -lsocket... " >&6; }
29047if test "${ac_cv_lib_socket_connect+set}" = set; then :
29048  $as_echo_n "(cached) " >&6
29049else
29050  ac_check_lib_save_LIBS=$LIBS
29051LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29053/* end confdefs.h.  */
29054
29055/* Override any GCC internal prototype to avoid an error.
29056   Use char because int might match the return type of a GCC
29057   builtin and then its argument prototype would still apply.  */
29058#ifdef __cplusplus
29059extern "C"
29060#endif
29061char connect ();
29062int
29063main ()
29064{
29065return connect ();
29066  ;
29067  return 0;
29068}
29069_ACEOF
29070if ac_fn_cxx_try_link "$LINENO"; then :
29071  ac_cv_lib_socket_connect=yes
29072else
29073  ac_cv_lib_socket_connect=no
29074fi
29075rm -f core conftest.err conftest.$ac_objext \
29076    conftest$ac_exeext conftest.$ac_ext
29077LIBS=$ac_check_lib_save_LIBS
29078fi
29079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29080$as_echo "$ac_cv_lib_socket_connect" >&6; }
29081if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29082  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29083fi
29084
29085    fi
29086
29087    # Guillermo Gomez says -lposix is necessary on A/UX.
29088    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29089if test "x$ac_cv_func_remove" = x""yes; then :
29090
29091fi
29092
29093    if test $ac_cv_func_remove = no; then
29094      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29095$as_echo_n "checking for remove in -lposix... " >&6; }
29096if test "${ac_cv_lib_posix_remove+set}" = set; then :
29097  $as_echo_n "(cached) " >&6
29098else
29099  ac_check_lib_save_LIBS=$LIBS
29100LIBS="-lposix  $LIBS"
29101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29102/* end confdefs.h.  */
29103
29104/* Override any GCC internal prototype to avoid an error.
29105   Use char because int might match the return type of a GCC
29106   builtin and then its argument prototype would still apply.  */
29107#ifdef __cplusplus
29108extern "C"
29109#endif
29110char remove ();
29111int
29112main ()
29113{
29114return remove ();
29115  ;
29116  return 0;
29117}
29118_ACEOF
29119if ac_fn_cxx_try_link "$LINENO"; then :
29120  ac_cv_lib_posix_remove=yes
29121else
29122  ac_cv_lib_posix_remove=no
29123fi
29124rm -f core conftest.err conftest.$ac_objext \
29125    conftest$ac_exeext conftest.$ac_ext
29126LIBS=$ac_check_lib_save_LIBS
29127fi
29128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29129$as_echo "$ac_cv_lib_posix_remove" >&6; }
29130if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29131  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29132fi
29133
29134    fi
29135
29136    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29137    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29138if test "x$ac_cv_func_shmat" = x""yes; then :
29139
29140fi
29141
29142    if test $ac_cv_func_shmat = no; then
29143      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29144$as_echo_n "checking for shmat in -lipc... " >&6; }
29145if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29146  $as_echo_n "(cached) " >&6
29147else
29148  ac_check_lib_save_LIBS=$LIBS
29149LIBS="-lipc  $LIBS"
29150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29151/* end confdefs.h.  */
29152
29153/* Override any GCC internal prototype to avoid an error.
29154   Use char because int might match the return type of a GCC
29155   builtin and then its argument prototype would still apply.  */
29156#ifdef __cplusplus
29157extern "C"
29158#endif
29159char shmat ();
29160int
29161main ()
29162{
29163return shmat ();
29164  ;
29165  return 0;
29166}
29167_ACEOF
29168if ac_fn_cxx_try_link "$LINENO"; then :
29169  ac_cv_lib_ipc_shmat=yes
29170else
29171  ac_cv_lib_ipc_shmat=no
29172fi
29173rm -f core conftest.err conftest.$ac_objext \
29174    conftest$ac_exeext conftest.$ac_ext
29175LIBS=$ac_check_lib_save_LIBS
29176fi
29177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29178$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29179if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29180  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29181fi
29182
29183    fi
29184  fi
29185
29186  # Check for libraries that X11R6 Xt/Xaw programs need.
29187  ac_save_LDFLAGS=$LDFLAGS
29188  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29189  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29190  # check for ICE first), but we must link in the order -lSM -lICE or
29191  # we get undefined symbols.  So assume we have SM if we have ICE.
29192  # These have to be linked with before -lX11, unlike the other
29193  # libraries we check for below, so use a different variable.
29194  # John Interrante, Karl Berry
29195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29196$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29197if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29198  $as_echo_n "(cached) " >&6
29199else
29200  ac_check_lib_save_LIBS=$LIBS
29201LIBS="-lICE $X_EXTRA_LIBS $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 IceConnectionNumber ();
29212int
29213main ()
29214{
29215return IceConnectionNumber ();
29216  ;
29217  return 0;
29218}
29219_ACEOF
29220if ac_fn_cxx_try_link "$LINENO"; then :
29221  ac_cv_lib_ICE_IceConnectionNumber=yes
29222else
29223  ac_cv_lib_ICE_IceConnectionNumber=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_ICE_IceConnectionNumber" >&5
29230$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29231if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29232  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29233fi
29234
29235  LDFLAGS=$ac_save_LDFLAGS
29236
29237fi
29238
29239
29240if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29241
29242    # Print a helpful message on how to acquire the necessary build dependency.
29243    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29244    MISSING_DEPENDENCY=x11
29245    PKGHANDLER_COMMAND=
29246
29247    case $PKGHANDLER in
29248	apt-get)
29249                apt_help     $MISSING_DEPENDENCY ;;
29250    yum)
29251                yum_help     $MISSING_DEPENDENCY ;;
29252	port)
29253                port_help    $MISSING_DEPENDENCY ;;
29254	pkgutil)
29255                pkgutil_help $MISSING_DEPENDENCY ;;
29256	pkgadd)
29257                pkgadd_help  $MISSING_DEPENDENCY ;;
29258    * )
29259      break ;;
29260    esac
29261
29262    if test "x$PKGHANDLER_COMMAND" != x; then
29263        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29264    fi
29265
29266    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29267fi
29268
29269# Some of the old makefiles require a setting of OPENWIN_HOME
29270# Since the X11R6 directory has disappeared on later Linuxes,
29271# we need to probe for it.
29272if test "x$OPENJDK_TARGET_OS" = xlinux; then
29273    if test -d "$SYS_ROOT/usr/X11R6"; then
29274        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29275    fi
29276    if test -d "$SYS_ROOT/usr/include/X11"; then
29277        OPENWIN_HOME="$SYS_ROOT/usr"
29278    fi
29279fi
29280if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29281    OPENWIN_HOME="/usr/openwin"
29282fi
29283
29284
29285
29286#
29287# Weird Sol10 something check...TODO change to try compile
29288#
29289if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29290  if test "`uname -r`" = "5.10"; then
29291     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29292     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29293     fi
29294  fi
29295fi
29296
29297ac_ext=c
29298ac_cpp='$CPP $CPPFLAGS'
29299ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29300ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29301ac_compiler_gnu=$ac_cv_c_compiler_gnu
29302
29303OLD_CFLAGS="$CFLAGS"
29304CFLAGS="$CFLAGS $X_CFLAGS"
29305
29306# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29307for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29308do :
29309  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29310ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29311                   # include <X11/Xutil.h>
29312
29313"
29314if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29315  cat >>confdefs.h <<_ACEOF
29316#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29317_ACEOF
29318 X11_A_OK=yes
29319else
29320  X11_A_OK=no
29321fi
29322
29323done
29324
29325
29326CFLAGS="$OLD_CFLAGS"
29327ac_ext=cpp
29328ac_cpp='$CXXCPP $CPPFLAGS'
29329ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29330ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29331ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29332
29333
29334if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29335
29336    # Print a helpful message on how to acquire the necessary build dependency.
29337    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29338    MISSING_DEPENDENCY=x11
29339    PKGHANDLER_COMMAND=
29340
29341    case $PKGHANDLER in
29342	apt-get)
29343                apt_help     $MISSING_DEPENDENCY ;;
29344    yum)
29345                yum_help     $MISSING_DEPENDENCY ;;
29346	port)
29347                port_help    $MISSING_DEPENDENCY ;;
29348	pkgutil)
29349                pkgutil_help $MISSING_DEPENDENCY ;;
29350	pkgadd)
29351                pkgadd_help  $MISSING_DEPENDENCY ;;
29352    * )
29353      break ;;
29354    esac
29355
29356    if test "x$PKGHANDLER_COMMAND" != x; then
29357        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29358    fi
29359
29360    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29361fi
29362
29363
29364
29365
29366
29367
29368###############################################################################
29369#
29370# The common unix printing system cups is used to print from java.
29371#
29372
29373# Check whether --with-cups was given.
29374if test "${with_cups+set}" = set; then :
29375  withval=$with_cups;
29376fi
29377
29378
29379# Check whether --with-cups-include was given.
29380if test "${with_cups_include+set}" = set; then :
29381  withval=$with_cups_include;
29382fi
29383
29384
29385if test "x$CUPS_NOT_NEEDED" = xyes; then
29386	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29387		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29388$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29389	fi
29390	CUPS_CFLAGS=
29391else
29392	CUPS_FOUND=no
29393
29394	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29395	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29396	fi
29397
29398	if test "x${with_cups}" != x; then
29399	    CUPS_CFLAGS="-I${with_cups}/include"
29400	    CUPS_FOUND=yes
29401	fi
29402	if test "x${with_cups_include}" != x; then
29403	    CUPS_CFLAGS="-I${with_cups_include}"
29404	    CUPS_FOUND=yes
29405	fi
29406	if test "x$CUPS_FOUND" = xno; then
29407
29408
29409    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29410        # Source the builddeps file again, to make sure it uses the latest variables!
29411        . $builddepsfile
29412        # Look for a target and build machine specific resource!
29413        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29414        if test "x$resource" = x; then
29415            # Ok, lets instead look for a target specific resource
29416            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29417        fi
29418        if test "x$resource" = x; then
29419            # Ok, lets instead look for a build specific resource
29420            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29421        fi
29422        if test "x$resource" = x; then
29423            # Ok, lets instead look for a generic resource
29424            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29425            resource=${builddep_cups}
29426        fi
29427        if test "x$resource" != x; then
29428            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29429$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29430	    # If the resource in the builddeps.conf file is an existing directory,
29431	    # for example /java/linux/cups
29432	    if test -d ${resource}; then
29433	       depdir=${resource}
29434	    else
29435
29436# cups is for example mymodule
29437# $resource is for example libs/general/libmymod_1_2_3.zip
29438# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29439# $with_builddeps_dir is for example /localhome/builddeps
29440# depdir is the name of the variable into which we store the depdir, eg MYMOD
29441# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29442# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29443    filename=`basename $resource`
29444    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29445    filebase=${filename%%.*}
29446    extension=${filename#*.}
29447    installdir=$with_builddeps_dir/$filebase
29448    if test ! -f $installdir/$filename.unpacked; then
29449        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29450$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29451        if test ! -d $installdir; then
29452            mkdir -p $installdir
29453        fi
29454        if test ! -d $installdir; then
29455            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29456        fi
29457        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29458        touch $tmpfile
29459        if test ! -f $tmpfile; then
29460            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29461        fi
29462
29463    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29464    # $tmpfile is the local file name for the downloaded file.
29465    VALID_TOOL=no
29466    if test "x$BDEPS_FTP" = xwget; then
29467       VALID_TOOL=yes
29468       wget -O $tmpfile $with_builddeps_server/$resource
29469    fi
29470    if test "x$BDEPS_FTP" = xlftp; then
29471       VALID_TOOL=yes
29472       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29473    fi
29474    if test "x$BDEPS_FTP" = xftp; then
29475        VALID_TOOL=yes
29476        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29477        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29478        FTPUSERPWD=${FTPSERVER%%@*}
29479        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29480            FTPUSER=${userpwd%%:*}
29481            FTPPWD=${userpwd#*@}
29482            FTPSERVER=${FTPSERVER#*@}
29483        else
29484            FTPUSER=ftp
29485            FTPPWD=ftp
29486        fi
29487        # the "pass" command does not work on some
29488        # ftp clients (read ftp.exe) but if it works,
29489        # passive mode is better!
29490        (\
29491            echo "user $FTPUSER $FTPPWD"        ;\
29492            echo "pass"                         ;\
29493            echo "bin"                          ;\
29494            echo "get $FTPPATH $tmpfile"              ;\
29495        ) | ftp -in $FTPSERVER
29496    fi
29497    if test "x$VALID_TOOL" != xyes; then
29498       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29499    fi
29500
29501        mv $tmpfile $installdir/$filename
29502        if test ! -s $installdir/$filename; then
29503            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29504        fi
29505        case "$extension" in
29506            zip)  echo "Unzipping $installdir/$filename..."
29507               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29508            ;;
29509            tar.gz) echo "Untaring $installdir/$filename..."
29510               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29511            ;;
29512            tgz) echo "Untaring $installdir/$filename..."
29513               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29514            ;;
29515            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29516            ;;
29517        esac
29518    fi
29519    if test -f $installdir/$filename.unpacked; then
29520        depdir=$installdir
29521    fi
29522
29523	    fi
29524            # Source the builddeps file again, because in the previous command, the depdir
29525            # was updated to point at the current build dependency install directory.
29526            . $builddepsfile
29527            # Now extract variables from the builddeps.conf files.
29528            theroot=${builddep_cups_ROOT}
29529            thecflags=${builddep_cups_CFLAGS}
29530            thelibs=${builddep_cups_LIBS}
29531            if test "x$depdir" = x; then
29532                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29533            fi
29534            CUPS=$depdir
29535            if test "x$theroot" != x; then
29536               CUPS="$theroot"
29537            fi
29538            if test "x$thecflags" != x; then
29539               CUPS_CFLAGS="$thecflags"
29540            fi
29541            if test "x$thelibs" != x; then
29542               CUPS_LIBS="$thelibs"
29543            fi
29544            CUPS_FOUND=yes
29545
29546        fi
29547
29548    fi
29549
29550	fi
29551	if test "x$CUPS_FOUND" = xno; then
29552	    # Are the cups headers installed in the default /usr/include location?
29553	    for ac_header in cups/cups.h cups/ppd.h
29554do :
29555  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29556ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29557if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29558  cat >>confdefs.h <<_ACEOF
29559#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29560_ACEOF
29561 CUPS_FOUND=yes
29562	                      CUPS_CFLAGS=
29563	                      DEFAULT_CUPS=yes
29564fi
29565
29566done
29567
29568	fi
29569	if test "x$CUPS_FOUND" = xno; then
29570	    # Getting nervous now? Lets poke around for standard Solaris third-party
29571	    # package installation locations.
29572	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29573$as_echo_n "checking for cups headers... " >&6; }
29574	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29575	       # An SFW package seems to be installed!
29576	       CUPS_FOUND=yes
29577	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29578	    elif test -s /opt/csw/include/cups/cups.h; then
29579	       # A CSW package seems to be installed!
29580	       CUPS_FOUND=yes
29581	       CUPS_CFLAGS="-I/opt/csw/include"
29582	    fi
29583	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29584$as_echo "$CUPS_FOUND" >&6; }
29585	fi
29586	if test "x$CUPS_FOUND" = xno; then
29587
29588    # Print a helpful message on how to acquire the necessary build dependency.
29589    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29590    MISSING_DEPENDENCY=cups
29591    PKGHANDLER_COMMAND=
29592
29593    case $PKGHANDLER in
29594	apt-get)
29595                apt_help     $MISSING_DEPENDENCY ;;
29596    yum)
29597                yum_help     $MISSING_DEPENDENCY ;;
29598	port)
29599                port_help    $MISSING_DEPENDENCY ;;
29600	pkgutil)
29601                pkgutil_help $MISSING_DEPENDENCY ;;
29602	pkgadd)
29603                pkgadd_help  $MISSING_DEPENDENCY ;;
29604    * )
29605      break ;;
29606    esac
29607
29608    if test "x$PKGHANDLER_COMMAND" != x; then
29609        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29610    fi
29611
29612	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29613	fi
29614fi
29615
29616
29617
29618
29619
29620
29621###############################################################################
29622#
29623# The ubiquitous freetype2 library is used to render fonts.
29624#
29625
29626# Check whether --with-freetype was given.
29627if test "${with_freetype+set}" = set; then :
29628  withval=$with_freetype;
29629fi
29630
29631
29632# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29633USING_SYSTEM_FT_LIB=false
29634
29635if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29636	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29637		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29638$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29639	fi
29640	FREETYPE2_CFLAGS=
29641	FREETYPE2_LIBS=
29642        FREETYPE2_LIB_PATH=
29643else
29644	FREETYPE2_FOUND=no
29645
29646	if test "x$with_freetype" != x; then
29647
29648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29649
29650  # Input might be given as Windows format, start by converting to
29651  # unix format.
29652  path="$with_freetype"
29653  new_path=`$CYGPATH -u "$path"`
29654
29655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29658  # "foo.exe" is OK but "foo" is an error.
29659  #
29660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29661  # It is also a way to make sure we got the proper file name for the real test later on.
29662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29663  if test "x$test_shortpath" = x; then
29664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29665$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29666    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29667  fi
29668
29669  # Call helper function which possibly converts this using DOS-style short mode.
29670  # If so, the updated path is stored in $new_path.
29671
29672  input_path="$new_path"
29673  # Check if we need to convert this using DOS-style short mode. If the path
29674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29675  # take no chances and rewrite it.
29676  # Note: m4 eats our [], so we need to use [ and ] instead.
29677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29678  if test "x$has_forbidden_chars" != x; then
29679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29683      # Going to short mode and back again did indeed matter. Since short mode is
29684      # case insensitive, let's make it lowercase to improve readability.
29685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29686      # Now convert it back to Unix-stile (cygpath)
29687      input_path=`$CYGPATH -u "$shortmode_path"`
29688      new_path="$input_path"
29689    fi
29690  fi
29691
29692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29693  if test "x$test_cygdrive_prefix" = x; then
29694    # As a simple fix, exclude /usr/bin since it's not a real path.
29695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29697      # a path prefixed by /cygdrive for fixpath to work.
29698      new_path="$CYGWIN_ROOT_PATH$input_path"
29699    fi
29700  fi
29701
29702
29703  if test "x$path" != "x$new_path"; then
29704    with_freetype="$new_path"
29705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29706$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29707  fi
29708
29709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29710
29711  path="$with_freetype"
29712  has_colon=`$ECHO $path | $GREP ^.:`
29713  new_path="$path"
29714  if test "x$has_colon" = x; then
29715    # Not in mixed or Windows style, start by that.
29716    new_path=`cmd //c echo $path`
29717  fi
29718
29719
29720  input_path="$new_path"
29721  # Check if we need to convert this using DOS-style short mode. If the path
29722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29723  # take no chances and rewrite it.
29724  # Note: m4 eats our [], so we need to use [ and ] instead.
29725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29726  if test "x$has_forbidden_chars" != x; then
29727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29729  fi
29730
29731
29732  windows_path="$new_path"
29733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29734    unix_path=`$CYGPATH -u "$windows_path"`
29735    new_path="$unix_path"
29736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29738    new_path="$unix_path"
29739  fi
29740
29741  if test "x$path" != "x$new_path"; then
29742    with_freetype="$new_path"
29743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29744$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29745  fi
29746
29747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29749
29750  else
29751    # We're on a posix platform. Hooray! :)
29752    path="$with_freetype"
29753
29754    if test ! -f "$path" && test ! -d "$path"; then
29755      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29756    fi
29757
29758    has_space=`$ECHO "$path" | $GREP " "`
29759    if test "x$has_space" != x; then
29760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29761$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29762      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29763    fi
29764  fi
29765
29766	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29767            FREETYPE2_LIB_PATH="$with_freetype/lib"
29768            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29769                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29770                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29771            fi
29772            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29773                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29774            fi
29775	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29776            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29777                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29778            fi
29779 	    FREETYPE2_FOUND=yes
29780   	    if test "x$FREETYPE2_FOUND" = xyes; then
29781	        # Verify that the directories exist
29782                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29783		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29784		fi
29785	        # List the contents of the lib.
29786		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29787                if test "x$FREETYPELIB" = x; then
29788		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29789		fi
29790	        # Check one h-file
29791                if ! test -s "$with_freetype/include/ft2build.h"; then
29792		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29793		fi
29794            fi
29795        fi
29796	if test "x$FREETYPE2_FOUND" = xno; then
29797
29798
29799    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29800        # Source the builddeps file again, to make sure it uses the latest variables!
29801        . $builddepsfile
29802        # Look for a target and build machine specific resource!
29803        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29804        if test "x$resource" = x; then
29805            # Ok, lets instead look for a target specific resource
29806            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29807        fi
29808        if test "x$resource" = x; then
29809            # Ok, lets instead look for a build specific resource
29810            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29811        fi
29812        if test "x$resource" = x; then
29813            # Ok, lets instead look for a generic resource
29814            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29815            resource=${builddep_freetype2}
29816        fi
29817        if test "x$resource" != x; then
29818            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29819$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29820	    # If the resource in the builddeps.conf file is an existing directory,
29821	    # for example /java/linux/cups
29822	    if test -d ${resource}; then
29823	       depdir=${resource}
29824	    else
29825
29826# freetype2 is for example mymodule
29827# $resource is for example libs/general/libmymod_1_2_3.zip
29828# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29829# $with_builddeps_dir is for example /localhome/builddeps
29830# depdir is the name of the variable into which we store the depdir, eg MYMOD
29831# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29832# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29833    filename=`basename $resource`
29834    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29835    filebase=${filename%%.*}
29836    extension=${filename#*.}
29837    installdir=$with_builddeps_dir/$filebase
29838    if test ! -f $installdir/$filename.unpacked; then
29839        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29840$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29841        if test ! -d $installdir; then
29842            mkdir -p $installdir
29843        fi
29844        if test ! -d $installdir; then
29845            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29846        fi
29847        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29848        touch $tmpfile
29849        if test ! -f $tmpfile; then
29850            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29851        fi
29852
29853    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29854    # $tmpfile is the local file name for the downloaded file.
29855    VALID_TOOL=no
29856    if test "x$BDEPS_FTP" = xwget; then
29857       VALID_TOOL=yes
29858       wget -O $tmpfile $with_builddeps_server/$resource
29859    fi
29860    if test "x$BDEPS_FTP" = xlftp; then
29861       VALID_TOOL=yes
29862       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29863    fi
29864    if test "x$BDEPS_FTP" = xftp; then
29865        VALID_TOOL=yes
29866        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29867        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29868        FTPUSERPWD=${FTPSERVER%%@*}
29869        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29870            FTPUSER=${userpwd%%:*}
29871            FTPPWD=${userpwd#*@}
29872            FTPSERVER=${FTPSERVER#*@}
29873        else
29874            FTPUSER=ftp
29875            FTPPWD=ftp
29876        fi
29877        # the "pass" command does not work on some
29878        # ftp clients (read ftp.exe) but if it works,
29879        # passive mode is better!
29880        (\
29881            echo "user $FTPUSER $FTPPWD"        ;\
29882            echo "pass"                         ;\
29883            echo "bin"                          ;\
29884            echo "get $FTPPATH $tmpfile"              ;\
29885        ) | ftp -in $FTPSERVER
29886    fi
29887    if test "x$VALID_TOOL" != xyes; then
29888       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29889    fi
29890
29891        mv $tmpfile $installdir/$filename
29892        if test ! -s $installdir/$filename; then
29893            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29894        fi
29895        case "$extension" in
29896            zip)  echo "Unzipping $installdir/$filename..."
29897               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29898            ;;
29899            tar.gz) echo "Untaring $installdir/$filename..."
29900               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29901            ;;
29902            tgz) echo "Untaring $installdir/$filename..."
29903               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29904            ;;
29905            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29906            ;;
29907        esac
29908    fi
29909    if test -f $installdir/$filename.unpacked; then
29910        depdir=$installdir
29911    fi
29912
29913	    fi
29914            # Source the builddeps file again, because in the previous command, the depdir
29915            # was updated to point at the current build dependency install directory.
29916            . $builddepsfile
29917            # Now extract variables from the builddeps.conf files.
29918            theroot=${builddep_freetype2_ROOT}
29919            thecflags=${builddep_freetype2_CFLAGS}
29920            thelibs=${builddep_freetype2_LIBS}
29921            if test "x$depdir" = x; then
29922                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29923            fi
29924            FREETYPE2=$depdir
29925            if test "x$theroot" != x; then
29926               FREETYPE2="$theroot"
29927            fi
29928            if test "x$thecflags" != x; then
29929               FREETYPE2_CFLAGS="$thecflags"
29930            fi
29931            if test "x$thelibs" != x; then
29932               FREETYPE2_LIBS="$thelibs"
29933            fi
29934            FREETYPE2_FOUND=yes
29935            else FREETYPE2_FOUND=no
29936
29937        fi
29938        else FREETYPE2_FOUND=no
29939
29940    fi
29941
29942            USING_SYSTEM_FT_LIB=true
29943	fi
29944	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29945            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29946
29947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29948
29949  # Input might be given as Windows format, start by converting to
29950  # unix format.
29951  path="$FREETYPELOCATION"
29952  new_path=`$CYGPATH -u "$path"`
29953
29954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29957  # "foo.exe" is OK but "foo" is an error.
29958  #
29959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29960  # It is also a way to make sure we got the proper file name for the real test later on.
29961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29962  if test "x$test_shortpath" = x; then
29963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29964$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29965    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29966  fi
29967
29968  # Call helper function which possibly converts this using DOS-style short mode.
29969  # If so, the updated path is stored in $new_path.
29970
29971  input_path="$new_path"
29972  # Check if we need to convert this using DOS-style short mode. If the path
29973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29974  # take no chances and rewrite it.
29975  # Note: m4 eats our [], so we need to use [ and ] instead.
29976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29977  if test "x$has_forbidden_chars" != x; then
29978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29982      # Going to short mode and back again did indeed matter. Since short mode is
29983      # case insensitive, let's make it lowercase to improve readability.
29984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29985      # Now convert it back to Unix-stile (cygpath)
29986      input_path=`$CYGPATH -u "$shortmode_path"`
29987      new_path="$input_path"
29988    fi
29989  fi
29990
29991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29992  if test "x$test_cygdrive_prefix" = x; then
29993    # As a simple fix, exclude /usr/bin since it's not a real path.
29994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29996      # a path prefixed by /cygdrive for fixpath to work.
29997      new_path="$CYGWIN_ROOT_PATH$input_path"
29998    fi
29999  fi
30000
30001
30002  if test "x$path" != "x$new_path"; then
30003    FREETYPELOCATION="$new_path"
30004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30005$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30006  fi
30007
30008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30009
30010  path="$FREETYPELOCATION"
30011  has_colon=`$ECHO $path | $GREP ^.:`
30012  new_path="$path"
30013  if test "x$has_colon" = x; then
30014    # Not in mixed or Windows style, start by that.
30015    new_path=`cmd //c echo $path`
30016  fi
30017
30018
30019  input_path="$new_path"
30020  # Check if we need to convert this using DOS-style short mode. If the path
30021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30022  # take no chances and rewrite it.
30023  # Note: m4 eats our [], so we need to use [ and ] instead.
30024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30025  if test "x$has_forbidden_chars" != x; then
30026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30028  fi
30029
30030
30031  windows_path="$new_path"
30032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30033    unix_path=`$CYGPATH -u "$windows_path"`
30034    new_path="$unix_path"
30035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30037    new_path="$unix_path"
30038  fi
30039
30040  if test "x$path" != "x$new_path"; then
30041    FREETYPELOCATION="$new_path"
30042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30043$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30044  fi
30045
30046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30048
30049  else
30050    # We're on a posix platform. Hooray! :)
30051    path="$FREETYPELOCATION"
30052
30053    if test ! -f "$path" && test ! -d "$path"; then
30054      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30055    fi
30056
30057    has_space=`$ECHO "$path" | $GREP " "`
30058    if test "x$has_space" != x; then
30059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30060$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30061      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30062    fi
30063  fi
30064
30065	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30066$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30067	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30068	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30069	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30070 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30071                if ! test -s "$FREETYPE2_LIBS"; then
30072		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30073		fi
30074                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30075		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30076		fi
30077                USING_SYSTEM_FT_LIB=true
30078                FREETYPE2_FOUND=yes
30079	    fi
30080	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30081$as_echo "$FREETYPE2_FOUND" >&6; }
30082        fi
30083	if test "x$FREETYPE2_FOUND" = xno; then
30084
30085pkg_failed=no
30086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30087$as_echo_n "checking for FREETYPE2... " >&6; }
30088
30089if test -n "$FREETYPE2_CFLAGS"; then
30090    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30091 elif test -n "$PKG_CONFIG"; then
30092    if test -n "$PKG_CONFIG" && \
30093    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30094  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30095  ac_status=$?
30096  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30097  test $ac_status = 0; }; then
30098  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30099else
30100  pkg_failed=yes
30101fi
30102 else
30103    pkg_failed=untried
30104fi
30105if test -n "$FREETYPE2_LIBS"; then
30106    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30107 elif test -n "$PKG_CONFIG"; then
30108    if test -n "$PKG_CONFIG" && \
30109    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30110  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30111  ac_status=$?
30112  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30113  test $ac_status = 0; }; then
30114  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30115else
30116  pkg_failed=yes
30117fi
30118 else
30119    pkg_failed=untried
30120fi
30121
30122
30123
30124if test $pkg_failed = yes; then
30125
30126if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30127        _pkg_short_errors_supported=yes
30128else
30129        _pkg_short_errors_supported=no
30130fi
30131        if test $_pkg_short_errors_supported = yes; then
30132	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30133        else
30134	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30135        fi
30136	# Put the nasty error message in config.log where it belongs
30137	echo "$FREETYPE2_PKG_ERRORS" >&5
30138
30139	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30140$as_echo "no" >&6; }
30141                FREETYPE2_FOUND=no
30142elif test $pkg_failed = untried; then
30143	FREETYPE2_FOUND=no
30144else
30145	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30146	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30148$as_echo "yes" >&6; }
30149	FREETYPE2_FOUND=yes
30150fi
30151            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30152            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30153            USING_SYSTEM_FT_LIB=true
30154            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30155            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30156              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30157            fi
30158	fi
30159	if test "x$FREETYPE2_FOUND" = xno; then
30160	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30161$as_echo_n "checking for freetype in some standard locations... " >&6; }
30162
30163	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30164	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30165	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30166	    fi
30167	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30168	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30169	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30170	    fi
30171
30172	    PREV_CXXCFLAGS="$CXXFLAGS"
30173	    PREV_LDFLAGS="$LDFLAGS"
30174	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30175	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30176	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30177/* end confdefs.h.  */
30178#include<ft2build.h>
30179	                    #include FT_FREETYPE_H
30180	                   int main() { return 0; }
30181
30182_ACEOF
30183if ac_fn_cxx_try_link "$LINENO"; then :
30184
30185	                      # Yes, the default cflags and libs did the trick.
30186	                      FREETYPE2_FOUND=yes
30187	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30188	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30189
30190else
30191
30192	                      FREETYPE2_FOUND=no
30193
30194fi
30195rm -f core conftest.err conftest.$ac_objext \
30196    conftest$ac_exeext conftest.$ac_ext
30197            CXXCFLAGS="$PREV_CXXFLAGS"
30198	    LDFLAGS="$PREV_LDFLAGS"
30199	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30200$as_echo "$FREETYPE2_FOUND" >&6; }
30201            USING_SYSTEM_FT_LIB=true
30202	fi
30203	if test "x$FREETYPE2_FOUND" = xno; then
30204
30205    # Print a helpful message on how to acquire the necessary build dependency.
30206    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30207    MISSING_DEPENDENCY=freetype2
30208    PKGHANDLER_COMMAND=
30209
30210    case $PKGHANDLER in
30211	apt-get)
30212                apt_help     $MISSING_DEPENDENCY ;;
30213    yum)
30214                yum_help     $MISSING_DEPENDENCY ;;
30215	port)
30216                port_help    $MISSING_DEPENDENCY ;;
30217	pkgutil)
30218                pkgutil_help $MISSING_DEPENDENCY ;;
30219	pkgadd)
30220                pkgadd_help  $MISSING_DEPENDENCY ;;
30221    * )
30222      break ;;
30223    esac
30224
30225    if test "x$PKGHANDLER_COMMAND" != x; then
30226        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30227    fi
30228
30229		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30230	fi
30231
30232        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30233            # AC_CHECK_LIB does not support use of cl.exe
30234            PREV_LDFLAGS="$LDFLAGS"
30235            LDFLAGS="$FREETYPE2_LIBS"
30236            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30237$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30238if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30239  $as_echo_n "(cached) " >&6
30240else
30241  ac_check_lib_save_LIBS=$LIBS
30242LIBS="-lfreetype  $LIBS"
30243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30244/* end confdefs.h.  */
30245
30246/* Override any GCC internal prototype to avoid an error.
30247   Use char because int might match the return type of a GCC
30248   builtin and then its argument prototype would still apply.  */
30249#ifdef __cplusplus
30250extern "C"
30251#endif
30252char FT_Init_FreeType ();
30253int
30254main ()
30255{
30256return FT_Init_FreeType ();
30257  ;
30258  return 0;
30259}
30260_ACEOF
30261if ac_fn_cxx_try_link "$LINENO"; then :
30262  ac_cv_lib_freetype_FT_Init_FreeType=yes
30263else
30264  ac_cv_lib_freetype_FT_Init_FreeType=no
30265fi
30266rm -f core conftest.err conftest.$ac_objext \
30267    conftest$ac_exeext conftest.$ac_ext
30268LIBS=$ac_check_lib_save_LIBS
30269fi
30270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30271$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30272if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30273  FREETYPE2_FOUND=true
30274else
30275  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30276fi
30277
30278            LDFLAGS="$PREV_LDFLAGS"
30279        fi
30280fi
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290###############################################################################
30291#
30292# Check for alsa headers and libraries. Used on Linux/GNU systems.
30293#
30294
30295# Check whether --with-alsa was given.
30296if test "${with_alsa+set}" = set; then :
30297  withval=$with_alsa;
30298fi
30299
30300
30301# Check whether --with-alsa-include was given.
30302if test "${with_alsa_include+set}" = set; then :
30303  withval=$with_alsa_include;
30304fi
30305
30306
30307# Check whether --with-alsa-lib was given.
30308if test "${with_alsa_lib+set}" = set; then :
30309  withval=$with_alsa_lib;
30310fi
30311
30312
30313if test "x$ALSA_NOT_NEEDED" = xyes; then
30314	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30315		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30316$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30317	fi
30318	ALSA_CFLAGS=
30319	ALSA_LIBS=
30320else
30321	ALSA_FOUND=no
30322
30323	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30324	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30325	fi
30326
30327	if test "x${with_alsa}" != x; then
30328	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30329	    ALSA_CFLAGS="-I${with_alsa}/include"
30330	    ALSA_FOUND=yes
30331	fi
30332	if test "x${with_alsa_include}" != x; then
30333	    ALSA_CFLAGS="-I${with_alsa_include}"
30334	    ALSA_FOUND=yes
30335	fi
30336	if test "x${with_alsa_lib}" != x; then
30337	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30338	    ALSA_FOUND=yes
30339	fi
30340	if test "x$ALSA_FOUND" = xno; then
30341
30342
30343    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30344        # Source the builddeps file again, to make sure it uses the latest variables!
30345        . $builddepsfile
30346        # Look for a target and build machine specific resource!
30347        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30348        if test "x$resource" = x; then
30349            # Ok, lets instead look for a target specific resource
30350            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30351        fi
30352        if test "x$resource" = x; then
30353            # Ok, lets instead look for a build specific resource
30354            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30355        fi
30356        if test "x$resource" = x; then
30357            # Ok, lets instead look for a generic resource
30358            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30359            resource=${builddep_alsa}
30360        fi
30361        if test "x$resource" != x; then
30362            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30363$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30364	    # If the resource in the builddeps.conf file is an existing directory,
30365	    # for example /java/linux/cups
30366	    if test -d ${resource}; then
30367	       depdir=${resource}
30368	    else
30369
30370# alsa is for example mymodule
30371# $resource is for example libs/general/libmymod_1_2_3.zip
30372# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30373# $with_builddeps_dir is for example /localhome/builddeps
30374# depdir is the name of the variable into which we store the depdir, eg MYMOD
30375# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30376# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30377    filename=`basename $resource`
30378    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30379    filebase=${filename%%.*}
30380    extension=${filename#*.}
30381    installdir=$with_builddeps_dir/$filebase
30382    if test ! -f $installdir/$filename.unpacked; then
30383        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30384$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30385        if test ! -d $installdir; then
30386            mkdir -p $installdir
30387        fi
30388        if test ! -d $installdir; then
30389            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30390        fi
30391        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30392        touch $tmpfile
30393        if test ! -f $tmpfile; then
30394            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30395        fi
30396
30397    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30398    # $tmpfile is the local file name for the downloaded file.
30399    VALID_TOOL=no
30400    if test "x$BDEPS_FTP" = xwget; then
30401       VALID_TOOL=yes
30402       wget -O $tmpfile $with_builddeps_server/$resource
30403    fi
30404    if test "x$BDEPS_FTP" = xlftp; then
30405       VALID_TOOL=yes
30406       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30407    fi
30408    if test "x$BDEPS_FTP" = xftp; then
30409        VALID_TOOL=yes
30410        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30411        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30412        FTPUSERPWD=${FTPSERVER%%@*}
30413        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30414            FTPUSER=${userpwd%%:*}
30415            FTPPWD=${userpwd#*@}
30416            FTPSERVER=${FTPSERVER#*@}
30417        else
30418            FTPUSER=ftp
30419            FTPPWD=ftp
30420        fi
30421        # the "pass" command does not work on some
30422        # ftp clients (read ftp.exe) but if it works,
30423        # passive mode is better!
30424        (\
30425            echo "user $FTPUSER $FTPPWD"        ;\
30426            echo "pass"                         ;\
30427            echo "bin"                          ;\
30428            echo "get $FTPPATH $tmpfile"              ;\
30429        ) | ftp -in $FTPSERVER
30430    fi
30431    if test "x$VALID_TOOL" != xyes; then
30432       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30433    fi
30434
30435        mv $tmpfile $installdir/$filename
30436        if test ! -s $installdir/$filename; then
30437            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30438        fi
30439        case "$extension" in
30440            zip)  echo "Unzipping $installdir/$filename..."
30441               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30442            ;;
30443            tar.gz) echo "Untaring $installdir/$filename..."
30444               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30445            ;;
30446            tgz) echo "Untaring $installdir/$filename..."
30447               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30448            ;;
30449            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30450            ;;
30451        esac
30452    fi
30453    if test -f $installdir/$filename.unpacked; then
30454        depdir=$installdir
30455    fi
30456
30457	    fi
30458            # Source the builddeps file again, because in the previous command, the depdir
30459            # was updated to point at the current build dependency install directory.
30460            . $builddepsfile
30461            # Now extract variables from the builddeps.conf files.
30462            theroot=${builddep_alsa_ROOT}
30463            thecflags=${builddep_alsa_CFLAGS}
30464            thelibs=${builddep_alsa_LIBS}
30465            if test "x$depdir" = x; then
30466                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30467            fi
30468            ALSA=$depdir
30469            if test "x$theroot" != x; then
30470               ALSA="$theroot"
30471            fi
30472            if test "x$thecflags" != x; then
30473               ALSA_CFLAGS="$thecflags"
30474            fi
30475            if test "x$thelibs" != x; then
30476               ALSA_LIBS="$thelibs"
30477            fi
30478            ALSA_FOUND=yes
30479            else ALSA_FOUND=no
30480
30481        fi
30482        else ALSA_FOUND=no
30483
30484    fi
30485
30486	fi
30487	if test "x$ALSA_FOUND" = xno; then
30488
30489pkg_failed=no
30490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30491$as_echo_n "checking for ALSA... " >&6; }
30492
30493if test -n "$ALSA_CFLAGS"; then
30494    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30495 elif test -n "$PKG_CONFIG"; then
30496    if test -n "$PKG_CONFIG" && \
30497    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30498  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30499  ac_status=$?
30500  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30501  test $ac_status = 0; }; then
30502  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30503else
30504  pkg_failed=yes
30505fi
30506 else
30507    pkg_failed=untried
30508fi
30509if test -n "$ALSA_LIBS"; then
30510    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30511 elif test -n "$PKG_CONFIG"; then
30512    if test -n "$PKG_CONFIG" && \
30513    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30514  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30515  ac_status=$?
30516  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30517  test $ac_status = 0; }; then
30518  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30519else
30520  pkg_failed=yes
30521fi
30522 else
30523    pkg_failed=untried
30524fi
30525
30526
30527
30528if test $pkg_failed = yes; then
30529
30530if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30531        _pkg_short_errors_supported=yes
30532else
30533        _pkg_short_errors_supported=no
30534fi
30535        if test $_pkg_short_errors_supported = yes; then
30536	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30537        else
30538	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30539        fi
30540	# Put the nasty error message in config.log where it belongs
30541	echo "$ALSA_PKG_ERRORS" >&5
30542
30543	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30544$as_echo "no" >&6; }
30545                ALSA_FOUND=no
30546elif test $pkg_failed = untried; then
30547	ALSA_FOUND=no
30548else
30549	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30550	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30552$as_echo "yes" >&6; }
30553	ALSA_FOUND=yes
30554fi
30555	fi
30556	if test "x$ALSA_FOUND" = xno; then
30557	    for ac_header in alsa/asoundlib.h
30558do :
30559  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30560if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30561  cat >>confdefs.h <<_ACEOF
30562#define HAVE_ALSA_ASOUNDLIB_H 1
30563_ACEOF
30564 ALSA_FOUND=yes
30565	                      ALSA_CFLAGS=-Iignoreme
30566	                      ALSA_LIBS=-lasound
30567	                      DEFAULT_ALSA=yes
30568else
30569  ALSA_FOUND=no
30570fi
30571
30572done
30573
30574	fi
30575	if test "x$ALSA_FOUND" = xno; then
30576
30577    # Print a helpful message on how to acquire the necessary build dependency.
30578    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30579    MISSING_DEPENDENCY=alsa
30580    PKGHANDLER_COMMAND=
30581
30582    case $PKGHANDLER in
30583	apt-get)
30584                apt_help     $MISSING_DEPENDENCY ;;
30585    yum)
30586                yum_help     $MISSING_DEPENDENCY ;;
30587	port)
30588                port_help    $MISSING_DEPENDENCY ;;
30589	pkgutil)
30590                pkgutil_help $MISSING_DEPENDENCY ;;
30591	pkgadd)
30592                pkgadd_help  $MISSING_DEPENDENCY ;;
30593    * )
30594      break ;;
30595    esac
30596
30597    if test "x$PKGHANDLER_COMMAND" != x; then
30598        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30599    fi
30600
30601	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30602	fi
30603fi
30604
30605
30606
30607
30608
30609
30610
30611###############################################################################
30612#
30613# Check for the jpeg library
30614#
30615
30616USE_EXTERNAL_LIBJPEG=true
30617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30618$as_echo_n "checking for main in -ljpeg... " >&6; }
30619if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30620  $as_echo_n "(cached) " >&6
30621else
30622  ac_check_lib_save_LIBS=$LIBS
30623LIBS="-ljpeg  $LIBS"
30624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30625/* end confdefs.h.  */
30626
30627
30628int
30629main ()
30630{
30631return main ();
30632  ;
30633  return 0;
30634}
30635_ACEOF
30636if ac_fn_cxx_try_link "$LINENO"; then :
30637  ac_cv_lib_jpeg_main=yes
30638else
30639  ac_cv_lib_jpeg_main=no
30640fi
30641rm -f core conftest.err conftest.$ac_objext \
30642    conftest$ac_exeext conftest.$ac_ext
30643LIBS=$ac_check_lib_save_LIBS
30644fi
30645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30646$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30647if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30648  cat >>confdefs.h <<_ACEOF
30649#define HAVE_LIBJPEG 1
30650_ACEOF
30651
30652  LIBS="-ljpeg $LIBS"
30653
30654else
30655   USE_EXTERNAL_LIBJPEG=false
30656               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30657$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30658
30659fi
30660
30661
30662
30663###############################################################################
30664#
30665# Check for the gif library
30666#
30667
30668USE_EXTERNAL_LIBJPEG=true
30669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30670$as_echo_n "checking for main in -lgif... " >&6; }
30671if test "${ac_cv_lib_gif_main+set}" = set; then :
30672  $as_echo_n "(cached) " >&6
30673else
30674  ac_check_lib_save_LIBS=$LIBS
30675LIBS="-lgif  $LIBS"
30676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30677/* end confdefs.h.  */
30678
30679
30680int
30681main ()
30682{
30683return main ();
30684  ;
30685  return 0;
30686}
30687_ACEOF
30688if ac_fn_cxx_try_link "$LINENO"; then :
30689  ac_cv_lib_gif_main=yes
30690else
30691  ac_cv_lib_gif_main=no
30692fi
30693rm -f core conftest.err conftest.$ac_objext \
30694    conftest$ac_exeext conftest.$ac_ext
30695LIBS=$ac_check_lib_save_LIBS
30696fi
30697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30698$as_echo "$ac_cv_lib_gif_main" >&6; }
30699if test "x$ac_cv_lib_gif_main" = x""yes; then :
30700  cat >>confdefs.h <<_ACEOF
30701#define HAVE_LIBGIF 1
30702_ACEOF
30703
30704  LIBS="-lgif $LIBS"
30705
30706else
30707   USE_EXTERNAL_LIBGIF=false
30708               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30709$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30710
30711fi
30712
30713
30714
30715###############################################################################
30716#
30717# Check for the zlib library
30718#
30719
30720
30721# Check whether --with-zlib was given.
30722if test "${with_zlib+set}" = set; then :
30723  withval=$with_zlib;
30724fi
30725
30726
30727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30728$as_echo_n "checking for compress in -lz... " >&6; }
30729if test "${ac_cv_lib_z_compress+set}" = set; then :
30730  $as_echo_n "(cached) " >&6
30731else
30732  ac_check_lib_save_LIBS=$LIBS
30733LIBS="-lz  $LIBS"
30734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30735/* end confdefs.h.  */
30736
30737/* Override any GCC internal prototype to avoid an error.
30738   Use char because int might match the return type of a GCC
30739   builtin and then its argument prototype would still apply.  */
30740#ifdef __cplusplus
30741extern "C"
30742#endif
30743char compress ();
30744int
30745main ()
30746{
30747return compress ();
30748  ;
30749  return 0;
30750}
30751_ACEOF
30752if ac_fn_cxx_try_link "$LINENO"; then :
30753  ac_cv_lib_z_compress=yes
30754else
30755  ac_cv_lib_z_compress=no
30756fi
30757rm -f core conftest.err conftest.$ac_objext \
30758    conftest$ac_exeext conftest.$ac_ext
30759LIBS=$ac_check_lib_save_LIBS
30760fi
30761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30762$as_echo "$ac_cv_lib_z_compress" >&6; }
30763if test "x$ac_cv_lib_z_compress" = x""yes; then :
30764   ZLIB_FOUND=yes
30765else
30766   ZLIB_FOUND=no
30767fi
30768
30769
30770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30771$as_echo_n "checking for which zlib to use... " >&6; }
30772
30773DEFAULT_ZLIB=bundled
30774if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30775#
30776# On macosx default is system...on others default is
30777#
30778    DEFAULT_ZLIB=system
30779fi
30780
30781if test "x${ZLIB_FOUND}" != "xyes"; then
30782#
30783# If we don't find any system...set default to bundled
30784#
30785    DEFAULT_ZLIB=bundled
30786fi
30787
30788#
30789# If user didn't specify, use DEFAULT_ZLIB
30790#
30791if test "x${with_zlib}" = "x"; then
30792    with_zlib=${DEFAULT_ZLIB}
30793fi
30794
30795if test "x${with_zlib}" = "xbundled"; then
30796    USE_EXTERNAL_LIBZ=false
30797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30798$as_echo "bundled" >&6; }
30799elif test "x${with_zlib}" = "xsystem"; then
30800    if test "x${ZLIB_FOUND}" = "xyes"; then
30801        USE_EXTERNAL_LIBZ=true
30802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30803$as_echo "system" >&6; }
30804    else
30805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30806$as_echo "system not found" >&6; }
30807        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30808    fi
30809else
30810    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30811fi
30812
30813
30814
30815###############################################################################
30816LIBZIP_CAN_USE_MMAP=true
30817
30818
30819
30820###############################################################################
30821#
30822# Check if altzone exists in time.h
30823#
30824
30825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30826/* end confdefs.h.  */
30827#include <time.h>
30828int
30829main ()
30830{
30831return (int)altzone;
30832  ;
30833  return 0;
30834}
30835_ACEOF
30836if ac_fn_cxx_try_link "$LINENO"; then :
30837  has_altzone=yes
30838else
30839  has_altzone=no
30840fi
30841rm -f core conftest.err conftest.$ac_objext \
30842    conftest$ac_exeext conftest.$ac_ext
30843if test "x$has_altzone" = xyes; then
30844
30845$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30846
30847fi
30848
30849###############################################################################
30850#
30851# Check the maths library
30852#
30853
30854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30855$as_echo_n "checking for cos in -lm... " >&6; }
30856if test "${ac_cv_lib_m_cos+set}" = set; then :
30857  $as_echo_n "(cached) " >&6
30858else
30859  ac_check_lib_save_LIBS=$LIBS
30860LIBS="-lm  $LIBS"
30861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30862/* end confdefs.h.  */
30863
30864/* Override any GCC internal prototype to avoid an error.
30865   Use char because int might match the return type of a GCC
30866   builtin and then its argument prototype would still apply.  */
30867#ifdef __cplusplus
30868extern "C"
30869#endif
30870char cos ();
30871int
30872main ()
30873{
30874return cos ();
30875  ;
30876  return 0;
30877}
30878_ACEOF
30879if ac_fn_cxx_try_link "$LINENO"; then :
30880  ac_cv_lib_m_cos=yes
30881else
30882  ac_cv_lib_m_cos=no
30883fi
30884rm -f core conftest.err conftest.$ac_objext \
30885    conftest$ac_exeext conftest.$ac_ext
30886LIBS=$ac_check_lib_save_LIBS
30887fi
30888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30889$as_echo "$ac_cv_lib_m_cos" >&6; }
30890if test "x$ac_cv_lib_m_cos" = x""yes; then :
30891  cat >>confdefs.h <<_ACEOF
30892#define HAVE_LIBM 1
30893_ACEOF
30894
30895  LIBS="-lm $LIBS"
30896
30897else
30898
30899                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30900$as_echo "$as_me: Maths library was not found" >&6;}
30901
30902fi
30903
30904
30905
30906###############################################################################
30907#
30908# Check for libdl.so
30909
30910save_LIBS="$LIBS"
30911LIBS=""
30912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30913$as_echo_n "checking for dlopen in -ldl... " >&6; }
30914if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30915  $as_echo_n "(cached) " >&6
30916else
30917  ac_check_lib_save_LIBS=$LIBS
30918LIBS="-ldl  $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 dlopen ();
30929int
30930main ()
30931{
30932return dlopen ();
30933  ;
30934  return 0;
30935}
30936_ACEOF
30937if ac_fn_cxx_try_link "$LINENO"; then :
30938  ac_cv_lib_dl_dlopen=yes
30939else
30940  ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5
30947$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30948if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30949  cat >>confdefs.h <<_ACEOF
30950#define HAVE_LIBDL 1
30951_ACEOF
30952
30953  LIBS="-ldl $LIBS"
30954
30955fi
30956
30957LIBDL="$LIBS"
30958
30959LIBS="$save_LIBS"
30960
30961
30962
30963###############################################################################
30964#
30965# statically link libstdc++ before C++ ABI is stablized on Linux unless
30966# dynamic build is configured on command line.
30967#
30968
30969# Check whether --with-stdc++lib was given.
30970if test "${with_stdc__lib+set}" = set; then :
30971  withval=$with_stdc__lib;
30972    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30973        && test "x$with_stdc__lib" != xdefault; then
30974      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30975    fi
30976
30977else
30978  with_stdc__lib=default
30979
30980fi
30981
30982
30983if test "x$OPENJDK_TARGET_OS" = xlinux; then
30984    # Test if -lstdc++ works.
30985    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30986$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30987    ac_ext=cpp
30988ac_cpp='$CXXCPP $CPPFLAGS'
30989ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30990ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30991ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30992
30993    OLD_CXXFLAGS="$CXXFLAGS"
30994    CXXFLAGS="$CXXFLAGS -lstdc++"
30995    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30996/* end confdefs.h.  */
30997
30998int
30999main ()
31000{
31001return 0;
31002  ;
31003  return 0;
31004}
31005_ACEOF
31006if ac_fn_cxx_try_link "$LINENO"; then :
31007  has_dynamic_libstdcxx=yes
31008else
31009  has_dynamic_libstdcxx=no
31010fi
31011rm -f core conftest.err conftest.$ac_objext \
31012    conftest$ac_exeext conftest.$ac_ext
31013    CXXFLAGS="$OLD_CXXFLAGS"
31014    ac_ext=cpp
31015ac_cpp='$CXXCPP $CPPFLAGS'
31016ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31017ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31018ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31019
31020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31021$as_echo "$has_dynamic_libstdcxx" >&6; }
31022
31023    # Test if stdc++ can be linked statically.
31024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31025$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31026    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31027    ac_ext=cpp
31028ac_cpp='$CXXCPP $CPPFLAGS'
31029ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31030ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31031ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31032
31033    OLD_LIBS="$LIBS"
31034    OLD_CXX="$CXX"
31035    LIBS="$STATIC_STDCXX_FLAGS"
31036    CXX="$CC"
31037    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31038/* end confdefs.h.  */
31039
31040int
31041main ()
31042{
31043return 0;
31044  ;
31045  return 0;
31046}
31047_ACEOF
31048if ac_fn_cxx_try_link "$LINENO"; then :
31049  has_static_libstdcxx=yes
31050else
31051  has_static_libstdcxx=no
31052fi
31053rm -f core conftest.err conftest.$ac_objext \
31054    conftest$ac_exeext conftest.$ac_ext
31055    LIBS="$OLD_LIBS"
31056    CXX="$OLD_CXX"
31057    ac_ext=cpp
31058ac_cpp='$CXXCPP $CPPFLAGS'
31059ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31060ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31061ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31062
31063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31064$as_echo "$has_static_libstdcxx" >&6; }
31065
31066    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31067        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31068    fi
31069
31070    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31071        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31072    fi
31073
31074    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31075        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31076    fi
31077
31078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31079$as_echo_n "checking how to link with libstdc++... " >&6; }
31080    # If dynamic was requested, it's available since it would fail above otherwise.
31081    # If dynamic wasn't requested, go with static unless it isn't available.
31082    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31083        LIBCXX="$LIBCXX -lstdc++"
31084        LDCXX="$CXX"
31085        STATIC_CXX_SETTING="STATIC_CXX=false"
31086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31087$as_echo "dynamic" >&6; }
31088    else
31089        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31090        LDCXX="$CC"
31091        STATIC_CXX_SETTING="STATIC_CXX=true"
31092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31093$as_echo "static" >&6; }
31094    fi
31095fi
31096
31097
31098# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31099if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31100    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31101fi
31102
31103# TODO better (platform agnostic) test
31104if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31105    LIBCXX="-lstdc++"
31106fi
31107
31108
31109
31110
31111
31112# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31113
31114# When using cygwin or msys, we need a wrapper binary that renames
31115# /cygdrive/c/ arguments into c:/ arguments and peeks into
31116# @files and rewrites these too! This wrapper binary is
31117# called fixpath.
31118FIXPATH=
31119if test "x$OPENJDK_BUILD_OS" = xwindows; then
31120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31121$as_echo_n "checking if fixpath can be created... " >&6; }
31122    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31123    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31124    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31125      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31126      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31127      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31128      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31129    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31130      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31131      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31132
31133      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31134      # @ was chosen as separator to minimize risk of other tools messing around with it
31135      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31136      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31137
31138      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31139    fi
31140    rm -f $OUTPUT_ROOT/fixpath*
31141    cd $OUTPUT_ROOT
31142    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31143    cd $CURDIR
31144
31145    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31147$as_echo "no" >&6; }
31148        cat $OUTPUT_ROOT/fixpath1.log
31149        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31150    fi
31151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31152$as_echo "yes" >&6; }
31153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31154$as_echo_n "checking if fixpath.exe works... " >&6; }
31155    cd $OUTPUT_ROOT
31156    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31157    cd $CURDIR
31158    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31160$as_echo "no" >&6; }
31161        cat $OUTPUT_ROOT/fixpath2.log
31162        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31163    fi
31164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31165$as_echo "yes" >&6; }
31166    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31167fi
31168
31169
31170
31171
31172###############################################################################
31173#
31174# We need to do some final tweaking, when everything else is done.
31175#
31176###############################################################################
31177
31178
31179HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31180
31181
31182# The name of the Service Agent jar.
31183SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31184if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31185  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31186fi
31187
31188
31189
31190
31191###############################################################################
31192#
31193# Configure parts of the build that only affect the build performance,
31194# not the result.
31195#
31196###############################################################################
31197
31198
31199# How many cores do we have on this build system?
31200
31201# Check whether --with-num-cores was given.
31202if test "${with_num_cores+set}" = set; then :
31203  withval=$with_num_cores;
31204fi
31205
31206if test "x$with_num_cores" = x; then
31207    # The number of cores were not specified, try to probe them.
31208
31209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31210$as_echo_n "checking for number of cores... " >&6; }
31211    NUM_CORES=1
31212    FOUND_CORES=no
31213
31214    if test -f /proc/cpuinfo; then
31215        # Looks like a Linux (or cygwin) system
31216        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31217        FOUND_CORES=yes
31218    elif test -x /usr/sbin/psrinfo; then
31219        # Looks like a Solaris system
31220        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31221        FOUND_CORES=yes
31222    elif test -x /usr/sbin/system_profiler; then
31223        # Looks like a MacOSX system
31224        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31225        FOUND_CORES=yes
31226    elif test -n "$NUMBER_OF_PROCESSORS"; then
31227        # On windows, look in the env
31228        NUM_CORES=$NUMBER_OF_PROCESSORS
31229        FOUND_CORES=yes
31230    fi
31231
31232    # For c/c++ code we run twice as many concurrent build
31233    # jobs than we have cores, otherwise we will stall on io.
31234    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31235
31236    if test "x$FOUND_CORES" = xyes; then
31237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31238$as_echo "$NUM_CORES" >&6; }
31239    else
31240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31241$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31243$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31244    fi
31245
31246
31247else
31248    NUM_CORES=$with_num_cores
31249    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31250fi
31251
31252
31253
31254
31255# How much memory do we have on this build system?
31256
31257# Check whether --with-memory-size was given.
31258if test "${with_memory_size+set}" = set; then :
31259  withval=$with_memory_size;
31260fi
31261
31262if test "x$with_memory_size" = x; then
31263    # The memory size was not specified, try to probe it.
31264
31265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31266$as_echo_n "checking for memory size... " >&6; }
31267    # Default to 1024 MB
31268    MEMORY_SIZE=1024
31269    FOUND_MEM=no
31270
31271    if test -f /proc/meminfo; then
31272        # Looks like a Linux (or cygwin) system
31273        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31274        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31275        FOUND_MEM=yes
31276    elif test -x /usr/sbin/prtconf; then
31277        # Looks like a Solaris system
31278        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31279        FOUND_MEM=yes
31280    elif test -x /usr/sbin/system_profiler; then
31281        # Looks like a MacOSX system
31282        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31283        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31284        FOUND_MEM=yes
31285    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31286        # Windows, but without cygwin
31287        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31288        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31289        FOUND_MEM=yes
31290    fi
31291
31292    if test "x$FOUND_MEM" = xyes; then
31293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31294$as_echo "$MEMORY_SIZE MB" >&6; }
31295    else
31296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31297$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31299$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31300    fi
31301
31302else
31303    MEMORY_SIZE=$with_memory_size
31304fi
31305
31306
31307
31308# Setup smart javac (after cores and memory have been setup)
31309
31310
31311# Check whether --with-sjavac-server-java was given.
31312if test "${with_sjavac_server_java+set}" = set; then :
31313  withval=$with_sjavac_server_java;
31314fi
31315
31316
31317if test "x$with_sjavac_server_java" != x; then
31318    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31319    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31320    if test "x$FOUND_VERSION" = x; then
31321        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31322    fi
31323else
31324    SJAVAC_SERVER_JAVA=""
31325    # Hotspot specific options.
31326
31327    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31328    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31329    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31330    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31331    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31332        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31333    fi
31334
31335    # JRockit specific options.
31336
31337    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31338    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31339    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31340    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31341    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31342        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31343    fi
31344
31345    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31346fi
31347
31348
31349
31350# Check whether --with-sjavac-server-cores was given.
31351if test "${with_sjavac_server_cores+set}" = set; then :
31352  withval=$with_sjavac_server_cores;
31353fi
31354
31355if test "x$with_sjavac_server_cores" != x; then
31356    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31357else
31358    if test "$NUM_CORES" -gt 16; then
31359        # We set this arbitrary limit because we want to limit the heap
31360        # size of the javac server.
31361        # In the future we will make the javac compilers in the server
31362        # share more and more state, thus enabling us to use more and
31363        # more concurrent threads in the server.
31364        SJAVAC_SERVER_CORES="16"
31365    else
31366        SJAVAC_SERVER_CORES="$NUM_CORES"
31367    fi
31368
31369    if test "$MEMORY_SIZE" -gt "17000"; then
31370        MAX_HEAP_MEM=10000
31371
31372    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31373    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31374    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31375    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31376    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31377        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31378    fi
31379
31380
31381    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31382    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31383    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31384    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31385    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31386        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31387    fi
31388
31389    elif test "$MEMORY_SIZE" -gt "10000"; then
31390        MAX_HEAP_MEM=6000
31391
31392    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31393    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31394    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31395    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31396    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31397        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31398    fi
31399
31400
31401    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31402    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31403    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31404    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31405    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31406        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31407    fi
31408
31409    elif test "$MEMORY_SIZE" -gt "5000"; then
31410        MAX_HEAP_MEM=3000
31411
31412    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31413    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31414    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31415    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31416    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31417        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31418    fi
31419
31420
31421    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31422    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31423    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31424    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31425    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31426        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31427    fi
31428
31429    elif test "$MEMORY_SIZE" -gt "3800"; then
31430        MAX_HEAP_MEM=2500
31431
31432    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31433    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31434    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31435    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31436    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31437        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31438    fi
31439
31440    elif test "$MEMORY_SIZE" -gt "1900"; then
31441        MAX_HEAP_MEM=1200
31442
31443    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31444    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31445    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31446    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31447    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31448        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31449    fi
31450
31451    elif test "$MEMORY_SIZE" -gt "1000"; then
31452        MAX_HEAP_MEM=900
31453
31454    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31455    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31456    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31457    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31458    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31459        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31460    fi
31461
31462    else
31463        MAX_HEAP_MEM=512
31464
31465    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31466    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31467    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31468    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31469    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31470        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31471    fi
31472
31473    fi
31474
31475
31476    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31477    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31478    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31479    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31480    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31481        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31482    fi
31483
31484
31485    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31486    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31487    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31488    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31489    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31490        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31491    fi
31492
31493
31494    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31495    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31496    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31497    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31498    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31499        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31500    fi
31501
31502
31503    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31504    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31505        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31506$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31507        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31509$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31510    fi
31511fi
31512
31513
31514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31515$as_echo_n "checking whether to use sjavac... " >&6; }
31516# Check whether --enable-sjavac was given.
31517if test "${enable_sjavac+set}" = set; then :
31518  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31519else
31520  ENABLE_SJAVAC='no'
31521fi
31522
31523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31524$as_echo "$ENABLE_SJAVAC" >&6; }
31525
31526
31527if test "x$ENABLE_SJAVAC" = xyes; then
31528    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31529else
31530    SJAVAC_SERVER_DIR=
31531fi
31532
31533
31534
31535
31536# Can the C/C++ compiler use precompiled headers?
31537
31538
31539###############################################################################
31540#
31541# Can the C/C++ compiler use precompiled headers?
31542#
31543# Check whether --enable-precompiled-headers was given.
31544if test "${enable_precompiled_headers+set}" = set; then :
31545  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31546else
31547  ENABLE_PRECOMPH=yes
31548fi
31549
31550
31551USE_PRECOMPILED_HEADER=1
31552if test "x$ENABLE_PRECOMPH" = xno; then
31553    USE_PRECOMPILED_HEADER=0
31554fi
31555
31556if test "x$ENABLE_PRECOMPH" = xyes; then
31557    # Check that the compiler actually supports precomp headers.
31558    if test "x$GCC" = xyes; then
31559         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31560$as_echo_n "checking that precompiled headers work... " >&6; }
31561         echo "int alfa();" > conftest.h
31562         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31563         if test ! -f conftest.hpp.gch; then
31564             USE_PRECOMPILED_HEADER=0
31565             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31566$as_echo "no" >&6; }
31567         else
31568             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31569$as_echo "yes" >&6; }
31570         fi
31571         rm -f conftest.h conftest.hpp.gch
31572    fi
31573fi
31574
31575
31576
31577
31578# Setup use of ccache, if available
31579
31580    # Check whether --enable-ccache was given.
31581if test "${enable_ccache+set}" = set; then :
31582  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31583else
31584  ENABLE_CCACHE=yes
31585fi
31586
31587    if test "x$ENABLE_CCACHE" = xyes; then
31588        # Extract the first word of "ccache", so it can be a program name with args.
31589set dummy ccache; ac_word=$2
31590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31591$as_echo_n "checking for $ac_word... " >&6; }
31592if test "${ac_cv_path_CCACHE+set}" = set; then :
31593  $as_echo_n "(cached) " >&6
31594else
31595  case $CCACHE in
31596  [\\/]* | ?:[\\/]*)
31597  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31598  ;;
31599  *)
31600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31601for as_dir in $PATH
31602do
31603  IFS=$as_save_IFS
31604  test -z "$as_dir" && as_dir=.
31605    for ac_exec_ext in '' $ac_executable_extensions; do
31606  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31607    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31609    break 2
31610  fi
31611done
31612  done
31613IFS=$as_save_IFS
31614
31615  ;;
31616esac
31617fi
31618CCACHE=$ac_cv_path_CCACHE
31619if test -n "$CCACHE"; then
31620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31621$as_echo "$CCACHE" >&6; }
31622else
31623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31624$as_echo "no" >&6; }
31625fi
31626
31627
31628    else
31629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31630$as_echo_n "checking for ccache... " >&6; }
31631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31632$as_echo "explicitly disabled" >&6; }
31633        CCACHE=
31634    fi
31635
31636
31637
31638# Check whether --with-ccache-dir was given.
31639if test "${with_ccache_dir+set}" = set; then :
31640  withval=$with_ccache_dir;
31641fi
31642
31643
31644    if test "x$with_ccache_dir" != x; then
31645        # When using a non home ccache directory, assume the use is to share ccache files
31646        # with other users. Thus change the umask.
31647        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31648    fi
31649    CCACHE_FOUND=""
31650    if test "x$CCACHE" != x; then
31651
31652    if test "x$CCACHE" != x; then
31653        CCACHE_FOUND="true"
31654        # Only use ccache if it is 3.1.4 or later, which supports
31655        # precompiled headers.
31656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31657$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31658        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31659        if test "x$HAS_GOOD_CCACHE" = x; then
31660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31661$as_echo "no, disabling ccache" >&6; }
31662            CCACHE=
31663        else
31664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31665$as_echo "yes" >&6; }
31666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31667$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31668            PUSHED_FLAGS="$CXXFLAGS"
31669            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31670            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31671/* end confdefs.h.  */
31672
31673int
31674main ()
31675{
31676
31677  ;
31678  return 0;
31679}
31680_ACEOF
31681if ac_fn_cxx_try_compile "$LINENO"; then :
31682  CC_KNOWS_CCACHE_TRICK=yes
31683else
31684  CC_KNOWS_CCACHE_TRICK=no
31685fi
31686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31687            CXXFLAGS="$PUSHED_FLAGS"
31688            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31689                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31690$as_echo "yes" >&6; }
31691            else
31692                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31693$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31694                CCACHE=
31695            fi
31696        fi
31697    fi
31698
31699    if test "x$CCACHE" != x; then
31700        CCACHE_SLOPPINESS=time_macros
31701        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31702        CCACHE_FLAGS=-fpch-preprocess
31703
31704        if test "x$SET_CCACHE_DIR" != x; then
31705            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31706	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31707        fi
31708    fi
31709
31710    fi
31711
31712
31713###############################################################################
31714#
31715# And now the finish...
31716#
31717###############################################################################
31718
31719# Check for some common pitfalls
31720
31721  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31722    file_to_test="$SRC_ROOT/LICENSE"
31723    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31724      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
31725    fi
31726  fi
31727
31728
31729
31730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31731$as_echo_n "checking if build directory is on local disk... " >&6; }
31732
31733	# df -l lists only local disks; if the given directory is not found then
31734	# a non-zero exit code is given
31735  if test "x$DF" = x; then
31736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31737      # msys does not have df; use Windows "net use" instead.
31738      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31739      if test "x$IS_NETWORK_DISK" = x; then
31740        OUTPUT_DIR_IS_LOCAL="yes"
31741      else
31742        OUTPUT_DIR_IS_LOCAL="no"
31743      fi
31744    else
31745      # No df here, say it's local
31746      OUTPUT_DIR_IS_LOCAL="yes"
31747    fi
31748  else
31749    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31750      OUTPUT_DIR_IS_LOCAL="yes"
31751    else
31752      OUTPUT_DIR_IS_LOCAL="no"
31753    fi
31754  fi
31755
31756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31757$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31758
31759
31760
31761# Check if the user has any old-style ALT_ variables set.
31762FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31763
31764# Before generating output files, test if they exist. If they do, this is a reconfigure.
31765# Since we can't properly handle the dependencies for this, warn the user about the situation
31766if test -e $OUTPUT_ROOT/spec.gmk; then
31767  IS_RECONFIGURE=yes
31768else
31769  IS_RECONFIGURE=no
31770fi
31771
31772if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31773  HIDE_PERFORMANCE_HINTS=yes
31774else
31775  HIDE_PERFORMANCE_HINTS=no
31776  # Hide it the next time around...
31777  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31778fi
31779
31780
31781
31782# At the end, call the custom hook. (Dummy macro if no custom sources available)
31783
31784
31785# We're messing a bit with internal autoconf variables to put the config.status
31786# in the output directory instead of the current directory.
31787CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31788# Create the actual output files. Now the main work of configure is done.
31789cat >confcache <<\_ACEOF
31790# This file is a shell script that caches the results of configure
31791# tests run on this system so they can be shared between configure
31792# scripts and configure runs, see configure's option --config-cache.
31793# It is not useful on other systems.  If it contains results you don't
31794# want to keep, you may remove or edit it.
31795#
31796# config.status only pays attention to the cache file if you give it
31797# the --recheck option to rerun configure.
31798#
31799# `ac_cv_env_foo' variables (set or unset) will be overridden when
31800# loading this file, other *unset* `ac_cv_foo' will be assigned the
31801# following values.
31802
31803_ACEOF
31804
31805# The following way of writing the cache mishandles newlines in values,
31806# but we know of no workaround that is simple, portable, and efficient.
31807# So, we kill variables containing newlines.
31808# Ultrix sh set writes to stderr and can't be redirected directly,
31809# and sets the high bit in the cache file unless we assign to the vars.
31810(
31811  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31812    eval ac_val=\$$ac_var
31813    case $ac_val in #(
31814    *${as_nl}*)
31815      case $ac_var in #(
31816      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31817$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31818      esac
31819      case $ac_var in #(
31820      _ | IFS | as_nl) ;; #(
31821      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31822      *) { eval $ac_var=; unset $ac_var;} ;;
31823      esac ;;
31824    esac
31825  done
31826
31827  (set) 2>&1 |
31828    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31829    *${as_nl}ac_space=\ *)
31830      # `set' does not quote correctly, so add quotes: double-quote
31831      # substitution turns \\\\ into \\, and sed turns \\ into \.
31832      sed -n \
31833	"s/'/'\\\\''/g;
31834	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31835      ;; #(
31836    *)
31837      # `set' quotes correctly as required by POSIX, so do not add quotes.
31838      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31839      ;;
31840    esac |
31841    sort
31842) |
31843  sed '
31844     /^ac_cv_env_/b end
31845     t clear
31846     :clear
31847     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31848     t end
31849     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31850     :end' >>confcache
31851if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31852  if test -w "$cache_file"; then
31853    test "x$cache_file" != "x/dev/null" &&
31854      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31855$as_echo "$as_me: updating cache $cache_file" >&6;}
31856    cat confcache >$cache_file
31857  else
31858    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31859$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31860  fi
31861fi
31862rm -f confcache
31863
31864test "x$prefix" = xNONE && prefix=$ac_default_prefix
31865# Let make expand exec_prefix.
31866test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31867
31868DEFS=-DHAVE_CONFIG_H
31869
31870ac_libobjs=
31871ac_ltlibobjs=
31872U=
31873for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31874  # 1. Remove the extension, and $U if already installed.
31875  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31876  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31877  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31878  #    will be set to the directory where LIBOBJS objects are built.
31879  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31880  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31881done
31882LIBOBJS=$ac_libobjs
31883
31884LTLIBOBJS=$ac_ltlibobjs
31885
31886
31887
31888: ${CONFIG_STATUS=./config.status}
31889ac_write_fail=0
31890ac_clean_files_save=$ac_clean_files
31891ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31892{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31893$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31894as_write_fail=0
31895cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31896#! $SHELL
31897# Generated by $as_me.
31898# Run this file to recreate the current configuration.
31899# Compiler output produced by configure, useful for debugging
31900# configure, is in config.log if it exists.
31901
31902debug=false
31903ac_cs_recheck=false
31904ac_cs_silent=false
31905
31906SHELL=\${CONFIG_SHELL-$SHELL}
31907export SHELL
31908_ASEOF
31909cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31910## -------------------- ##
31911## M4sh Initialization. ##
31912## -------------------- ##
31913
31914# Be more Bourne compatible
31915DUALCASE=1; export DUALCASE # for MKS sh
31916if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31917  emulate sh
31918  NULLCMD=:
31919  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31920  # is contrary to our usage.  Disable this feature.
31921  alias -g '${1+"$@"}'='"$@"'
31922  setopt NO_GLOB_SUBST
31923else
31924  case `(set -o) 2>/dev/null` in #(
31925  *posix*) :
31926    set -o posix ;; #(
31927  *) :
31928     ;;
31929esac
31930fi
31931
31932
31933as_nl='
31934'
31935export as_nl
31936# Printing a long string crashes Solaris 7 /usr/bin/printf.
31937as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31938as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31939as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31940# Prefer a ksh shell builtin over an external printf program on Solaris,
31941# but without wasting forks for bash or zsh.
31942if test -z "$BASH_VERSION$ZSH_VERSION" \
31943    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31944  as_echo='print -r --'
31945  as_echo_n='print -rn --'
31946elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31947  as_echo='printf %s\n'
31948  as_echo_n='printf %s'
31949else
31950  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31951    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31952    as_echo_n='/usr/ucb/echo -n'
31953  else
31954    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31955    as_echo_n_body='eval
31956      arg=$1;
31957      case $arg in #(
31958      *"$as_nl"*)
31959	expr "X$arg" : "X\\(.*\\)$as_nl";
31960	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31961      esac;
31962      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31963    '
31964    export as_echo_n_body
31965    as_echo_n='sh -c $as_echo_n_body as_echo'
31966  fi
31967  export as_echo_body
31968  as_echo='sh -c $as_echo_body as_echo'
31969fi
31970
31971# The user is always right.
31972if test "${PATH_SEPARATOR+set}" != set; then
31973  PATH_SEPARATOR=:
31974  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31975    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31976      PATH_SEPARATOR=';'
31977  }
31978fi
31979
31980
31981# IFS
31982# We need space, tab and new line, in precisely that order.  Quoting is
31983# there to prevent editors from complaining about space-tab.
31984# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31985# splitting by setting IFS to empty value.)
31986IFS=" ""	$as_nl"
31987
31988# Find who we are.  Look in the path if we contain no directory separator.
31989case $0 in #((
31990  *[\\/]* ) as_myself=$0 ;;
31991  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31992for as_dir in $PATH
31993do
31994  IFS=$as_save_IFS
31995  test -z "$as_dir" && as_dir=.
31996    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31997  done
31998IFS=$as_save_IFS
31999
32000     ;;
32001esac
32002# We did not find ourselves, most probably we were run as `sh COMMAND'
32003# in which case we are not to be found in the path.
32004if test "x$as_myself" = x; then
32005  as_myself=$0
32006fi
32007if test ! -f "$as_myself"; then
32008  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32009  exit 1
32010fi
32011
32012# Unset variables that we do not need and which cause bugs (e.g. in
32013# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32014# suppresses any "Segmentation fault" message there.  '((' could
32015# trigger a bug in pdksh 5.2.14.
32016for as_var in BASH_ENV ENV MAIL MAILPATH
32017do eval test x\${$as_var+set} = xset \
32018  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32019done
32020PS1='$ '
32021PS2='> '
32022PS4='+ '
32023
32024# NLS nuisances.
32025LC_ALL=C
32026export LC_ALL
32027LANGUAGE=C
32028export LANGUAGE
32029
32030# CDPATH.
32031(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32032
32033
32034# as_fn_error STATUS ERROR [LINENO LOG_FD]
32035# ----------------------------------------
32036# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32037# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32038# script with STATUS, using 1 if that was 0.
32039as_fn_error ()
32040{
32041  as_status=$1; test $as_status -eq 0 && as_status=1
32042  if test "$4"; then
32043    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32044    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32045  fi
32046  $as_echo "$as_me: error: $2" >&2
32047  as_fn_exit $as_status
32048} # as_fn_error
32049
32050
32051# as_fn_set_status STATUS
32052# -----------------------
32053# Set $? to STATUS, without forking.
32054as_fn_set_status ()
32055{
32056  return $1
32057} # as_fn_set_status
32058
32059# as_fn_exit STATUS
32060# -----------------
32061# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32062as_fn_exit ()
32063{
32064  set +e
32065  as_fn_set_status $1
32066  exit $1
32067} # as_fn_exit
32068
32069# as_fn_unset VAR
32070# ---------------
32071# Portably unset VAR.
32072as_fn_unset ()
32073{
32074  { eval $1=; unset $1;}
32075}
32076as_unset=as_fn_unset
32077# as_fn_append VAR VALUE
32078# ----------------------
32079# Append the text in VALUE to the end of the definition contained in VAR. Take
32080# advantage of any shell optimizations that allow amortized linear growth over
32081# repeated appends, instead of the typical quadratic growth present in naive
32082# implementations.
32083if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32084  eval 'as_fn_append ()
32085  {
32086    eval $1+=\$2
32087  }'
32088else
32089  as_fn_append ()
32090  {
32091    eval $1=\$$1\$2
32092  }
32093fi # as_fn_append
32094
32095# as_fn_arith ARG...
32096# ------------------
32097# Perform arithmetic evaluation on the ARGs, and store the result in the
32098# global $as_val. Take advantage of shells that can avoid forks. The arguments
32099# must be portable across $(()) and expr.
32100if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32101  eval 'as_fn_arith ()
32102  {
32103    as_val=$(( $* ))
32104  }'
32105else
32106  as_fn_arith ()
32107  {
32108    as_val=`expr "$@" || test $? -eq 1`
32109  }
32110fi # as_fn_arith
32111
32112
32113if expr a : '\(a\)' >/dev/null 2>&1 &&
32114   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32115  as_expr=expr
32116else
32117  as_expr=false
32118fi
32119
32120if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32121  as_basename=basename
32122else
32123  as_basename=false
32124fi
32125
32126if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32127  as_dirname=dirname
32128else
32129  as_dirname=false
32130fi
32131
32132as_me=`$as_basename -- "$0" ||
32133$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32134	 X"$0" : 'X\(//\)$' \| \
32135	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32136$as_echo X/"$0" |
32137    sed '/^.*\/\([^/][^/]*\)\/*$/{
32138	    s//\1/
32139	    q
32140	  }
32141	  /^X\/\(\/\/\)$/{
32142	    s//\1/
32143	    q
32144	  }
32145	  /^X\/\(\/\).*/{
32146	    s//\1/
32147	    q
32148	  }
32149	  s/.*/./; q'`
32150
32151# Avoid depending upon Character Ranges.
32152as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32153as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32154as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32155as_cr_digits='0123456789'
32156as_cr_alnum=$as_cr_Letters$as_cr_digits
32157
32158ECHO_C= ECHO_N= ECHO_T=
32159case `echo -n x` in #(((((
32160-n*)
32161  case `echo 'xy\c'` in
32162  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32163  xy)  ECHO_C='\c';;
32164  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32165       ECHO_T='	';;
32166  esac;;
32167*)
32168  ECHO_N='-n';;
32169esac
32170
32171rm -f conf$$ conf$$.exe conf$$.file
32172if test -d conf$$.dir; then
32173  rm -f conf$$.dir/conf$$.file
32174else
32175  rm -f conf$$.dir
32176  mkdir conf$$.dir 2>/dev/null
32177fi
32178if (echo >conf$$.file) 2>/dev/null; then
32179  if ln -s conf$$.file conf$$ 2>/dev/null; then
32180    as_ln_s='ln -s'
32181    # ... but there are two gotchas:
32182    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32183    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32184    # In both cases, we have to default to `cp -p'.
32185    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32186      as_ln_s='cp -p'
32187  elif ln conf$$.file conf$$ 2>/dev/null; then
32188    as_ln_s=ln
32189  else
32190    as_ln_s='cp -p'
32191  fi
32192else
32193  as_ln_s='cp -p'
32194fi
32195rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32196rmdir conf$$.dir 2>/dev/null
32197
32198
32199# as_fn_mkdir_p
32200# -------------
32201# Create "$as_dir" as a directory, including parents if necessary.
32202as_fn_mkdir_p ()
32203{
32204
32205  case $as_dir in #(
32206  -*) as_dir=./$as_dir;;
32207  esac
32208  test -d "$as_dir" || eval $as_mkdir_p || {
32209    as_dirs=
32210    while :; do
32211      case $as_dir in #(
32212      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32213      *) as_qdir=$as_dir;;
32214      esac
32215      as_dirs="'$as_qdir' $as_dirs"
32216      as_dir=`$as_dirname -- "$as_dir" ||
32217$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32218	 X"$as_dir" : 'X\(//\)[^/]' \| \
32219	 X"$as_dir" : 'X\(//\)$' \| \
32220	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32221$as_echo X"$as_dir" |
32222    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32223	    s//\1/
32224	    q
32225	  }
32226	  /^X\(\/\/\)[^/].*/{
32227	    s//\1/
32228	    q
32229	  }
32230	  /^X\(\/\/\)$/{
32231	    s//\1/
32232	    q
32233	  }
32234	  /^X\(\/\).*/{
32235	    s//\1/
32236	    q
32237	  }
32238	  s/.*/./; q'`
32239      test -d "$as_dir" && break
32240    done
32241    test -z "$as_dirs" || eval "mkdir $as_dirs"
32242  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32243
32244
32245} # as_fn_mkdir_p
32246if mkdir -p . 2>/dev/null; then
32247  as_mkdir_p='mkdir -p "$as_dir"'
32248else
32249  test -d ./-p && rmdir ./-p
32250  as_mkdir_p=false
32251fi
32252
32253if test -x / >/dev/null 2>&1; then
32254  as_test_x='test -x'
32255else
32256  if ls -dL / >/dev/null 2>&1; then
32257    as_ls_L_option=L
32258  else
32259    as_ls_L_option=
32260  fi
32261  as_test_x='
32262    eval sh -c '\''
32263      if test -d "$1"; then
32264	test -d "$1/.";
32265      else
32266	case $1 in #(
32267	-*)set "./$1";;
32268	esac;
32269	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32270	???[sx]*):;;*)false;;esac;fi
32271    '\'' sh
32272  '
32273fi
32274as_executable_p=$as_test_x
32275
32276# Sed expression to map a string onto a valid CPP name.
32277as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32278
32279# Sed expression to map a string onto a valid variable name.
32280as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32281
32282
32283exec 6>&1
32284## ----------------------------------- ##
32285## Main body of $CONFIG_STATUS script. ##
32286## ----------------------------------- ##
32287_ASEOF
32288test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32289
32290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32291# Save the log message, to keep $0 and so on meaningful, and to
32292# report actual input values of CONFIG_FILES etc. instead of their
32293# values after options handling.
32294ac_log="
32295This file was extended by OpenJDK $as_me jdk8, which was
32296generated by GNU Autoconf 2.67.  Invocation command line was
32297
32298  CONFIG_FILES    = $CONFIG_FILES
32299  CONFIG_HEADERS  = $CONFIG_HEADERS
32300  CONFIG_LINKS    = $CONFIG_LINKS
32301  CONFIG_COMMANDS = $CONFIG_COMMANDS
32302  $ $0 $@
32303
32304on `(hostname || uname -n) 2>/dev/null | sed 1q`
32305"
32306
32307_ACEOF
32308
32309case $ac_config_files in *"
32310"*) set x $ac_config_files; shift; ac_config_files=$*;;
32311esac
32312
32313case $ac_config_headers in *"
32314"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32315esac
32316
32317
32318cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32319# Files that config.status was made for.
32320config_files="$ac_config_files"
32321config_headers="$ac_config_headers"
32322
32323_ACEOF
32324
32325cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32326ac_cs_usage="\
32327\`$as_me' instantiates files and other configuration actions
32328from templates according to the current configuration.  Unless the files
32329and actions are specified as TAGs, all are instantiated by default.
32330
32331Usage: $0 [OPTION]... [TAG]...
32332
32333  -h, --help       print this help, then exit
32334  -V, --version    print version number and configuration settings, then exit
32335      --config     print configuration, then exit
32336  -q, --quiet, --silent
32337                   do not print progress messages
32338  -d, --debug      don't remove temporary files
32339      --recheck    update $as_me by reconfiguring in the same conditions
32340      --file=FILE[:TEMPLATE]
32341                   instantiate the configuration file FILE
32342      --header=FILE[:TEMPLATE]
32343                   instantiate the configuration header FILE
32344
32345Configuration files:
32346$config_files
32347
32348Configuration headers:
32349$config_headers
32350
32351Report bugs to <build-dev@openjdk.java.net>.
32352OpenJDK home page: <http://openjdk.java.net>."
32353
32354_ACEOF
32355cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32356ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32357ac_cs_version="\\
32358OpenJDK config.status jdk8
32359configured by $0, generated by GNU Autoconf 2.67,
32360  with options \\"\$ac_cs_config\\"
32361
32362Copyright (C) 2010 Free Software Foundation, Inc.
32363This config.status script is free software; the Free Software Foundation
32364gives unlimited permission to copy, distribute and modify it."
32365
32366ac_pwd='$ac_pwd'
32367srcdir='$srcdir'
32368AWK='$AWK'
32369test -n "\$AWK" || AWK=awk
32370_ACEOF
32371
32372cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32373# The default lists apply if the user does not specify any file.
32374ac_need_defaults=:
32375while test $# != 0
32376do
32377  case $1 in
32378  --*=?*)
32379    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32380    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32381    ac_shift=:
32382    ;;
32383  --*=)
32384    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32385    ac_optarg=
32386    ac_shift=:
32387    ;;
32388  *)
32389    ac_option=$1
32390    ac_optarg=$2
32391    ac_shift=shift
32392    ;;
32393  esac
32394
32395  case $ac_option in
32396  # Handling of the options.
32397  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32398    ac_cs_recheck=: ;;
32399  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32400    $as_echo "$ac_cs_version"; exit ;;
32401  --config | --confi | --conf | --con | --co | --c )
32402    $as_echo "$ac_cs_config"; exit ;;
32403  --debug | --debu | --deb | --de | --d | -d )
32404    debug=: ;;
32405  --file | --fil | --fi | --f )
32406    $ac_shift
32407    case $ac_optarg in
32408    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32409    '') as_fn_error $? "missing file argument" ;;
32410    esac
32411    as_fn_append CONFIG_FILES " '$ac_optarg'"
32412    ac_need_defaults=false;;
32413  --header | --heade | --head | --hea )
32414    $ac_shift
32415    case $ac_optarg in
32416    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32417    esac
32418    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32419    ac_need_defaults=false;;
32420  --he | --h)
32421    # Conflict between --help and --header
32422    as_fn_error $? "ambiguous option: \`$1'
32423Try \`$0 --help' for more information.";;
32424  --help | --hel | -h )
32425    $as_echo "$ac_cs_usage"; exit ;;
32426  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32427  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32428    ac_cs_silent=: ;;
32429
32430  # This is an error.
32431  -*) as_fn_error $? "unrecognized option: \`$1'
32432Try \`$0 --help' for more information." ;;
32433
32434  *) as_fn_append ac_config_targets " $1"
32435     ac_need_defaults=false ;;
32436
32437  esac
32438  shift
32439done
32440
32441ac_configure_extra_args=
32442
32443if $ac_cs_silent; then
32444  exec 6>/dev/null
32445  ac_configure_extra_args="$ac_configure_extra_args --silent"
32446fi
32447
32448_ACEOF
32449cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32450if \$ac_cs_recheck; then
32451  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32452  shift
32453  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32454  CONFIG_SHELL='$SHELL'
32455  export CONFIG_SHELL
32456  exec "\$@"
32457fi
32458
32459_ACEOF
32460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32461exec 5>>config.log
32462{
32463  echo
32464  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32465## Running $as_me. ##
32466_ASBOX
32467  $as_echo "$ac_log"
32468} >&5
32469
32470_ACEOF
32471cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32472_ACEOF
32473
32474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32475
32476# Handling of arguments.
32477for ac_config_target in $ac_config_targets
32478do
32479  case $ac_config_target in
32480    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32481    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32482    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32483    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32484    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32485    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32486    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32487
32488  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32489  esac
32490done
32491
32492
32493# If the user did not use the arguments to specify the items to instantiate,
32494# then the envvar interface is used.  Set only those that are not.
32495# We use the long form for the default assignment because of an extremely
32496# bizarre bug on SunOS 4.1.3.
32497if $ac_need_defaults; then
32498  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32499  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32500fi
32501
32502# Have a temporary directory for convenience.  Make it in the build tree
32503# simply because there is no reason against having it here, and in addition,
32504# creating and moving files from /tmp can sometimes cause problems.
32505# Hook for its removal unless debugging.
32506# Note that there is a small window in which the directory will not be cleaned:
32507# after its creation but before its name has been assigned to `$tmp'.
32508$debug ||
32509{
32510  tmp=
32511  trap 'exit_status=$?
32512  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32513' 0
32514  trap 'as_fn_exit 1' 1 2 13 15
32515}
32516# Create a (secure) tmp directory for tmp files.
32517
32518{
32519  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32520  test -n "$tmp" && test -d "$tmp"
32521}  ||
32522{
32523  tmp=./conf$$-$RANDOM
32524  (umask 077 && mkdir "$tmp")
32525} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32526
32527# Set up the scripts for CONFIG_FILES section.
32528# No need to generate them if there are no CONFIG_FILES.
32529# This happens for instance with `./config.status config.h'.
32530if test -n "$CONFIG_FILES"; then
32531
32532
32533ac_cr=`echo X | tr X '\015'`
32534# On cygwin, bash can eat \r inside `` if the user requested igncr.
32535# But we know of no other shell where ac_cr would be empty at this
32536# point, so we can use a bashism as a fallback.
32537if test "x$ac_cr" = x; then
32538  eval ac_cr=\$\'\\r\'
32539fi
32540ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32541if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32542  ac_cs_awk_cr='\\r'
32543else
32544  ac_cs_awk_cr=$ac_cr
32545fi
32546
32547echo 'BEGIN {' >"$tmp/subs1.awk" &&
32548_ACEOF
32549
32550
32551{
32552  echo "cat >conf$$subs.awk <<_ACEOF" &&
32553  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32554  echo "_ACEOF"
32555} >conf$$subs.sh ||
32556  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32557ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32558ac_delim='%!_!# '
32559for ac_last_try in false false false false false :; do
32560  . ./conf$$subs.sh ||
32561    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32562
32563  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32564  if test $ac_delim_n = $ac_delim_num; then
32565    break
32566  elif $ac_last_try; then
32567    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32568  else
32569    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32570  fi
32571done
32572rm -f conf$$subs.sh
32573
32574cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32575cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32576_ACEOF
32577sed -n '
32578h
32579s/^/S["/; s/!.*/"]=/
32580p
32581g
32582s/^[^!]*!//
32583:repl
32584t repl
32585s/'"$ac_delim"'$//
32586t delim
32587:nl
32588h
32589s/\(.\{148\}\)..*/\1/
32590t more1
32591s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32592p
32593n
32594b repl
32595:more1
32596s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32597p
32598g
32599s/.\{148\}//
32600t nl
32601:delim
32602h
32603s/\(.\{148\}\)..*/\1/
32604t more2
32605s/["\\]/\\&/g; s/^/"/; s/$/"/
32606p
32607b
32608:more2
32609s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32610p
32611g
32612s/.\{148\}//
32613t delim
32614' <conf$$subs.awk | sed '
32615/^[^""]/{
32616  N
32617  s/\n//
32618}
32619' >>$CONFIG_STATUS || ac_write_fail=1
32620rm -f conf$$subs.awk
32621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32622_ACAWK
32623cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32624  for (key in S) S_is_set[key] = 1
32625  FS = ""
32626
32627}
32628{
32629  line = $ 0
32630  nfields = split(line, field, "@")
32631  substed = 0
32632  len = length(field[1])
32633  for (i = 2; i < nfields; i++) {
32634    key = field[i]
32635    keylen = length(key)
32636    if (S_is_set[key]) {
32637      value = S[key]
32638      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32639      len += length(value) + length(field[++i])
32640      substed = 1
32641    } else
32642      len += 1 + keylen
32643  }
32644
32645  print line
32646}
32647
32648_ACAWK
32649_ACEOF
32650cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32651if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32652  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32653else
32654  cat
32655fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32656  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32657_ACEOF
32658
32659# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32660# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32661# trailing colons and then remove the whole line if VPATH becomes empty
32662# (actually we leave an empty line to preserve line numbers).
32663if test "x$srcdir" = x.; then
32664  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32665h
32666s///
32667s/^/:/
32668s/[	 ]*$/:/
32669s/:\$(srcdir):/:/g
32670s/:\${srcdir}:/:/g
32671s/:@srcdir@:/:/g
32672s/^:*//
32673s/:*$//
32674x
32675s/\(=[	 ]*\).*/\1/
32676G
32677s/\n//
32678s/^[^=]*=[	 ]*$//
32679}'
32680fi
32681
32682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32683fi # test -n "$CONFIG_FILES"
32684
32685# Set up the scripts for CONFIG_HEADERS section.
32686# No need to generate them if there are no CONFIG_HEADERS.
32687# This happens for instance with `./config.status Makefile'.
32688if test -n "$CONFIG_HEADERS"; then
32689cat >"$tmp/defines.awk" <<\_ACAWK ||
32690BEGIN {
32691_ACEOF
32692
32693# Transform confdefs.h into an awk script `defines.awk', embedded as
32694# here-document in config.status, that substitutes the proper values into
32695# config.h.in to produce config.h.
32696
32697# Create a delimiter string that does not exist in confdefs.h, to ease
32698# handling of long lines.
32699ac_delim='%!_!# '
32700for ac_last_try in false false :; do
32701  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32702  if test -z "$ac_t"; then
32703    break
32704  elif $ac_last_try; then
32705    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32706  else
32707    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32708  fi
32709done
32710
32711# For the awk script, D is an array of macro values keyed by name,
32712# likewise P contains macro parameters if any.  Preserve backslash
32713# newline sequences.
32714
32715ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32716sed -n '
32717s/.\{148\}/&'"$ac_delim"'/g
32718t rset
32719:rset
32720s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32721t def
32722d
32723:def
32724s/\\$//
32725t bsnl
32726s/["\\]/\\&/g
32727s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32728D["\1"]=" \3"/p
32729s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32730d
32731:bsnl
32732s/["\\]/\\&/g
32733s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32734D["\1"]=" \3\\\\\\n"\\/p
32735t cont
32736s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32737t cont
32738d
32739:cont
32740n
32741s/.\{148\}/&'"$ac_delim"'/g
32742t clear
32743:clear
32744s/\\$//
32745t bsnlc
32746s/["\\]/\\&/g; s/^/"/; s/$/"/p
32747d
32748:bsnlc
32749s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32750b cont
32751' <confdefs.h | sed '
32752s/'"$ac_delim"'/"\\\
32753"/g' >>$CONFIG_STATUS || ac_write_fail=1
32754
32755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32756  for (key in D) D_is_set[key] = 1
32757  FS = ""
32758}
32759/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32760  line = \$ 0
32761  split(line, arg, " ")
32762  if (arg[1] == "#") {
32763    defundef = arg[2]
32764    mac1 = arg[3]
32765  } else {
32766    defundef = substr(arg[1], 2)
32767    mac1 = arg[2]
32768  }
32769  split(mac1, mac2, "(") #)
32770  macro = mac2[1]
32771  prefix = substr(line, 1, index(line, defundef) - 1)
32772  if (D_is_set[macro]) {
32773    # Preserve the white space surrounding the "#".
32774    print prefix "define", macro P[macro] D[macro]
32775    next
32776  } else {
32777    # Replace #undef with comments.  This is necessary, for example,
32778    # in the case of _POSIX_SOURCE, which is predefined and required
32779    # on some systems where configure will not decide to define it.
32780    if (defundef == "undef") {
32781      print "/*", prefix defundef, macro, "*/"
32782      next
32783    }
32784  }
32785}
32786{ print }
32787_ACAWK
32788_ACEOF
32789cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32790  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32791fi # test -n "$CONFIG_HEADERS"
32792
32793
32794eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32795shift
32796for ac_tag
32797do
32798  case $ac_tag in
32799  :[FHLC]) ac_mode=$ac_tag; continue;;
32800  esac
32801  case $ac_mode$ac_tag in
32802  :[FHL]*:*);;
32803  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32804  :[FH]-) ac_tag=-:-;;
32805  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32806  esac
32807  ac_save_IFS=$IFS
32808  IFS=:
32809  set x $ac_tag
32810  IFS=$ac_save_IFS
32811  shift
32812  ac_file=$1
32813  shift
32814
32815  case $ac_mode in
32816  :L) ac_source=$1;;
32817  :[FH])
32818    ac_file_inputs=
32819    for ac_f
32820    do
32821      case $ac_f in
32822      -) ac_f="$tmp/stdin";;
32823      *) # Look for the file first in the build tree, then in the source tree
32824	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32825	 # because $ac_f cannot contain `:'.
32826	 test -f "$ac_f" ||
32827	   case $ac_f in
32828	   [\\/$]*) false;;
32829	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32830	   esac ||
32831	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32832      esac
32833      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32834      as_fn_append ac_file_inputs " '$ac_f'"
32835    done
32836
32837    # Let's still pretend it is `configure' which instantiates (i.e., don't
32838    # use $as_me), people would be surprised to read:
32839    #    /* config.h.  Generated by config.status.  */
32840    configure_input='Generated from '`
32841	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32842	`' by configure.'
32843    if test x"$ac_file" != x-; then
32844      configure_input="$ac_file.  $configure_input"
32845      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32846$as_echo "$as_me: creating $ac_file" >&6;}
32847    fi
32848    # Neutralize special characters interpreted by sed in replacement strings.
32849    case $configure_input in #(
32850    *\&* | *\|* | *\\* )
32851       ac_sed_conf_input=`$as_echo "$configure_input" |
32852       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32853    *) ac_sed_conf_input=$configure_input;;
32854    esac
32855
32856    case $ac_tag in
32857    *:-:* | *:-) cat >"$tmp/stdin" \
32858      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32859    esac
32860    ;;
32861  esac
32862
32863  ac_dir=`$as_dirname -- "$ac_file" ||
32864$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32865	 X"$ac_file" : 'X\(//\)[^/]' \| \
32866	 X"$ac_file" : 'X\(//\)$' \| \
32867	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32868$as_echo X"$ac_file" |
32869    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32870	    s//\1/
32871	    q
32872	  }
32873	  /^X\(\/\/\)[^/].*/{
32874	    s//\1/
32875	    q
32876	  }
32877	  /^X\(\/\/\)$/{
32878	    s//\1/
32879	    q
32880	  }
32881	  /^X\(\/\).*/{
32882	    s//\1/
32883	    q
32884	  }
32885	  s/.*/./; q'`
32886  as_dir="$ac_dir"; as_fn_mkdir_p
32887  ac_builddir=.
32888
32889case "$ac_dir" in
32890.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32891*)
32892  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32893  # A ".." for each directory in $ac_dir_suffix.
32894  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32895  case $ac_top_builddir_sub in
32896  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32897  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32898  esac ;;
32899esac
32900ac_abs_top_builddir=$ac_pwd
32901ac_abs_builddir=$ac_pwd$ac_dir_suffix
32902# for backward compatibility:
32903ac_top_builddir=$ac_top_build_prefix
32904
32905case $srcdir in
32906  .)  # We are building in place.
32907    ac_srcdir=.
32908    ac_top_srcdir=$ac_top_builddir_sub
32909    ac_abs_top_srcdir=$ac_pwd ;;
32910  [\\/]* | ?:[\\/]* )  # Absolute name.
32911    ac_srcdir=$srcdir$ac_dir_suffix;
32912    ac_top_srcdir=$srcdir
32913    ac_abs_top_srcdir=$srcdir ;;
32914  *) # Relative name.
32915    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32916    ac_top_srcdir=$ac_top_build_prefix$srcdir
32917    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32918esac
32919ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32920
32921
32922  case $ac_mode in
32923  :F)
32924  #
32925  # CONFIG_FILE
32926  #
32927
32928_ACEOF
32929
32930cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32931# If the template does not know about datarootdir, expand it.
32932# FIXME: This hack should be removed a few years after 2.60.
32933ac_datarootdir_hack=; ac_datarootdir_seen=
32934ac_sed_dataroot='
32935/datarootdir/ {
32936  p
32937  q
32938}
32939/@datadir@/p
32940/@docdir@/p
32941/@infodir@/p
32942/@localedir@/p
32943/@mandir@/p'
32944case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32945*datarootdir*) ac_datarootdir_seen=yes;;
32946*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32947  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32948$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32949_ACEOF
32950cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32951  ac_datarootdir_hack='
32952  s&@datadir@&$datadir&g
32953  s&@docdir@&$docdir&g
32954  s&@infodir@&$infodir&g
32955  s&@localedir@&$localedir&g
32956  s&@mandir@&$mandir&g
32957  s&\\\${datarootdir}&$datarootdir&g' ;;
32958esac
32959_ACEOF
32960
32961# Neutralize VPATH when `$srcdir' = `.'.
32962# Shell code in configure.ac might set extrasub.
32963# FIXME: do we really want to maintain this feature?
32964cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32965ac_sed_extra="$ac_vpsub
32966$extrasub
32967_ACEOF
32968cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32969:t
32970/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32971s|@configure_input@|$ac_sed_conf_input|;t t
32972s&@top_builddir@&$ac_top_builddir_sub&;t t
32973s&@top_build_prefix@&$ac_top_build_prefix&;t t
32974s&@srcdir@&$ac_srcdir&;t t
32975s&@abs_srcdir@&$ac_abs_srcdir&;t t
32976s&@top_srcdir@&$ac_top_srcdir&;t t
32977s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32978s&@builddir@&$ac_builddir&;t t
32979s&@abs_builddir@&$ac_abs_builddir&;t t
32980s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32981$ac_datarootdir_hack
32982"
32983eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32984  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32985
32986test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32987  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32988  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32989  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32990which seems to be undefined.  Please make sure it is defined" >&5
32991$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32992which seems to be undefined.  Please make sure it is defined" >&2;}
32993
32994  rm -f "$tmp/stdin"
32995  case $ac_file in
32996  -) cat "$tmp/out" && rm -f "$tmp/out";;
32997  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32998  esac \
32999  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33000 ;;
33001  :H)
33002  #
33003  # CONFIG_HEADER
33004  #
33005  if test x"$ac_file" != x-; then
33006    {
33007      $as_echo "/* $configure_input  */" \
33008      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33009    } >"$tmp/config.h" \
33010      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33011    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33012      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33013$as_echo "$as_me: $ac_file is unchanged" >&6;}
33014    else
33015      rm -f "$ac_file"
33016      mv "$tmp/config.h" "$ac_file" \
33017	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33018    fi
33019  else
33020    $as_echo "/* $configure_input  */" \
33021      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33022      || as_fn_error $? "could not create -" "$LINENO" 5
33023  fi
33024 ;;
33025
33026
33027  esac
33028
33029done # for ac_tag
33030
33031
33032as_fn_exit 0
33033_ACEOF
33034ac_clean_files=$ac_clean_files_save
33035
33036test $ac_write_fail = 0 ||
33037  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33038
33039
33040# configure is writing to config.log, and then calls config.status.
33041# config.status does its own redirection, appending to config.log.
33042# Unfortunately, on DOS this fails, as config.log is still kept open
33043# by configure, so config.status won't be able to write to it; its
33044# output is simply discarded.  So we exec the FD to /dev/null,
33045# effectively closing config.log, so it can be properly (re)opened and
33046# appended to by config.status.  When coming back to configure, we
33047# need to make the FD available again.
33048if test "$no_create" != yes; then
33049  ac_cs_success=:
33050  ac_config_status_args=
33051  test "$silent" = yes &&
33052    ac_config_status_args="$ac_config_status_args --quiet"
33053  exec 5>/dev/null
33054  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33055  exec 5>>config.log
33056  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33057  # would make configure fail if this is the last instruction.
33058  $ac_cs_success || as_fn_exit 1
33059fi
33060if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33061  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33062$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33063fi
33064
33065
33066# Make the compare script executable
33067$CHMOD +x $OUTPUT_ROOT/compare.sh
33068
33069# Finally output some useful information to the user
33070
33071# Finally output some useful information to the user
33072
33073if test "x$CCACHE_FOUND" != x; then
33074	if  test "x$HAS_GOOD_CCACHE" = x; then
33075		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33076		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33077	else
33078		CCACHE_STATUS="installed and in use"
33079	fi
33080else
33081	if test "x$GCC" = xyes; then
33082		CCACHE_STATUS="not installed (consider installing)"
33083		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33084	else
33085		CCACHE_STATUS="not available for your system"
33086	fi
33087fi
33088
33089printf "\n"
33090printf "====================================================\n"
33091printf "A new configuration has been successfully created in\n"
33092printf "$OUTPUT_ROOT\n"
33093if test "x$CONFIGURE_COMMAND_LINE" != x; then
33094	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33095else
33096	printf "using default settings.\n"
33097fi
33098
33099printf "\n"
33100printf "Configuration summary:\n"
33101printf "* Debug level:    $DEBUG_LEVEL\n"
33102printf "* JDK variant:    $JDK_VARIANT\n"
33103printf "* JVM variants:   $with_jvm_variants\n"
33104printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33105
33106printf "\n"
33107printf "Tools summary:\n"
33108if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33109  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33110fi
33111printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33112printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33113printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33114
33115printf "\n"
33116printf "Build performance summary:\n"
33117printf "* Cores to use:   $NUM_CORES\n"
33118printf "* Memory limit:   $MEMORY_SIZE MB\n"
33119printf "* ccache status:  $CCACHE_STATUS\n"
33120printf "\n"
33121
33122if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33123	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33124	printf "$CCACHE_HELP_MSG\n"
33125
33126    # Print a helpful message on how to acquire the necessary build dependency.
33127    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33128    MISSING_DEPENDENCY=ccache
33129    PKGHANDLER_COMMAND=
33130
33131    case $PKGHANDLER in
33132	apt-get)
33133                apt_help     $MISSING_DEPENDENCY ;;
33134    yum)
33135                yum_help     $MISSING_DEPENDENCY ;;
33136	port)
33137                port_help    $MISSING_DEPENDENCY ;;
33138	pkgutil)
33139                pkgutil_help $MISSING_DEPENDENCY ;;
33140	pkgadd)
33141                pkgadd_help  $MISSING_DEPENDENCY ;;
33142    * )
33143      break ;;
33144    esac
33145
33146    if test "x$PKGHANDLER_COMMAND" != x; then
33147        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33148    fi
33149
33150	printf "$HELP_MSG\n"
33151	printf "\n"
33152fi
33153
33154if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33155	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33156	printf "will result in longer build times.\n"
33157	printf "\n"
33158fi
33159
33160if test "x$FOUND_ALT_VARIABLES" != "x"; then
33161	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33162	printf "These are not respected, and will be ignored. It is recommended\n"
33163	printf "that you clean your environment. The following variables are set:\n"
33164	printf "$FOUND_ALT_VARIABLES\n"
33165	printf "\n"
33166fi
33167
33168if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33169	printf "WARNING: Your build output directory is not on a local disk.\n"
33170	printf "This will severely degrade build performance!\n"
33171	printf "It is recommended that you create an output directory on a local disk,\n"
33172	printf "and run the configure script again from that directory.\n"
33173	printf "\n"
33174fi
33175
33176if test "x$IS_RECONFIGURE" = "xyes"; then
33177	printf "WARNING: The result of this configuration has overridden an older\n"
33178	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33179	printf "proper build. Failure to do so might result in strange build problems.\n"
33180	printf "\n"
33181fi
33182
33183