generated-configure.sh revision 600:0d46733cfffb
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711TOOLS_DIR_CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719ac_ct_PROPER_COMPILER_CC
720PROPER_COMPILER_CC
721POTENTIAL_CC
722TOOLS_DIR_CC
723BUILD_LD
724BUILD_CXX
725BUILD_CC
726MSVCR_DLL
727VS_PATH
728VS_LIB
729VS_INCLUDE
730CYGWIN_LINK
731AR_OUT_OPTION
732LD_OUT_OPTION
733EXE_OUT_OPTION
734CC_OUT_OPTION
735BUILD_HOTSPOT
736HOTSPOT_DIST
737BUILD_OUTPUT
738OVERRIDE_SRC_ROOT
739ADD_SRC_ROOT
740JDK_TOPDIR
741HOTSPOT_TOPDIR
742JAXWS_TOPDIR
743JAXP_TOPDIR
744CORBA_TOPDIR
745LANGTOOLS_TOPDIR
746BOOT_JDK_JVMARGS
747JAVAC_FLAGS
748BOOT_JDK_SOURCETARGET
749BOOT_JDK
750BOOT_TOOLSJAR
751BOOT_RTJAR
752JAVA_CHECK
753JAVAC_CHECK
754COOKED_BUILD_NUMBER
755JDK_VERSION
756COPYRIGHT_YEAR
757MACOSX_BUNDLE_ID_BASE
758MACOSX_BUNDLE_NAME_BASE
759COMPANY_NAME
760JDK_RC_PLATFORM_NAME
761PRODUCT_SUFFIX
762PRODUCT_NAME
763LAUNCHER_NAME
764MILESTONE
765JDK_BUILD_NUMBER
766JDK_UPDATE_VERSION
767JDK_MICRO_VERSION
768JDK_MINOR_VERSION
769JDK_MAJOR_VERSION
770USER_RELEASE_SUFFIX
771COMPRESS_JARS
772UNLIMITED_CRYPTO
773CACERTS_FILE
774TEST_IN_BUILD
775BUILD_HEADLESS
776SUPPORT_HEADFUL
777SUPPORT_HEADLESS
778BDEPS_FTP
779BDEPS_UNZIP
780OS_VERSION_MICRO
781OS_VERSION_MINOR
782OS_VERSION_MAJOR
783PKG_CONFIG
784TIME
785STAT
786HG
787READELF
788OTOOL
789LDD
790ZIP
791UNZIP
792FIND_DELETE
793MAKE
794CHECK_TOOLSDIR_MAKE
795CHECK_TOOLSDIR_GMAKE
796CHECK_MAKE
797CHECK_GMAKE
798PKGHANDLER
799OUTPUT_ROOT
800CONF_NAME
801SPEC
802BUILD_VARIANT_RELEASE
803DEBUG_CLASSFILES
804FASTDEBUG
805VARIANT
806DEBUG_LEVEL
807MACOSX_UNIVERSAL
808JVM_VARIANT_ZEROSHARK
809JVM_VARIANT_ZERO
810JVM_VARIANT_KERNEL
811JVM_VARIANT_MINIMAL1
812JVM_VARIANT_CLIENT
813JVM_VARIANT_SERVER
814JVM_VARIANTS
815JDK_VARIANT
816SET_OPENJDK
817BUILD_LOG_WRAPPER
818BUILD_LOG_PREVIOUS
819BUILD_LOG
820SYS_ROOT
821PATH_SEP
822SRC_ROOT
823DEFINE_CROSS_COMPILE_ARCH
824LP64
825OPENJDK_TARGET_OS_API_DIR
826OPENJDK_TARGET_CPU_JLI_CFLAGS
827OPENJDK_TARGET_CPU_OSARCH
828OPENJDK_TARGET_CPU_ISADIR
829OPENJDK_TARGET_CPU_LIBDIR
830OPENJDK_TARGET_CPU_LEGACY_LIB
831OPENJDK_TARGET_CPU_LEGACY
832REQUIRED_OS_VERSION
833REQUIRED_OS_NAME
834COMPILE_TYPE
835OPENJDK_TARGET_CPU_ENDIAN
836OPENJDK_TARGET_CPU_BITS
837OPENJDK_TARGET_CPU_ARCH
838OPENJDK_TARGET_CPU
839OPENJDK_TARGET_OS_API
840OPENJDK_TARGET_OS
841OPENJDK_BUILD_CPU_ENDIAN
842OPENJDK_BUILD_CPU_BITS
843OPENJDK_BUILD_CPU_ARCH
844OPENJDK_BUILD_CPU
845OPENJDK_BUILD_OS_API
846OPENJDK_BUILD_OS
847OPENJDK_BUILD_AUTOCONF_NAME
848OPENJDK_TARGET_AUTOCONF_NAME
849target_os
850target_vendor
851target_cpu
852target
853host_os
854host_vendor
855host_cpu
856host
857build_os
858build_vendor
859build_cpu
860build
861SETFILE
862DF
863READLINK
864CYGPATH
865NAWK
866SED
867FGREP
868EGREP
869GREP
870AWK
871XARGS
872WHICH
873WC
874UNIQ
875UNAME
876TR
877TOUCH
878TEE
879TAR
880TAIL
881SORT
882SH
883RM
884THEPWDCMD
885PRINTF
886MV
887MKTEMP
888MKDIR
889LS
890LN
891HEAD
892FIND
893FILE
894EXPR
895ECHO
896DIRNAME
897DIFF
898DATE
899CUT
900CPIO
901CP
902COMM
903CMP
904CHMOD
905CAT
906BASH
907BASENAME
908DATE_WHEN_CONFIGURED
909CONFIGURE_COMMAND_LINE
910CUSTOM_MAKE_DIR
911target_alias
912host_alias
913build_alias
914LIBS
915ECHO_T
916ECHO_N
917ECHO_C
918DEFS
919mandir
920localedir
921libdir
922psdir
923pdfdir
924dvidir
925htmldir
926infodir
927docdir
928oldincludedir
929includedir
930localstatedir
931sharedstatedir
932sysconfdir
933datadir
934datarootdir
935libexecdir
936sbindir
937bindir
938program_transform_name
939prefix
940exec_prefix
941PACKAGE_URL
942PACKAGE_BUGREPORT
943PACKAGE_STRING
944PACKAGE_VERSION
945PACKAGE_TARNAME
946PACKAGE_NAME
947PATH_SEPARATOR
948SHELL'
949ac_subst_files=''
950ac_user_opts='
951enable_option_checking
952with_custom_make_dir
953with_target_bits
954with_sys_root
955with_tools_dir
956with_devkit
957enable_openjdk_only
958with_jdk_variant
959with_jvm_variants
960enable_debug
961with_debug_level
962with_conf_name
963with_builddeps_conf
964with_builddeps_server
965with_builddeps_dir
966with_builddeps_group
967enable_headful
968enable_hotspot_test_in_build
969with_cacerts_file
970enable_unlimited_crypto
971with_milestone
972with_build_number
973with_user_release_suffix
974with_boot_jdk
975with_boot_jdk_jvmargs
976with_add_source_root
977with_override_source_root
978with_adds_and_overrides
979with_override_langtools
980with_override_corba
981with_override_jaxp
982with_override_jaxws
983with_override_hotspot
984with_override_jdk
985with_import_hotspot
986with_msvcr_dll
987with_extra_cflags
988with_extra_cxxflags
989with_extra_ldflags
990enable_debug_symbols
991enable_zip_debug_info
992enable_macosx_runtime_support
993with_x
994with_cups
995with_cups_include
996with_freetype
997with_alsa
998with_alsa_include
999with_alsa_lib
1000with_zlib
1001with_stdc__lib
1002with_num_cores
1003with_memory_size
1004with_sjavac_server_java
1005with_sjavac_server_cores
1006enable_sjavac
1007enable_precompiled_headers
1008enable_ccache
1009with_ccache_dir
1010'
1011      ac_precious_vars='build_alias
1012host_alias
1013target_alias
1014PKG_CONFIG
1015CC
1016CFLAGS
1017LDFLAGS
1018LIBS
1019CPPFLAGS
1020CXX
1021CXXFLAGS
1022CCC
1023OBJC
1024OBJCFLAGS
1025CPP
1026CXXCPP
1027XMKMF
1028FREETYPE2_CFLAGS
1029FREETYPE2_LIBS
1030ALSA_CFLAGS
1031ALSA_LIBS'
1032
1033
1034# Initialize some variables set by options.
1035ac_init_help=
1036ac_init_version=false
1037ac_unrecognized_opts=
1038ac_unrecognized_sep=
1039# The variables have the same names as the options, with
1040# dashes changed to underlines.
1041cache_file=/dev/null
1042exec_prefix=NONE
1043no_create=
1044no_recursion=
1045prefix=NONE
1046program_prefix=NONE
1047program_suffix=NONE
1048program_transform_name=s,x,x,
1049silent=
1050site=
1051srcdir=
1052verbose=
1053x_includes=NONE
1054x_libraries=NONE
1055
1056# Installation directory options.
1057# These are left unexpanded so users can "make install exec_prefix=/foo"
1058# and all the variables that are supposed to be based on exec_prefix
1059# by default will actually change.
1060# Use braces instead of parens because sh, perl, etc. also accept them.
1061# (The list follows the same order as the GNU Coding Standards.)
1062bindir='${exec_prefix}/bin'
1063sbindir='${exec_prefix}/sbin'
1064libexecdir='${exec_prefix}/libexec'
1065datarootdir='${prefix}/share'
1066datadir='${datarootdir}'
1067sysconfdir='${prefix}/etc'
1068sharedstatedir='${prefix}/com'
1069localstatedir='${prefix}/var'
1070includedir='${prefix}/include'
1071oldincludedir='/usr/include'
1072docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1073infodir='${datarootdir}/info'
1074htmldir='${docdir}'
1075dvidir='${docdir}'
1076pdfdir='${docdir}'
1077psdir='${docdir}'
1078libdir='${exec_prefix}/lib'
1079localedir='${datarootdir}/locale'
1080mandir='${datarootdir}/man'
1081
1082ac_prev=
1083ac_dashdash=
1084for ac_option
1085do
1086  # If the previous option needs an argument, assign it.
1087  if test -n "$ac_prev"; then
1088    eval $ac_prev=\$ac_option
1089    ac_prev=
1090    continue
1091  fi
1092
1093  case $ac_option in
1094  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1095  *=)   ac_optarg= ;;
1096  *)    ac_optarg=yes ;;
1097  esac
1098
1099  # Accept the important Cygnus configure options, so we can diagnose typos.
1100
1101  case $ac_dashdash$ac_option in
1102  --)
1103    ac_dashdash=yes ;;
1104
1105  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1106    ac_prev=bindir ;;
1107  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1108    bindir=$ac_optarg ;;
1109
1110  -build | --build | --buil | --bui | --bu)
1111    ac_prev=build_alias ;;
1112  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1113    build_alias=$ac_optarg ;;
1114
1115  -cache-file | --cache-file | --cache-fil | --cache-fi \
1116  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1117    ac_prev=cache_file ;;
1118  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1119  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1120    cache_file=$ac_optarg ;;
1121
1122  --config-cache | -C)
1123    cache_file=config.cache ;;
1124
1125  -datadir | --datadir | --datadi | --datad)
1126    ac_prev=datadir ;;
1127  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1128    datadir=$ac_optarg ;;
1129
1130  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1131  | --dataroo | --dataro | --datar)
1132    ac_prev=datarootdir ;;
1133  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1134  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1135    datarootdir=$ac_optarg ;;
1136
1137  -disable-* | --disable-*)
1138    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1139    # Reject names that are not valid shell variable names.
1140    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1141      as_fn_error $? "invalid feature name: $ac_useropt"
1142    ac_useropt_orig=$ac_useropt
1143    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1144    case $ac_user_opts in
1145      *"
1146"enable_$ac_useropt"
1147"*) ;;
1148      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1149	 ac_unrecognized_sep=', ';;
1150    esac
1151    eval enable_$ac_useropt=no ;;
1152
1153  -docdir | --docdir | --docdi | --doc | --do)
1154    ac_prev=docdir ;;
1155  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1156    docdir=$ac_optarg ;;
1157
1158  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1159    ac_prev=dvidir ;;
1160  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1161    dvidir=$ac_optarg ;;
1162
1163  -enable-* | --enable-*)
1164    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1165    # Reject names that are not valid shell variable names.
1166    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1167      as_fn_error $? "invalid feature name: $ac_useropt"
1168    ac_useropt_orig=$ac_useropt
1169    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1170    case $ac_user_opts in
1171      *"
1172"enable_$ac_useropt"
1173"*) ;;
1174      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1175	 ac_unrecognized_sep=', ';;
1176    esac
1177    eval enable_$ac_useropt=\$ac_optarg ;;
1178
1179  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1180  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1181  | --exec | --exe | --ex)
1182    ac_prev=exec_prefix ;;
1183  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1184  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1185  | --exec=* | --exe=* | --ex=*)
1186    exec_prefix=$ac_optarg ;;
1187
1188  -gas | --gas | --ga | --g)
1189    # Obsolete; use --with-gas.
1190    with_gas=yes ;;
1191
1192  -help | --help | --hel | --he | -h)
1193    ac_init_help=long ;;
1194  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1195    ac_init_help=recursive ;;
1196  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1197    ac_init_help=short ;;
1198
1199  -host | --host | --hos | --ho)
1200    ac_prev=host_alias ;;
1201  -host=* | --host=* | --hos=* | --ho=*)
1202    host_alias=$ac_optarg ;;
1203
1204  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1205    ac_prev=htmldir ;;
1206  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1207  | --ht=*)
1208    htmldir=$ac_optarg ;;
1209
1210  -includedir | --includedir | --includedi | --included | --include \
1211  | --includ | --inclu | --incl | --inc)
1212    ac_prev=includedir ;;
1213  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1214  | --includ=* | --inclu=* | --incl=* | --inc=*)
1215    includedir=$ac_optarg ;;
1216
1217  -infodir | --infodir | --infodi | --infod | --info | --inf)
1218    ac_prev=infodir ;;
1219  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1220    infodir=$ac_optarg ;;
1221
1222  -libdir | --libdir | --libdi | --libd)
1223    ac_prev=libdir ;;
1224  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1225    libdir=$ac_optarg ;;
1226
1227  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1228  | --libexe | --libex | --libe)
1229    ac_prev=libexecdir ;;
1230  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1231  | --libexe=* | --libex=* | --libe=*)
1232    libexecdir=$ac_optarg ;;
1233
1234  -localedir | --localedir | --localedi | --localed | --locale)
1235    ac_prev=localedir ;;
1236  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1237    localedir=$ac_optarg ;;
1238
1239  -localstatedir | --localstatedir | --localstatedi | --localstated \
1240  | --localstate | --localstat | --localsta | --localst | --locals)
1241    ac_prev=localstatedir ;;
1242  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1243  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1244    localstatedir=$ac_optarg ;;
1245
1246  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1247    ac_prev=mandir ;;
1248  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1249    mandir=$ac_optarg ;;
1250
1251  -nfp | --nfp | --nf)
1252    # Obsolete; use --without-fp.
1253    with_fp=no ;;
1254
1255  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1256  | --no-cr | --no-c | -n)
1257    no_create=yes ;;
1258
1259  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1260  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1261    no_recursion=yes ;;
1262
1263  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1264  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1265  | --oldin | --oldi | --old | --ol | --o)
1266    ac_prev=oldincludedir ;;
1267  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1268  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1269  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1270    oldincludedir=$ac_optarg ;;
1271
1272  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1273    ac_prev=prefix ;;
1274  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1275    prefix=$ac_optarg ;;
1276
1277  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1278  | --program-pre | --program-pr | --program-p)
1279    ac_prev=program_prefix ;;
1280  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1281  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1282    program_prefix=$ac_optarg ;;
1283
1284  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1285  | --program-suf | --program-su | --program-s)
1286    ac_prev=program_suffix ;;
1287  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1288  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1289    program_suffix=$ac_optarg ;;
1290
1291  -program-transform-name | --program-transform-name \
1292  | --program-transform-nam | --program-transform-na \
1293  | --program-transform-n | --program-transform- \
1294  | --program-transform | --program-transfor \
1295  | --program-transfo | --program-transf \
1296  | --program-trans | --program-tran \
1297  | --progr-tra | --program-tr | --program-t)
1298    ac_prev=program_transform_name ;;
1299  -program-transform-name=* | --program-transform-name=* \
1300  | --program-transform-nam=* | --program-transform-na=* \
1301  | --program-transform-n=* | --program-transform-=* \
1302  | --program-transform=* | --program-transfor=* \
1303  | --program-transfo=* | --program-transf=* \
1304  | --program-trans=* | --program-tran=* \
1305  | --progr-tra=* | --program-tr=* | --program-t=*)
1306    program_transform_name=$ac_optarg ;;
1307
1308  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1309    ac_prev=pdfdir ;;
1310  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1311    pdfdir=$ac_optarg ;;
1312
1313  -psdir | --psdir | --psdi | --psd | --ps)
1314    ac_prev=psdir ;;
1315  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1316    psdir=$ac_optarg ;;
1317
1318  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1319  | -silent | --silent | --silen | --sile | --sil)
1320    silent=yes ;;
1321
1322  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1323    ac_prev=sbindir ;;
1324  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1325  | --sbi=* | --sb=*)
1326    sbindir=$ac_optarg ;;
1327
1328  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1329  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1330  | --sharedst | --shareds | --shared | --share | --shar \
1331  | --sha | --sh)
1332    ac_prev=sharedstatedir ;;
1333  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1334  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1335  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1336  | --sha=* | --sh=*)
1337    sharedstatedir=$ac_optarg ;;
1338
1339  -site | --site | --sit)
1340    ac_prev=site ;;
1341  -site=* | --site=* | --sit=*)
1342    site=$ac_optarg ;;
1343
1344  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1345    ac_prev=srcdir ;;
1346  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1347    srcdir=$ac_optarg ;;
1348
1349  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1350  | --syscon | --sysco | --sysc | --sys | --sy)
1351    ac_prev=sysconfdir ;;
1352  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1353  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1354    sysconfdir=$ac_optarg ;;
1355
1356  -target | --target | --targe | --targ | --tar | --ta | --t)
1357    ac_prev=target_alias ;;
1358  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1359    target_alias=$ac_optarg ;;
1360
1361  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1362    verbose=yes ;;
1363
1364  -version | --version | --versio | --versi | --vers | -V)
1365    ac_init_version=: ;;
1366
1367  -with-* | --with-*)
1368    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1369    # Reject names that are not valid shell variable names.
1370    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1371      as_fn_error $? "invalid package name: $ac_useropt"
1372    ac_useropt_orig=$ac_useropt
1373    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1374    case $ac_user_opts in
1375      *"
1376"with_$ac_useropt"
1377"*) ;;
1378      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1379	 ac_unrecognized_sep=', ';;
1380    esac
1381    eval with_$ac_useropt=\$ac_optarg ;;
1382
1383  -without-* | --without-*)
1384    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1385    # Reject names that are not valid shell variable names.
1386    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1387      as_fn_error $? "invalid package name: $ac_useropt"
1388    ac_useropt_orig=$ac_useropt
1389    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1390    case $ac_user_opts in
1391      *"
1392"with_$ac_useropt"
1393"*) ;;
1394      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1395	 ac_unrecognized_sep=', ';;
1396    esac
1397    eval with_$ac_useropt=no ;;
1398
1399  --x)
1400    # Obsolete; use --with-x.
1401    with_x=yes ;;
1402
1403  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1404  | --x-incl | --x-inc | --x-in | --x-i)
1405    ac_prev=x_includes ;;
1406  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1407  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1408    x_includes=$ac_optarg ;;
1409
1410  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1411  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1412    ac_prev=x_libraries ;;
1413  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1414  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1415    x_libraries=$ac_optarg ;;
1416
1417  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1418Try \`$0 --help' for more information"
1419    ;;
1420
1421  *=*)
1422    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1423    # Reject names that are not valid shell variable names.
1424    case $ac_envvar in #(
1425      '' | [0-9]* | *[!_$as_cr_alnum]* )
1426      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1427    esac
1428    eval $ac_envvar=\$ac_optarg
1429    export $ac_envvar ;;
1430
1431  *)
1432    # FIXME: should be removed in autoconf 3.0.
1433    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1434    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1435      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1436    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1437    ;;
1438
1439  esac
1440done
1441
1442if test -n "$ac_prev"; then
1443  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1444  as_fn_error $? "missing argument to $ac_option"
1445fi
1446
1447if test -n "$ac_unrecognized_opts"; then
1448  case $enable_option_checking in
1449    no) ;;
1450    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1451    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1452  esac
1453fi
1454
1455# Check all directory arguments for consistency.
1456for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1457		datadir sysconfdir sharedstatedir localstatedir includedir \
1458		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1459		libdir localedir mandir
1460do
1461  eval ac_val=\$$ac_var
1462  # Remove trailing slashes.
1463  case $ac_val in
1464    */ )
1465      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1466      eval $ac_var=\$ac_val;;
1467  esac
1468  # Be sure to have absolute directory names.
1469  case $ac_val in
1470    [\\/$]* | ?:[\\/]* )  continue;;
1471    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1472  esac
1473  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1474done
1475
1476# There might be people who depend on the old broken behavior: `$host'
1477# used to hold the argument of --host etc.
1478# FIXME: To remove some day.
1479build=$build_alias
1480host=$host_alias
1481target=$target_alias
1482
1483# FIXME: To remove some day.
1484if test "x$host_alias" != x; then
1485  if test "x$build_alias" = x; then
1486    cross_compiling=maybe
1487    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1488    If a cross compiler is detected then cross compile mode will be used" >&2
1489  elif test "x$build_alias" != "x$host_alias"; then
1490    cross_compiling=yes
1491  fi
1492fi
1493
1494ac_tool_prefix=
1495test -n "$host_alias" && ac_tool_prefix=$host_alias-
1496
1497test "$silent" = yes && exec 6>/dev/null
1498
1499
1500ac_pwd=`pwd` && test -n "$ac_pwd" &&
1501ac_ls_di=`ls -di .` &&
1502ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1503  as_fn_error $? "working directory cannot be determined"
1504test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1505  as_fn_error $? "pwd does not report name of working directory"
1506
1507
1508# Find the source files, if location was not specified.
1509if test -z "$srcdir"; then
1510  ac_srcdir_defaulted=yes
1511  # Try the directory containing this script, then the parent directory.
1512  ac_confdir=`$as_dirname -- "$as_myself" ||
1513$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1514	 X"$as_myself" : 'X\(//\)[^/]' \| \
1515	 X"$as_myself" : 'X\(//\)$' \| \
1516	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1517$as_echo X"$as_myself" |
1518    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1519	    s//\1/
1520	    q
1521	  }
1522	  /^X\(\/\/\)[^/].*/{
1523	    s//\1/
1524	    q
1525	  }
1526	  /^X\(\/\/\)$/{
1527	    s//\1/
1528	    q
1529	  }
1530	  /^X\(\/\).*/{
1531	    s//\1/
1532	    q
1533	  }
1534	  s/.*/./; q'`
1535  srcdir=$ac_confdir
1536  if test ! -r "$srcdir/$ac_unique_file"; then
1537    srcdir=..
1538  fi
1539else
1540  ac_srcdir_defaulted=no
1541fi
1542if test ! -r "$srcdir/$ac_unique_file"; then
1543  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1544  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1545fi
1546ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1547ac_abs_confdir=`(
1548	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1549	pwd)`
1550# When building in place, set srcdir=.
1551if test "$ac_abs_confdir" = "$ac_pwd"; then
1552  srcdir=.
1553fi
1554# Remove unnecessary trailing slashes from srcdir.
1555# Double slashes in file names in object file debugging info
1556# mess up M-x gdb in Emacs.
1557case $srcdir in
1558*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1559esac
1560for ac_var in $ac_precious_vars; do
1561  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1562  eval ac_env_${ac_var}_value=\$${ac_var}
1563  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1564  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1565done
1566
1567#
1568# Report the --help message.
1569#
1570if test "$ac_init_help" = "long"; then
1571  # Omit some internal or obsolete options to make the list less imposing.
1572  # This message is too long to be a string in the A/UX 3.1 sh.
1573  cat <<_ACEOF
1574\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1575
1576Usage: $0 [OPTION]... [VAR=VALUE]...
1577
1578To assign environment variables (e.g., CC, CFLAGS...), specify them as
1579VAR=VALUE.  See below for descriptions of some of the useful variables.
1580
1581Defaults for the options are specified in brackets.
1582
1583Configuration:
1584  -h, --help              display this help and exit
1585      --help=short        display options specific to this package
1586      --help=recursive    display the short help of all the included packages
1587  -V, --version           display version information and exit
1588  -q, --quiet, --silent   do not print \`checking ...' messages
1589      --cache-file=FILE   cache test results in FILE [disabled]
1590  -C, --config-cache      alias for \`--cache-file=config.cache'
1591  -n, --no-create         do not create output files
1592      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1593
1594Installation directories:
1595  --prefix=PREFIX         install architecture-independent files in PREFIX
1596                          [$ac_default_prefix]
1597  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1598                          [PREFIX]
1599
1600By default, \`make install' will install all the files in
1601\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1602an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1603for instance \`--prefix=\$HOME'.
1604
1605For better control, use the options below.
1606
1607Fine tuning of the installation directories:
1608  --bindir=DIR            user executables [EPREFIX/bin]
1609  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1610  --libexecdir=DIR        program executables [EPREFIX/libexec]
1611  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1612  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1613  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1614  --libdir=DIR            object code libraries [EPREFIX/lib]
1615  --includedir=DIR        C header files [PREFIX/include]
1616  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1617  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1618  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1619  --infodir=DIR           info documentation [DATAROOTDIR/info]
1620  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1621  --mandir=DIR            man documentation [DATAROOTDIR/man]
1622  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1623  --htmldir=DIR           html documentation [DOCDIR]
1624  --dvidir=DIR            dvi documentation [DOCDIR]
1625  --pdfdir=DIR            pdf documentation [DOCDIR]
1626  --psdir=DIR             ps documentation [DOCDIR]
1627_ACEOF
1628
1629  cat <<\_ACEOF
1630
1631X features:
1632  --x-includes=DIR    X include files are in DIR
1633  --x-libraries=DIR   X library files are in DIR
1634
1635System types:
1636  --build=BUILD     configure for building on BUILD [guessed]
1637  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1638  --target=TARGET   configure for building compilers for TARGET [HOST]
1639_ACEOF
1640fi
1641
1642if test -n "$ac_init_help"; then
1643  case $ac_init_help in
1644     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1645   esac
1646  cat <<\_ACEOF
1647
1648Optional Features:
1649  --disable-option-checking  ignore unrecognized --enable/--with options
1650  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1651  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1652  --enable-openjdk-only   suppress building custom source even if present
1653                          [disabled]
1654  --enable-debug          set the debug level to fastdebug (shorthand for
1655                          --with-debug-level=fastdebug) [disabled]
1656  --disable-headful       disable building headful support (graphical UI
1657                          support) [enabled]
1658  --enable-hotspot-test-in-build
1659                          run the Queens test after Hotspot build [disabled]
1660  --enable-unlimited-crypto
1661                          Enable unlimited crypto policy [disabled]
1662  --disable-debug-symbols disable generation of debug symbols [enabled]
1663  --disable-zip-debug-info
1664                          disable zipping of debug-info files [enabled]
1665  --disable-macosx-runtime-support
1666                          disable the use of MacOSX Java runtime support
1667                          framework [enabled]
1668  --enable-sjavac         use sjavac to do fast incremental compiles
1669                          [disabled]
1670  --disable-precompiled-headers
1671                          disable using precompiled headers when compiling C++
1672                          [enabled]
1673  --disable-ccache        disable using ccache to speed up recompilations
1674                          [enabled]
1675
1676Optional Packages:
1677  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1678  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1679  --with-custom-make-dir  use this directory for custom build/make files
1680  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1681                          support it), e.g. --with-target-bits=32 [guessed]
1682  --with-sys-root         pass this sys-root to the compilers and tools (for
1683                          cross-compiling)
1684  --with-tools-dir        search this directory for compilers and tools (for
1685                          cross-compiling)
1686  --with-devkit           use this directory as base for tools-dir and
1687                          sys-root (for cross-compiling)
1688  --with-jdk-variant      JDK variant to build (normal) [normal]
1689  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1690                          client, minimal1, kernel, zero, zeroshark) [server]
1691  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1692                          [release]
1693  --with-conf-name        use this as the name of the configuration [generated
1694                          from important configuration options]
1695  --with-builddeps-conf   use this configuration file for the builddeps
1696  --with-builddeps-server download and use build dependencies from this server
1697                          url
1698  --with-builddeps-dir    store downloaded build dependencies here
1699                          [/localhome/builddeps]
1700  --with-builddeps-group  chgrp the downloaded build dependencies to this
1701                          group
1702  --with-cacerts-file     specify alternative cacerts file
1703  --with-milestone        Set milestone value for build [internal]
1704  --with-build-number     Set build number value for build [b00]
1705  --with-user-release-suffix
1706                          Add a custom string to the version string if build
1707                          number isn't set.[username_builddateb00]
1708  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1709  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1710                          invocations of the Boot JDK, overriding the default
1711                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1712                          -enableassertions"
1713  --with-add-source-root  for each and every source directory, look in this
1714                          additional source root for the same directory; if it
1715                          exists and have files in it, include it in the build
1716  --with-override-source-root
1717                          for each and every source directory, look in this
1718                          override source root for the same directory; if it
1719                          exists, use that directory instead and ignore the
1720                          directory in the original source root
1721  --with-adds-and-overrides
1722                          use the subdirs 'adds' and 'overrides' in the
1723                          specified directory as add-source-root and
1724                          override-source-root
1725  --with-override-langtools
1726                          use this langtools dir for the build
1727  --with-override-corba   use this corba dir for the build
1728  --with-override-jaxp    use this jaxp dir for the build
1729  --with-override-jaxws   use this jaxws dir for the build
1730  --with-override-hotspot use this hotspot dir for the build
1731  --with-override-jdk     use this jdk dir for the build
1732  --with-import-hotspot   import hotspot binaries from this jdk image or
1733                          hotspot build dist dir instead of building from
1734                          source
1735  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1736                          only) [probed]
1737  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1738  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1739  --with-extra-ldflags    extra flags to be used when linking jdk
1740  --with-x                use the X Window System
1741  --with-cups             specify prefix directory for the cups package
1742                          (expecting the headers under PATH/include)
1743  --with-cups-include     specify directory for the cups include files
1744  --with-freetype         specify prefix directory for the freetype2 package
1745                          (expecting the libraries under PATH/lib and the
1746                          headers under PATH/include)
1747  --with-alsa             specify prefix directory for the alsa package
1748                          (expecting the libraries under PATH/lib and the
1749                          headers under PATH/include)
1750  --with-alsa-include     specify directory for the alsa include files
1751  --with-alsa-lib         specify directory for the alsa library
1752  --with-zlib             use zlib from build system or OpenJDK source
1753                          (system, bundled) [bundled]
1754  --with-stdc++lib=<static>,<dynamic>,<default>
1755                          force linking of the C++ runtime on Linux to either
1756                          static or dynamic, default is static with dynamic as
1757                          fallback
1758  --with-num-cores        number of cores in the build system, e.g.
1759                          --with-num-cores=8 [probed]
1760  --with-memory-size      memory (in MB) available in the build system, e.g.
1761                          --with-memory-size=1024 [probed]
1762  --with-sjavac-server-java
1763                          use this java binary for running the sjavac
1764                          background server [Boot JDK java]
1765  --with-sjavac-server-cores
1766                          use at most this number of concurrent threads on the
1767                          sjavac server [probed]
1768  --with-ccache-dir       where to store ccache files [~/.ccache]
1769
1770Some influential environment variables:
1771  PKG_CONFIG  path to pkg-config utility
1772  CC          C compiler command
1773  CFLAGS      C compiler flags
1774  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1775              nonstandard directory <lib dir>
1776  LIBS        libraries to pass to the linker, e.g. -l<library>
1777  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1778              you have headers in a nonstandard directory <include dir>
1779  CXX         C++ compiler command
1780  CXXFLAGS    C++ compiler flags
1781  OBJC        Objective C compiler command
1782  OBJCFLAGS   Objective C compiler flags
1783  CPP         C preprocessor
1784  CXXCPP      C++ preprocessor
1785  XMKMF       Path to xmkmf, Makefile generator for X Window System
1786  FREETYPE2_CFLAGS
1787              C compiler flags for FREETYPE2, overriding pkg-config
1788  FREETYPE2_LIBS
1789              linker flags for FREETYPE2, overriding pkg-config
1790  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1791  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1792
1793Use these variables to override the choices made by `configure' or to help
1794it to find libraries and programs with nonstandard names/locations.
1795
1796Report bugs to <build-dev@openjdk.java.net>.
1797OpenJDK home page: <http://openjdk.java.net>.
1798_ACEOF
1799ac_status=$?
1800fi
1801
1802if test "$ac_init_help" = "recursive"; then
1803  # If there are subdirs, report their specific --help.
1804  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1805    test -d "$ac_dir" ||
1806      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1807      continue
1808    ac_builddir=.
1809
1810case "$ac_dir" in
1811.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1812*)
1813  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1814  # A ".." for each directory in $ac_dir_suffix.
1815  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1816  case $ac_top_builddir_sub in
1817  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1818  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1819  esac ;;
1820esac
1821ac_abs_top_builddir=$ac_pwd
1822ac_abs_builddir=$ac_pwd$ac_dir_suffix
1823# for backward compatibility:
1824ac_top_builddir=$ac_top_build_prefix
1825
1826case $srcdir in
1827  .)  # We are building in place.
1828    ac_srcdir=.
1829    ac_top_srcdir=$ac_top_builddir_sub
1830    ac_abs_top_srcdir=$ac_pwd ;;
1831  [\\/]* | ?:[\\/]* )  # Absolute name.
1832    ac_srcdir=$srcdir$ac_dir_suffix;
1833    ac_top_srcdir=$srcdir
1834    ac_abs_top_srcdir=$srcdir ;;
1835  *) # Relative name.
1836    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1837    ac_top_srcdir=$ac_top_build_prefix$srcdir
1838    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1839esac
1840ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1841
1842    cd "$ac_dir" || { ac_status=$?; continue; }
1843    # Check for guested configure.
1844    if test -f "$ac_srcdir/configure.gnu"; then
1845      echo &&
1846      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1847    elif test -f "$ac_srcdir/configure"; then
1848      echo &&
1849      $SHELL "$ac_srcdir/configure" --help=recursive
1850    else
1851      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1852    fi || ac_status=$?
1853    cd "$ac_pwd" || { ac_status=$?; break; }
1854  done
1855fi
1856
1857test -n "$ac_init_help" && exit $ac_status
1858if $ac_init_version; then
1859  cat <<\_ACEOF
1860OpenJDK configure jdk8
1861generated by GNU Autoconf 2.67
1862
1863Copyright (C) 2010 Free Software Foundation, Inc.
1864This configure script is free software; the Free Software Foundation
1865gives unlimited permission to copy, distribute and modify it.
1866_ACEOF
1867  exit
1868fi
1869
1870## ------------------------ ##
1871## Autoconf initialization. ##
1872## ------------------------ ##
1873
1874# ac_fn_c_try_compile LINENO
1875# --------------------------
1876# Try to compile conftest.$ac_ext, and return whether this succeeded.
1877ac_fn_c_try_compile ()
1878{
1879  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1880  rm -f conftest.$ac_objext
1881  if { { ac_try="$ac_compile"
1882case "(($ac_try" in
1883  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884  *) ac_try_echo=$ac_try;;
1885esac
1886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887$as_echo "$ac_try_echo"; } >&5
1888  (eval "$ac_compile") 2>conftest.err
1889  ac_status=$?
1890  if test -s conftest.err; then
1891    grep -v '^ *+' conftest.err >conftest.er1
1892    cat conftest.er1 >&5
1893    mv -f conftest.er1 conftest.err
1894  fi
1895  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1896  test $ac_status = 0; } && {
1897	 test -z "$ac_c_werror_flag" ||
1898	 test ! -s conftest.err
1899       } && test -s conftest.$ac_objext; then :
1900  ac_retval=0
1901else
1902  $as_echo "$as_me: failed program was:" >&5
1903sed 's/^/| /' conftest.$ac_ext >&5
1904
1905	ac_retval=1
1906fi
1907  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1908  as_fn_set_status $ac_retval
1909
1910} # ac_fn_c_try_compile
1911
1912# ac_fn_cxx_try_compile LINENO
1913# ----------------------------
1914# Try to compile conftest.$ac_ext, and return whether this succeeded.
1915ac_fn_cxx_try_compile ()
1916{
1917  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918  rm -f conftest.$ac_objext
1919  if { { ac_try="$ac_compile"
1920case "(($ac_try" in
1921  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922  *) ac_try_echo=$ac_try;;
1923esac
1924eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925$as_echo "$ac_try_echo"; } >&5
1926  (eval "$ac_compile") 2>conftest.err
1927  ac_status=$?
1928  if test -s conftest.err; then
1929    grep -v '^ *+' conftest.err >conftest.er1
1930    cat conftest.er1 >&5
1931    mv -f conftest.er1 conftest.err
1932  fi
1933  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934  test $ac_status = 0; } && {
1935	 test -z "$ac_cxx_werror_flag" ||
1936	 test ! -s conftest.err
1937       } && test -s conftest.$ac_objext; then :
1938  ac_retval=0
1939else
1940  $as_echo "$as_me: failed program was:" >&5
1941sed 's/^/| /' conftest.$ac_ext >&5
1942
1943	ac_retval=1
1944fi
1945  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946  as_fn_set_status $ac_retval
1947
1948} # ac_fn_cxx_try_compile
1949
1950# ac_fn_objc_try_compile LINENO
1951# -----------------------------
1952# Try to compile conftest.$ac_ext, and return whether this succeeded.
1953ac_fn_objc_try_compile ()
1954{
1955  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956  rm -f conftest.$ac_objext
1957  if { { ac_try="$ac_compile"
1958case "(($ac_try" in
1959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960  *) ac_try_echo=$ac_try;;
1961esac
1962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963$as_echo "$ac_try_echo"; } >&5
1964  (eval "$ac_compile") 2>conftest.err
1965  ac_status=$?
1966  if test -s conftest.err; then
1967    grep -v '^ *+' conftest.err >conftest.er1
1968    cat conftest.er1 >&5
1969    mv -f conftest.er1 conftest.err
1970  fi
1971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972  test $ac_status = 0; } && {
1973	 test -z "$ac_objc_werror_flag" ||
1974	 test ! -s conftest.err
1975       } && test -s conftest.$ac_objext; then :
1976  ac_retval=0
1977else
1978  $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
1980
1981	ac_retval=1
1982fi
1983  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984  as_fn_set_status $ac_retval
1985
1986} # ac_fn_objc_try_compile
1987
1988# ac_fn_c_try_cpp LINENO
1989# ----------------------
1990# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1991ac_fn_c_try_cpp ()
1992{
1993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994  if { { ac_try="$ac_cpp conftest.$ac_ext"
1995case "(($ac_try" in
1996  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1997  *) ac_try_echo=$ac_try;;
1998esac
1999eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2000$as_echo "$ac_try_echo"; } >&5
2001  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2002  ac_status=$?
2003  if test -s conftest.err; then
2004    grep -v '^ *+' conftest.err >conftest.er1
2005    cat conftest.er1 >&5
2006    mv -f conftest.er1 conftest.err
2007  fi
2008  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2009  test $ac_status = 0; } > conftest.i && {
2010	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2011	 test ! -s conftest.err
2012       }; then :
2013  ac_retval=0
2014else
2015  $as_echo "$as_me: failed program was:" >&5
2016sed 's/^/| /' conftest.$ac_ext >&5
2017
2018    ac_retval=1
2019fi
2020  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2021  as_fn_set_status $ac_retval
2022
2023} # ac_fn_c_try_cpp
2024
2025# ac_fn_cxx_try_cpp LINENO
2026# ------------------------
2027# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2028ac_fn_cxx_try_cpp ()
2029{
2030  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031  if { { ac_try="$ac_cpp conftest.$ac_ext"
2032case "(($ac_try" in
2033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2034  *) ac_try_echo=$ac_try;;
2035esac
2036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2037$as_echo "$ac_try_echo"; } >&5
2038  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2039  ac_status=$?
2040  if test -s conftest.err; then
2041    grep -v '^ *+' conftest.err >conftest.er1
2042    cat conftest.er1 >&5
2043    mv -f conftest.er1 conftest.err
2044  fi
2045  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2046  test $ac_status = 0; } > conftest.i && {
2047	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2048	 test ! -s conftest.err
2049       }; then :
2050  ac_retval=0
2051else
2052  $as_echo "$as_me: failed program was:" >&5
2053sed 's/^/| /' conftest.$ac_ext >&5
2054
2055    ac_retval=1
2056fi
2057  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2058  as_fn_set_status $ac_retval
2059
2060} # ac_fn_cxx_try_cpp
2061
2062# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2063# ---------------------------------------------------------
2064# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2065# the include files in INCLUDES and setting the cache variable VAR
2066# accordingly.
2067ac_fn_cxx_check_header_mongrel ()
2068{
2069  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2070  if eval "test \"\${$3+set}\"" = set; then :
2071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2072$as_echo_n "checking for $2... " >&6; }
2073if eval "test \"\${$3+set}\"" = set; then :
2074  $as_echo_n "(cached) " >&6
2075fi
2076eval ac_res=\$$3
2077	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2078$as_echo "$ac_res" >&6; }
2079else
2080  # Is the header compilable?
2081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2082$as_echo_n "checking $2 usability... " >&6; }
2083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h.  */
2085$4
2086#include <$2>
2087_ACEOF
2088if ac_fn_cxx_try_compile "$LINENO"; then :
2089  ac_header_compiler=yes
2090else
2091  ac_header_compiler=no
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2095$as_echo "$ac_header_compiler" >&6; }
2096
2097# Is the header present?
2098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2099$as_echo_n "checking $2 presence... " >&6; }
2100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h.  */
2102#include <$2>
2103_ACEOF
2104if ac_fn_cxx_try_cpp "$LINENO"; then :
2105  ac_header_preproc=yes
2106else
2107  ac_header_preproc=no
2108fi
2109rm -f conftest.err conftest.i conftest.$ac_ext
2110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2111$as_echo "$ac_header_preproc" >&6; }
2112
2113# So?  What about this header?
2114case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2115  yes:no: )
2116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2117$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2119$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2120    ;;
2121  no:yes:* )
2122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2123$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2124    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2125$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2126    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2127$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2128    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2129$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2130    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2131$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2132( $as_echo "## ----------------------------------------- ##
2133## Report this to build-dev@openjdk.java.net ##
2134## ----------------------------------------- ##"
2135     ) | sed "s/^/$as_me: WARNING:     /" >&2
2136    ;;
2137esac
2138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2139$as_echo_n "checking for $2... " >&6; }
2140if eval "test \"\${$3+set}\"" = set; then :
2141  $as_echo_n "(cached) " >&6
2142else
2143  eval "$3=\$ac_header_compiler"
2144fi
2145eval ac_res=\$$3
2146	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2147$as_echo "$ac_res" >&6; }
2148fi
2149  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2150
2151} # ac_fn_cxx_check_header_mongrel
2152
2153# ac_fn_cxx_try_run LINENO
2154# ------------------------
2155# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2156# that executables *can* be run.
2157ac_fn_cxx_try_run ()
2158{
2159  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2160  if { { ac_try="$ac_link"
2161case "(($ac_try" in
2162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2163  *) ac_try_echo=$ac_try;;
2164esac
2165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2166$as_echo "$ac_try_echo"; } >&5
2167  (eval "$ac_link") 2>&5
2168  ac_status=$?
2169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2170  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2171  { { case "(($ac_try" in
2172  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2173  *) ac_try_echo=$ac_try;;
2174esac
2175eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2176$as_echo "$ac_try_echo"; } >&5
2177  (eval "$ac_try") 2>&5
2178  ac_status=$?
2179  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2180  test $ac_status = 0; }; }; then :
2181  ac_retval=0
2182else
2183  $as_echo "$as_me: program exited with status $ac_status" >&5
2184       $as_echo "$as_me: failed program was:" >&5
2185sed 's/^/| /' conftest.$ac_ext >&5
2186
2187       ac_retval=$ac_status
2188fi
2189  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2190  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2191  as_fn_set_status $ac_retval
2192
2193} # ac_fn_cxx_try_run
2194
2195# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2196# ---------------------------------------------------------
2197# Tests whether HEADER exists and can be compiled using the include files in
2198# INCLUDES, setting the cache variable VAR accordingly.
2199ac_fn_cxx_check_header_compile ()
2200{
2201  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2203$as_echo_n "checking for $2... " >&6; }
2204if eval "test \"\${$3+set}\"" = set; then :
2205  $as_echo_n "(cached) " >&6
2206else
2207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2208/* end confdefs.h.  */
2209$4
2210#include <$2>
2211_ACEOF
2212if ac_fn_cxx_try_compile "$LINENO"; then :
2213  eval "$3=yes"
2214else
2215  eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218fi
2219eval ac_res=\$$3
2220	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2221$as_echo "$ac_res" >&6; }
2222  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2223
2224} # ac_fn_cxx_check_header_compile
2225
2226# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2227# ----------------------------------------------
2228# Tries to find the compile-time value of EXPR in a program that includes
2229# INCLUDES, setting VAR accordingly. Returns whether the value could be
2230# computed
2231ac_fn_cxx_compute_int ()
2232{
2233  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234  if test "$cross_compiling" = yes; then
2235    # Depending upon the size, compute the lo and hi bounds.
2236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2237/* end confdefs.h.  */
2238$4
2239int
2240main ()
2241{
2242static int test_array [1 - 2 * !(($2) >= 0)];
2243test_array [0] = 0
2244
2245  ;
2246  return 0;
2247}
2248_ACEOF
2249if ac_fn_cxx_try_compile "$LINENO"; then :
2250  ac_lo=0 ac_mid=0
2251  while :; do
2252    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h.  */
2254$4
2255int
2256main ()
2257{
2258static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2259test_array [0] = 0
2260
2261  ;
2262  return 0;
2263}
2264_ACEOF
2265if ac_fn_cxx_try_compile "$LINENO"; then :
2266  ac_hi=$ac_mid; break
2267else
2268  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2269			if test $ac_lo -le $ac_mid; then
2270			  ac_lo= ac_hi=
2271			  break
2272			fi
2273			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276  done
2277else
2278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279/* end confdefs.h.  */
2280$4
2281int
2282main ()
2283{
2284static int test_array [1 - 2 * !(($2) < 0)];
2285test_array [0] = 0
2286
2287  ;
2288  return 0;
2289}
2290_ACEOF
2291if ac_fn_cxx_try_compile "$LINENO"; then :
2292  ac_hi=-1 ac_mid=-1
2293  while :; do
2294    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h.  */
2296$4
2297int
2298main ()
2299{
2300static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2301test_array [0] = 0
2302
2303  ;
2304  return 0;
2305}
2306_ACEOF
2307if ac_fn_cxx_try_compile "$LINENO"; then :
2308  ac_lo=$ac_mid; break
2309else
2310  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2311			if test $ac_mid -le $ac_hi; then
2312			  ac_lo= ac_hi=
2313			  break
2314			fi
2315			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2316fi
2317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318  done
2319else
2320  ac_lo= ac_hi=
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325# Binary search between lo and hi bounds.
2326while test "x$ac_lo" != "x$ac_hi"; do
2327  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h.  */
2330$4
2331int
2332main ()
2333{
2334static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2335test_array [0] = 0
2336
2337  ;
2338  return 0;
2339}
2340_ACEOF
2341if ac_fn_cxx_try_compile "$LINENO"; then :
2342  ac_hi=$ac_mid
2343else
2344  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2345fi
2346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347done
2348case $ac_lo in #((
2349?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2350'') ac_retval=1 ;;
2351esac
2352  else
2353    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h.  */
2355$4
2356static long int longval () { return $2; }
2357static unsigned long int ulongval () { return $2; }
2358#include <stdio.h>
2359#include <stdlib.h>
2360int
2361main ()
2362{
2363
2364  FILE *f = fopen ("conftest.val", "w");
2365  if (! f)
2366    return 1;
2367  if (($2) < 0)
2368    {
2369      long int i = longval ();
2370      if (i != ($2))
2371	return 1;
2372      fprintf (f, "%ld", i);
2373    }
2374  else
2375    {
2376      unsigned long int i = ulongval ();
2377      if (i != ($2))
2378	return 1;
2379      fprintf (f, "%lu", i);
2380    }
2381  /* Do not output a trailing newline, as this causes \r\n confusion
2382     on some platforms.  */
2383  return ferror (f) || fclose (f) != 0;
2384
2385  ;
2386  return 0;
2387}
2388_ACEOF
2389if ac_fn_cxx_try_run "$LINENO"; then :
2390  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2391else
2392  ac_retval=1
2393fi
2394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2395  conftest.$ac_objext conftest.beam conftest.$ac_ext
2396rm -f conftest.val
2397
2398  fi
2399  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2400  as_fn_set_status $ac_retval
2401
2402} # ac_fn_cxx_compute_int
2403
2404# ac_fn_cxx_try_link LINENO
2405# -------------------------
2406# Try to link conftest.$ac_ext, and return whether this succeeded.
2407ac_fn_cxx_try_link ()
2408{
2409  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410  rm -f conftest.$ac_objext conftest$ac_exeext
2411  if { { ac_try="$ac_link"
2412case "(($ac_try" in
2413  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2414  *) ac_try_echo=$ac_try;;
2415esac
2416eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2417$as_echo "$ac_try_echo"; } >&5
2418  (eval "$ac_link") 2>conftest.err
2419  ac_status=$?
2420  if test -s conftest.err; then
2421    grep -v '^ *+' conftest.err >conftest.er1
2422    cat conftest.er1 >&5
2423    mv -f conftest.er1 conftest.err
2424  fi
2425  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2426  test $ac_status = 0; } && {
2427	 test -z "$ac_cxx_werror_flag" ||
2428	 test ! -s conftest.err
2429       } && test -s conftest$ac_exeext && {
2430	 test "$cross_compiling" = yes ||
2431	 $as_test_x conftest$ac_exeext
2432       }; then :
2433  ac_retval=0
2434else
2435  $as_echo "$as_me: failed program was:" >&5
2436sed 's/^/| /' conftest.$ac_ext >&5
2437
2438	ac_retval=1
2439fi
2440  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2441  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2442  # interfere with the next link command; also delete a directory that is
2443  # left behind by Apple's compiler.  We do this before executing the actions.
2444  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2445  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2446  as_fn_set_status $ac_retval
2447
2448} # ac_fn_cxx_try_link
2449
2450# ac_fn_cxx_check_func LINENO FUNC VAR
2451# ------------------------------------
2452# Tests whether FUNC exists, setting the cache variable VAR accordingly
2453ac_fn_cxx_check_func ()
2454{
2455  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2457$as_echo_n "checking for $2... " >&6; }
2458if eval "test \"\${$3+set}\"" = set; then :
2459  $as_echo_n "(cached) " >&6
2460else
2461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2462/* end confdefs.h.  */
2463/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2464   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2465#define $2 innocuous_$2
2466
2467/* System header to define __stub macros and hopefully few prototypes,
2468    which can conflict with char $2 (); below.
2469    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2470    <limits.h> exists even on freestanding compilers.  */
2471
2472#ifdef __STDC__
2473# include <limits.h>
2474#else
2475# include <assert.h>
2476#endif
2477
2478#undef $2
2479
2480/* Override any GCC internal prototype to avoid an error.
2481   Use char because int might match the return type of a GCC
2482   builtin and then its argument prototype would still apply.  */
2483#ifdef __cplusplus
2484extern "C"
2485#endif
2486char $2 ();
2487/* The GNU C library defines this for functions which it implements
2488    to always fail with ENOSYS.  Some functions are actually named
2489    something starting with __ and the normal name is an alias.  */
2490#if defined __stub_$2 || defined __stub___$2
2491choke me
2492#endif
2493
2494int
2495main ()
2496{
2497return $2 ();
2498  ;
2499  return 0;
2500}
2501_ACEOF
2502if ac_fn_cxx_try_link "$LINENO"; then :
2503  eval "$3=yes"
2504else
2505  eval "$3=no"
2506fi
2507rm -f core conftest.err conftest.$ac_objext \
2508    conftest$ac_exeext conftest.$ac_ext
2509fi
2510eval ac_res=\$$3
2511	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2512$as_echo "$ac_res" >&6; }
2513  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2514
2515} # ac_fn_cxx_check_func
2516
2517# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2518# -------------------------------------------------------
2519# Tests whether HEADER exists and can be compiled using the include files in
2520# INCLUDES, setting the cache variable VAR accordingly.
2521ac_fn_c_check_header_compile ()
2522{
2523  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2525$as_echo_n "checking for $2... " >&6; }
2526if eval "test \"\${$3+set}\"" = set; then :
2527  $as_echo_n "(cached) " >&6
2528else
2529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2530/* end confdefs.h.  */
2531$4
2532#include <$2>
2533_ACEOF
2534if ac_fn_c_try_compile "$LINENO"; then :
2535  eval "$3=yes"
2536else
2537  eval "$3=no"
2538fi
2539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2540fi
2541eval ac_res=\$$3
2542	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2543$as_echo "$ac_res" >&6; }
2544  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2545
2546} # ac_fn_c_check_header_compile
2547cat >config.log <<_ACEOF
2548This file contains any messages produced by compilers while
2549running configure, to aid debugging if configure makes a mistake.
2550
2551It was created by OpenJDK $as_me jdk8, which was
2552generated by GNU Autoconf 2.67.  Invocation command line was
2553
2554  $ $0 $@
2555
2556_ACEOF
2557exec 5>>config.log
2558{
2559cat <<_ASUNAME
2560## --------- ##
2561## Platform. ##
2562## --------- ##
2563
2564hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2565uname -m = `(uname -m) 2>/dev/null || echo unknown`
2566uname -r = `(uname -r) 2>/dev/null || echo unknown`
2567uname -s = `(uname -s) 2>/dev/null || echo unknown`
2568uname -v = `(uname -v) 2>/dev/null || echo unknown`
2569
2570/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2571/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2572
2573/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2574/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2575/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2576/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2577/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2578/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2579/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2580
2581_ASUNAME
2582
2583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2584for as_dir in $PATH
2585do
2586  IFS=$as_save_IFS
2587  test -z "$as_dir" && as_dir=.
2588    $as_echo "PATH: $as_dir"
2589  done
2590IFS=$as_save_IFS
2591
2592} >&5
2593
2594cat >&5 <<_ACEOF
2595
2596
2597## ----------- ##
2598## Core tests. ##
2599## ----------- ##
2600
2601_ACEOF
2602
2603
2604# Keep a trace of the command line.
2605# Strip out --no-create and --no-recursion so they do not pile up.
2606# Strip out --silent because we don't want to record it for future runs.
2607# Also quote any args containing shell meta-characters.
2608# Make two passes to allow for proper duplicate-argument suppression.
2609ac_configure_args=
2610ac_configure_args0=
2611ac_configure_args1=
2612ac_must_keep_next=false
2613for ac_pass in 1 2
2614do
2615  for ac_arg
2616  do
2617    case $ac_arg in
2618    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2619    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2620    | -silent | --silent | --silen | --sile | --sil)
2621      continue ;;
2622    *\'*)
2623      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2624    esac
2625    case $ac_pass in
2626    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2627    2)
2628      as_fn_append ac_configure_args1 " '$ac_arg'"
2629      if test $ac_must_keep_next = true; then
2630	ac_must_keep_next=false # Got value, back to normal.
2631      else
2632	case $ac_arg in
2633	  *=* | --config-cache | -C | -disable-* | --disable-* \
2634	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2635	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2636	  | -with-* | --with-* | -without-* | --without-* | --x)
2637	    case "$ac_configure_args0 " in
2638	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2639	    esac
2640	    ;;
2641	  -* ) ac_must_keep_next=true ;;
2642	esac
2643      fi
2644      as_fn_append ac_configure_args " '$ac_arg'"
2645      ;;
2646    esac
2647  done
2648done
2649{ ac_configure_args0=; unset ac_configure_args0;}
2650{ ac_configure_args1=; unset ac_configure_args1;}
2651
2652# When interrupted or exit'd, cleanup temporary files, and complete
2653# config.log.  We remove comments because anyway the quotes in there
2654# would cause problems or look ugly.
2655# WARNING: Use '\'' to represent an apostrophe within the trap.
2656# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2657trap 'exit_status=$?
2658  # Save into config.log some information that might help in debugging.
2659  {
2660    echo
2661
2662    $as_echo "## ---------------- ##
2663## Cache variables. ##
2664## ---------------- ##"
2665    echo
2666    # The following way of writing the cache mishandles newlines in values,
2667(
2668  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2669    eval ac_val=\$$ac_var
2670    case $ac_val in #(
2671    *${as_nl}*)
2672      case $ac_var in #(
2673      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2674$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2675      esac
2676      case $ac_var in #(
2677      _ | IFS | as_nl) ;; #(
2678      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2679      *) { eval $ac_var=; unset $ac_var;} ;;
2680      esac ;;
2681    esac
2682  done
2683  (set) 2>&1 |
2684    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2685    *${as_nl}ac_space=\ *)
2686      sed -n \
2687	"s/'\''/'\''\\\\'\'''\''/g;
2688	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2689      ;; #(
2690    *)
2691      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2692      ;;
2693    esac |
2694    sort
2695)
2696    echo
2697
2698    $as_echo "## ----------------- ##
2699## Output variables. ##
2700## ----------------- ##"
2701    echo
2702    for ac_var in $ac_subst_vars
2703    do
2704      eval ac_val=\$$ac_var
2705      case $ac_val in
2706      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2707      esac
2708      $as_echo "$ac_var='\''$ac_val'\''"
2709    done | sort
2710    echo
2711
2712    if test -n "$ac_subst_files"; then
2713      $as_echo "## ------------------- ##
2714## File substitutions. ##
2715## ------------------- ##"
2716      echo
2717      for ac_var in $ac_subst_files
2718      do
2719	eval ac_val=\$$ac_var
2720	case $ac_val in
2721	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2722	esac
2723	$as_echo "$ac_var='\''$ac_val'\''"
2724      done | sort
2725      echo
2726    fi
2727
2728    if test -s confdefs.h; then
2729      $as_echo "## ----------- ##
2730## confdefs.h. ##
2731## ----------- ##"
2732      echo
2733      cat confdefs.h
2734      echo
2735    fi
2736    test "$ac_signal" != 0 &&
2737      $as_echo "$as_me: caught signal $ac_signal"
2738    $as_echo "$as_me: exit $exit_status"
2739  } >&5
2740  rm -f core *.core core.conftest.* &&
2741    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2742    exit $exit_status
2743' 0
2744for ac_signal in 1 2 13 15; do
2745  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2746done
2747ac_signal=0
2748
2749# confdefs.h avoids OS command line length limits that DEFS can exceed.
2750rm -f -r conftest* confdefs.h
2751
2752$as_echo "/* confdefs.h */" > confdefs.h
2753
2754# Predefined preprocessor variables.
2755
2756cat >>confdefs.h <<_ACEOF
2757#define PACKAGE_NAME "$PACKAGE_NAME"
2758_ACEOF
2759
2760cat >>confdefs.h <<_ACEOF
2761#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2762_ACEOF
2763
2764cat >>confdefs.h <<_ACEOF
2765#define PACKAGE_VERSION "$PACKAGE_VERSION"
2766_ACEOF
2767
2768cat >>confdefs.h <<_ACEOF
2769#define PACKAGE_STRING "$PACKAGE_STRING"
2770_ACEOF
2771
2772cat >>confdefs.h <<_ACEOF
2773#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2774_ACEOF
2775
2776cat >>confdefs.h <<_ACEOF
2777#define PACKAGE_URL "$PACKAGE_URL"
2778_ACEOF
2779
2780
2781# Let the site file select an alternate cache file if it wants to.
2782# Prefer an explicitly selected file to automatically selected ones.
2783ac_site_file1=NONE
2784ac_site_file2=NONE
2785if test -n "$CONFIG_SITE"; then
2786  # We do not want a PATH search for config.site.
2787  case $CONFIG_SITE in #((
2788    -*)  ac_site_file1=./$CONFIG_SITE;;
2789    */*) ac_site_file1=$CONFIG_SITE;;
2790    *)   ac_site_file1=./$CONFIG_SITE;;
2791  esac
2792elif test "x$prefix" != xNONE; then
2793  ac_site_file1=$prefix/share/config.site
2794  ac_site_file2=$prefix/etc/config.site
2795else
2796  ac_site_file1=$ac_default_prefix/share/config.site
2797  ac_site_file2=$ac_default_prefix/etc/config.site
2798fi
2799for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2800do
2801  test "x$ac_site_file" = xNONE && continue
2802  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2803    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2804$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2805    sed 's/^/| /' "$ac_site_file" >&5
2806    . "$ac_site_file" \
2807      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2809as_fn_error $? "failed to load site script $ac_site_file
2810See \`config.log' for more details" "$LINENO" 5 ; }
2811  fi
2812done
2813
2814if test -r "$cache_file"; then
2815  # Some versions of bash will fail to source /dev/null (special files
2816  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2817  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2818    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2819$as_echo "$as_me: loading cache $cache_file" >&6;}
2820    case $cache_file in
2821      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2822      *)                      . "./$cache_file";;
2823    esac
2824  fi
2825else
2826  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2827$as_echo "$as_me: creating cache $cache_file" >&6;}
2828  >$cache_file
2829fi
2830
2831# Check that the precious variables saved in the cache have kept the same
2832# value.
2833ac_cache_corrupted=false
2834for ac_var in $ac_precious_vars; do
2835  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2836  eval ac_new_set=\$ac_env_${ac_var}_set
2837  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2838  eval ac_new_val=\$ac_env_${ac_var}_value
2839  case $ac_old_set,$ac_new_set in
2840    set,)
2841      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2842$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2843      ac_cache_corrupted=: ;;
2844    ,set)
2845      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2846$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2847      ac_cache_corrupted=: ;;
2848    ,);;
2849    *)
2850      if test "x$ac_old_val" != "x$ac_new_val"; then
2851	# differences in whitespace do not lead to failure.
2852	ac_old_val_w=`echo x $ac_old_val`
2853	ac_new_val_w=`echo x $ac_new_val`
2854	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2855	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2856$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2857	  ac_cache_corrupted=:
2858	else
2859	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2860$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2861	  eval $ac_var=\$ac_old_val
2862	fi
2863	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2864$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2865	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2866$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2867      fi;;
2868  esac
2869  # Pass precious variables to config.status.
2870  if test "$ac_new_set" = set; then
2871    case $ac_new_val in
2872    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2873    *) ac_arg=$ac_var=$ac_new_val ;;
2874    esac
2875    case " $ac_configure_args " in
2876      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2877      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2878    esac
2879  fi
2880done
2881if $ac_cache_corrupted; then
2882  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2884  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2885$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2886  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2887fi
2888## -------------------- ##
2889## Main body of script. ##
2890## -------------------- ##
2891
2892ac_ext=c
2893ac_cpp='$CPP $CPPFLAGS'
2894ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2895ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2896ac_compiler_gnu=$ac_cv_c_compiler_gnu
2897
2898
2899
2900ac_aux_dir=
2901for ac_dir in build-aux "$srcdir"/build-aux; do
2902  if test -f "$ac_dir/install-sh"; then
2903    ac_aux_dir=$ac_dir
2904    ac_install_sh="$ac_aux_dir/install-sh -c"
2905    break
2906  elif test -f "$ac_dir/install.sh"; then
2907    ac_aux_dir=$ac_dir
2908    ac_install_sh="$ac_aux_dir/install.sh -c"
2909    break
2910  elif test -f "$ac_dir/shtool"; then
2911    ac_aux_dir=$ac_dir
2912    ac_install_sh="$ac_aux_dir/shtool install -c"
2913    break
2914  fi
2915done
2916if test -z "$ac_aux_dir"; then
2917  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2918fi
2919
2920# These three variables are undocumented and unsupported,
2921# and are intended to be withdrawn in a future Autoconf release.
2922# They can cause serious problems if a builder's source tree is in a directory
2923# whose full name contains unusual characters.
2924ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2925ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2926ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2927
2928
2929# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2930
2931#
2932# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2933# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2934#
2935# This code is free software; you can redistribute it and/or modify it
2936# under the terms of the GNU General Public License version 2 only, as
2937# published by the Free Software Foundation.  Oracle designates this
2938# particular file as subject to the "Classpath" exception as provided
2939# by Oracle in the LICENSE file that accompanied this code.
2940#
2941# This code is distributed in the hope that it will be useful, but WITHOUT
2942# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2943# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2944# version 2 for more details (a copy is included in the LICENSE file that
2945# accompanied this code).
2946#
2947# You should have received a copy of the GNU General Public License version
2948# 2 along with this work; if not, write to the Free Software Foundation,
2949# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2950#
2951# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2952# or visit www.oracle.com if you need additional information or have any
2953# questions.
2954#
2955
2956#
2957# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2958#
2959# This program is free software; you can redistribute it and/or modify
2960# it under the terms of the GNU General Public License as published by
2961# the Free Software Foundation; either version 2 of the License, or
2962# (at your option) any later version.
2963#
2964# This program is distributed in the hope that it will be useful, but
2965# WITHOUT ANY WARRANTY; without even the implied warranty of
2966# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2967# General Public License for more details.
2968#
2969# You should have received a copy of the GNU General Public License
2970# along with this program; if not, write to the Free Software
2971# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2972#
2973# As a special exception to the GNU General Public License, if you
2974# distribute this file as part of a program that contains a
2975# configuration script generated by Autoconf, you may include it under
2976# the same distribution terms that you use for the rest of that program.
2977
2978# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2979# ----------------------------------
2980# PKG_PROG_PKG_CONFIG
2981
2982# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2983#
2984# Check to see whether a particular set of modules exists.  Similar
2985# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2986#
2987#
2988# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2989# this or PKG_CHECK_MODULES is called, or make sure to call
2990# PKG_CHECK_EXISTS manually
2991# --------------------------------------------------------------
2992
2993
2994
2995# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2996# ---------------------------------------------
2997# _PKG_CONFIG
2998
2999# _PKG_SHORT_ERRORS_SUPPORTED
3000# -----------------------------
3001# _PKG_SHORT_ERRORS_SUPPORTED
3002
3003
3004# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3005# [ACTION-IF-NOT-FOUND])
3006#
3007#
3008# Note that if there is a possibility the first call to
3009# PKG_CHECK_MODULES might not happen, you should be sure to include an
3010# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3011#
3012#
3013# --------------------------------------------------------------
3014# PKG_CHECK_MODULES
3015
3016
3017# Include these first...
3018#
3019# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3020# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3021#
3022# This code is free software; you can redistribute it and/or modify it
3023# under the terms of the GNU General Public License version 2 only, as
3024# published by the Free Software Foundation.  Oracle designates this
3025# particular file as subject to the "Classpath" exception as provided
3026# by Oracle in the LICENSE file that accompanied this code.
3027#
3028# This code is distributed in the hope that it will be useful, but WITHOUT
3029# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3030# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3031# version 2 for more details (a copy is included in the LICENSE file that
3032# accompanied this code).
3033#
3034# You should have received a copy of the GNU General Public License version
3035# 2 along with this work; if not, write to the Free Software Foundation,
3036# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3037#
3038# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3039# or visit www.oracle.com if you need additional information or have any
3040# questions.
3041#
3042
3043
3044
3045# This will make sure the given variable points to a full and proper
3046# path. This means:
3047# 1) There will be no spaces in the path. On posix platforms,
3048#    spaces in the path will result in an error. On Windows,
3049#    the path will be rewritten using short-style to be space-free.
3050# 2) The path will be absolute, and it will be in unix-style (on
3051#     cygwin).
3052# $1: The name of the variable to fix
3053
3054
3055# This will make sure the given variable points to a executable
3056# with a full and proper path. This means:
3057# 1) There will be no spaces in the path. On posix platforms,
3058#    spaces in the path will result in an error. On Windows,
3059#    the path will be rewritten using short-style to be space-free.
3060# 2) The path will be absolute, and it will be in unix-style (on
3061#     cygwin).
3062# Any arguments given to the executable is preserved.
3063# If the input variable does not have a directory specification, then
3064# it need to be in the PATH.
3065# $1: The name of the variable to fix
3066
3067
3068
3069
3070
3071
3072# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3073# $1: variable to check
3074# $2: executable name to print in warning (optional)
3075
3076
3077# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3078# Arguments as AC_PATH_PROG:
3079# $1: variable to set
3080# $2: executable name to look for
3081
3082
3083# Setup the most fundamental tools that relies on not much else to set up,
3084# but is used by much of the early bootstrap code.
3085
3086
3087# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3088
3089
3090
3091
3092
3093
3094
3095#%%% Simple tools %%%
3096
3097# Check if we have found a usable version of make
3098# $1: the path to a potential make binary (or empty)
3099# $2: the description on how we found this
3100
3101
3102# Goes looking for a usable version of GNU make.
3103
3104
3105
3106
3107
3108
3109# Check if build directory is on local disk. If not possible to determine,
3110# we prefer to claim it's local.
3111# Argument 1: directory to test
3112# Argument 2: what to do if it is on local disk
3113# Argument 3: what to do otherwise (remote disk or failure)
3114
3115
3116# Check that source files have basic read permissions set. This might
3117# not be the case in cygwin in certain conditions.
3118
3119
3120
3121
3122#
3123# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3124# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3125#
3126# This code is free software; you can redistribute it and/or modify it
3127# under the terms of the GNU General Public License version 2 only, as
3128# published by the Free Software Foundation.  Oracle designates this
3129# particular file as subject to the "Classpath" exception as provided
3130# by Oracle in the LICENSE file that accompanied this code.
3131#
3132# This code is distributed in the hope that it will be useful, but WITHOUT
3133# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3134# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3135# version 2 for more details (a copy is included in the LICENSE file that
3136# accompanied this code).
3137#
3138# You should have received a copy of the GNU General Public License version
3139# 2 along with this work; if not, write to the Free Software Foundation,
3140# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3141#
3142# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3143# or visit www.oracle.com if you need additional information or have any
3144# questions.
3145#
3146
3147
3148
3149
3150
3151# Helper function which possibly converts a path using DOS-style short mode.
3152# If so, the updated path is stored in $new_path.
3153# $1: The path to check
3154
3155
3156# Helper function which possibly converts a path using DOS-style short mode.
3157# If so, the updated path is stored in $new_path.
3158# $1: The path to check
3159
3160
3161# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3162# and could probably be heavily simplified. However, all changes in this
3163# area tend to need lot of testing in different scenarios, and in lack of
3164# proper unit testing, cleaning this up has not been deemed worth the effort
3165# at the moment.
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3176
3177
3178
3179
3180#
3181# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3182# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3183#
3184# This code is free software; you can redistribute it and/or modify it
3185# under the terms of the GNU General Public License version 2 only, as
3186# published by the Free Software Foundation.  Oracle designates this
3187# particular file as subject to the "Classpath" exception as provided
3188# by Oracle in the LICENSE file that accompanied this code.
3189#
3190# This code is distributed in the hope that it will be useful, but WITHOUT
3191# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3192# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3193# version 2 for more details (a copy is included in the LICENSE file that
3194# accompanied this code).
3195#
3196# You should have received a copy of the GNU General Public License version
3197# 2 along with this work; if not, write to the Free Software Foundation,
3198# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3199#
3200# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3201# or visit www.oracle.com if you need additional information or have any
3202# questions.
3203#
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215# ... then the rest
3216#
3217# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3218# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3219#
3220# This code is free software; you can redistribute it and/or modify it
3221# under the terms of the GNU General Public License version 2 only, as
3222# published by the Free Software Foundation.  Oracle designates this
3223# particular file as subject to the "Classpath" exception as provided
3224# by Oracle in the LICENSE file that accompanied this code.
3225#
3226# This code is distributed in the hope that it will be useful, but WITHOUT
3227# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3228# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3229# version 2 for more details (a copy is included in the LICENSE file that
3230# accompanied this code).
3231#
3232# You should have received a copy of the GNU General Public License version
3233# 2 along with this work; if not, write to the Free Software Foundation,
3234# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3235#
3236# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3237# or visit www.oracle.com if you need additional information or have any
3238# questions.
3239#
3240
3241# Execute the check given as argument, and verify the result
3242# If the Boot JDK was previously found, do nothing
3243# $1 A command line (typically autoconf macro) to execute
3244
3245
3246# Test: Is bootjdk explicitely set by command line arguments?
3247
3248
3249# Test: Is bootjdk available from builddeps?
3250
3251
3252# Test: Is $JAVA_HOME set?
3253
3254
3255# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3256
3257
3258# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3259
3260
3261# Look for a jdk in the given path. If there are multiple, try to select the newest.
3262# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3263# $1 = Path to directory containing jdk installations.
3264# $2 = String to append to the found JDK directory to get the proper JDK home
3265
3266
3267# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3268# environmental variable as base for where to look.
3269# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3270
3271
3272# Test: Is there a JDK installed in default, well-known locations?
3273
3274
3275# Check that a command-line tool in the Boot JDK is correct
3276# $1 = name of variable to assign
3277# $2 = name of binary
3278
3279
3280###############################################################################
3281#
3282# We need a Boot JDK to bootstrap the build.
3283#
3284
3285
3286
3287
3288
3289#
3290# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3291# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3292#
3293# This code is free software; you can redistribute it and/or modify it
3294# under the terms of the GNU General Public License version 2 only, as
3295# published by the Free Software Foundation.  Oracle designates this
3296# particular file as subject to the "Classpath" exception as provided
3297# by Oracle in the LICENSE file that accompanied this code.
3298#
3299# This code is distributed in the hope that it will be useful, but WITHOUT
3300# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3301# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3302# version 2 for more details (a copy is included in the LICENSE file that
3303# accompanied this code).
3304#
3305# You should have received a copy of the GNU General Public License version
3306# 2 along with this work; if not, write to the Free Software Foundation,
3307# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3308#
3309# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3310# or visit www.oracle.com if you need additional information or have any
3311# questions.
3312#
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331#
3332# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3333# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3334#
3335# This code is free software; you can redistribute it and/or modify it
3336# under the terms of the GNU General Public License version 2 only, as
3337# published by the Free Software Foundation.  Oracle designates this
3338# particular file as subject to the "Classpath" exception as provided
3339# by Oracle in the LICENSE file that accompanied this code.
3340#
3341# This code is distributed in the hope that it will be useful, but WITHOUT
3342# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3343# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3344# version 2 for more details (a copy is included in the LICENSE file that
3345# accompanied this code).
3346#
3347# You should have received a copy of the GNU General Public License version
3348# 2 along with this work; if not, write to the Free Software Foundation,
3349# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3350#
3351# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3352# or visit www.oracle.com if you need additional information or have any
3353# questions.
3354#
3355
3356
3357
3358
3359
3360cygwin_help() {
3361    case $1 in
3362    unzip)
3363        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3364    zip)
3365        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3366    make)
3367        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3368    * )
3369       break ;;
3370    esac
3371}
3372
3373apt_help() {
3374    case $1 in
3375    devkit)
3376        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3377    openjdk)
3378        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3379    alsa)
3380        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3381    cups)
3382        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3383    freetype2)
3384        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3385    pulse)
3386        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3387    x11)
3388        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3389    ccache)
3390        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3391    * )
3392       break ;;
3393    esac
3394}
3395
3396yum_help() {
3397    case $1 in
3398    devkit)
3399        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3400    openjdk)
3401        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3402    alsa)
3403        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3404    cups)
3405        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3406    freetype2)
3407        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3408    pulse)
3409        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3410    x11)
3411        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3412    ccache)
3413        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3414    * )
3415       break ;;
3416    esac
3417}
3418
3419port_help() {
3420    PKGHANDLER_COMMAND=""
3421}
3422
3423pkgutil_help() {
3424    PKGHANDLER_COMMAND=""
3425}
3426
3427pkgadd_help() {
3428    PKGHANDLER_COMMAND=""
3429}
3430
3431
3432
3433#
3434# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3435# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3436#
3437# This code is free software; you can redistribute it and/or modify it
3438# under the terms of the GNU General Public License version 2 only, as
3439# published by the Free Software Foundation.  Oracle designates this
3440# particular file as subject to the "Classpath" exception as provided
3441# by Oracle in the LICENSE file that accompanied this code.
3442#
3443# This code is distributed in the hope that it will be useful, but WITHOUT
3444# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3445# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3446# version 2 for more details (a copy is included in the LICENSE file that
3447# accompanied this code).
3448#
3449# You should have received a copy of the GNU General Public License version
3450# 2 along with this work; if not, write to the Free Software Foundation,
3451# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3452#
3453# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3454# or visit www.oracle.com if you need additional information or have any
3455# questions.
3456#
3457
3458
3459
3460
3461
3462
3463
3464
3465###############################################################################
3466#
3467# Should we build only OpenJDK even if closed sources are present?
3468#
3469
3470
3471
3472
3473###############################################################################
3474#
3475# Setup version numbers
3476#
3477
3478
3479
3480
3481
3482
3483# Support for customization of the build process. Some build files
3484# will include counterparts from this location, if they exist. This allows
3485# for a degree of customization of the build targets and the rules/recipes
3486# to create them
3487
3488# Check whether --with-custom-make-dir was given.
3489if test "${with_custom_make_dir+set}" = set; then :
3490  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3491fi
3492
3493
3494
3495#
3496# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3497# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3498#
3499# This code is free software; you can redistribute it and/or modify it
3500# under the terms of the GNU General Public License version 2 only, as
3501# published by the Free Software Foundation.  Oracle designates this
3502# particular file as subject to the "Classpath" exception as provided
3503# by Oracle in the LICENSE file that accompanied this code.
3504#
3505# This code is distributed in the hope that it will be useful, but WITHOUT
3506# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3507# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3508# version 2 for more details (a copy is included in the LICENSE file that
3509# accompanied this code).
3510#
3511# You should have received a copy of the GNU General Public License version
3512# 2 along with this work; if not, write to the Free Software Foundation,
3513# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3514#
3515# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3516# or visit www.oracle.com if you need additional information or have any
3517# questions.
3518#
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534#
3535# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3536# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3537#
3538# This code is free software; you can redistribute it and/or modify it
3539# under the terms of the GNU General Public License version 2 only, as
3540# published by the Free Software Foundation.  Oracle designates this
3541# particular file as subject to the "Classpath" exception as provided
3542# by Oracle in the LICENSE file that accompanied this code.
3543#
3544# This code is distributed in the hope that it will be useful, but WITHOUT
3545# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3546# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3547# version 2 for more details (a copy is included in the LICENSE file that
3548# accompanied this code).
3549#
3550# You should have received a copy of the GNU General Public License version
3551# 2 along with this work; if not, write to the Free Software Foundation,
3552# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3553#
3554# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3555# or visit www.oracle.com if you need additional information or have any
3556# questions.
3557#
3558
3559# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3560# Converts autoconf style CPU name to OpenJDK style, into
3561# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3562
3563
3564# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3565# Converts autoconf style OS name to OpenJDK style, into
3566# VAR_OS and VAR_OS_API.
3567
3568
3569# Expects $host_os $host_cpu $build_os and $build_cpu
3570# and $with_target_bits to have been setup!
3571#
3572# Translate the standard triplet(quadruplet) definition
3573# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3574# OPENJDK_BUILD_OS, etc.
3575
3576
3577# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3578# accordingly. Must be done after setting up build and target system, but before
3579# doing anything else with these values.
3580
3581
3582    # Setup the legacy variables, for controlling the old makefiles.
3583    #
3584
3585
3586
3587
3588#%%% Build and target systems %%%
3589
3590
3591
3592
3593# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3594# Add -mX to various FLAGS variables.
3595
3596
3597
3598
3599
3600
3601#
3602# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3603# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3604#
3605# This code is free software; you can redistribute it and/or modify it
3606# under the terms of the GNU General Public License version 2 only, as
3607# published by the Free Software Foundation.  Oracle designates this
3608# particular file as subject to the "Classpath" exception as provided
3609# by Oracle in the LICENSE file that accompanied this code.
3610#
3611# This code is distributed in the hope that it will be useful, but WITHOUT
3612# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3613# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3614# version 2 for more details (a copy is included in the LICENSE file that
3615# accompanied this code).
3616#
3617# You should have received a copy of the GNU General Public License version
3618# 2 along with this work; if not, write to the Free Software Foundation,
3619# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3620#
3621# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3622# or visit www.oracle.com if you need additional information or have any
3623# questions.
3624#
3625
3626
3627
3628
3629
3630
3631
3632
3633#
3634# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3635# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3636#
3637# This code is free software; you can redistribute it and/or modify it
3638# under the terms of the GNU General Public License version 2 only, as
3639# published by the Free Software Foundation.  Oracle designates this
3640# particular file as subject to the "Classpath" exception as provided
3641# by Oracle in the LICENSE file that accompanied this code.
3642#
3643# This code is distributed in the hope that it will be useful, but WITHOUT
3644# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3645# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3646# version 2 for more details (a copy is included in the LICENSE file that
3647# accompanied this code).
3648#
3649# You should have received a copy of the GNU General Public License version
3650# 2 along with this work; if not, write to the Free Software Foundation,
3651# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3652#
3653# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3654# or visit www.oracle.com if you need additional information or have any
3655# questions.
3656#
3657
3658# $1 = compiler to test (CC or CXX)
3659# $2 = human readable name of compiler (C or C++)
3660
3661
3662
3663
3664
3665# $1 = compiler to test (CC or CXX)
3666# $2 = human readable name of compiler (C or C++)
3667# $3 = list of compiler names to search for
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680#
3681# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3682# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3683#
3684# This code is free software; you can redistribute it and/or modify it
3685# under the terms of the GNU General Public License version 2 only, as
3686# published by the Free Software Foundation.  Oracle designates this
3687# particular file as subject to the "Classpath" exception as provided
3688# by Oracle in the LICENSE file that accompanied this code.
3689#
3690# This code is distributed in the hope that it will be useful, but WITHOUT
3691# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3692# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3693# version 2 for more details (a copy is included in the LICENSE file that
3694# accompanied this code).
3695#
3696# You should have received a copy of the GNU General Public License version
3697# 2 along with this work; if not, write to the Free Software Foundation,
3698# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3699#
3700# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3701# or visit www.oracle.com if you need additional information or have any
3702# questions.
3703#
3704
3705
3706
3707
3708
3709
3710
3711# Check if the VS env variables were setup prior to running configure.
3712# If not, then find vcvarsall.bat and run it automatically, and integrate
3713# the set env variables into the spec file.
3714
3715
3716
3717
3718
3719
3720# This line needs to be here, verbatim, after all includes and the dummy hook
3721# definitions. It is replaced with custom functionality when building
3722# custom sources.
3723#CUSTOM_AUTOCONF_INCLUDE
3724
3725# Do not change or remove the following line, it is needed for consistency checks:
3726DATE_WHEN_GENERATED=1358937713
3727
3728###############################################################################
3729#
3730# Initialization / Boot-strapping
3731#
3732# The bootstrapping process needs to solve the "chicken or the egg" problem,
3733# thus it jumps back and forth, each time gaining something needed later on.
3734#
3735###############################################################################
3736
3737# Basic initialization that must happen first of all
3738
3739# Save the original command line. This is passed to us by the wrapper configure script.
3740
3741DATE_WHEN_CONFIGURED=`LANG=C date`
3742
3743{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3744$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3745{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3746$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3747
3748
3749
3750# Start with tools that do not need have cross compilation support
3751# and can be expected to be found in the default PATH. These tools are
3752# used by configure. Nor are these tools expected to be found in the
3753# devkit from the builddeps server either, since they are
3754# needed to download the devkit.
3755
3756# First are all the simple required tools.
3757
3758    for ac_prog in basename
3759do
3760  # Extract the first word of "$ac_prog", so it can be a program name with args.
3761set dummy $ac_prog; ac_word=$2
3762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3763$as_echo_n "checking for $ac_word... " >&6; }
3764if test "${ac_cv_path_BASENAME+set}" = set; then :
3765  $as_echo_n "(cached) " >&6
3766else
3767  case $BASENAME in
3768  [\\/]* | ?:[\\/]*)
3769  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3770  ;;
3771  *)
3772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3773for as_dir in $PATH
3774do
3775  IFS=$as_save_IFS
3776  test -z "$as_dir" && as_dir=.
3777    for ac_exec_ext in '' $ac_executable_extensions; do
3778  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3779    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3781    break 2
3782  fi
3783done
3784  done
3785IFS=$as_save_IFS
3786
3787  ;;
3788esac
3789fi
3790BASENAME=$ac_cv_path_BASENAME
3791if test -n "$BASENAME"; then
3792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3793$as_echo "$BASENAME" >&6; }
3794else
3795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3796$as_echo "no" >&6; }
3797fi
3798
3799
3800  test -n "$BASENAME" && break
3801done
3802
3803
3804    if test "x$BASENAME" = x; then
3805        if test "xbasename" = x; then
3806          PROG_NAME=basename
3807        else
3808          PROG_NAME=basename
3809        fi
3810        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3811$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3812        as_fn_error $? "Cannot continue" "$LINENO" 5
3813    fi
3814
3815
3816
3817    for ac_prog in bash
3818do
3819  # Extract the first word of "$ac_prog", so it can be a program name with args.
3820set dummy $ac_prog; ac_word=$2
3821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
3823if test "${ac_cv_path_BASH+set}" = set; then :
3824  $as_echo_n "(cached) " >&6
3825else
3826  case $BASH in
3827  [\\/]* | ?:[\\/]*)
3828  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3829  ;;
3830  *)
3831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832for as_dir in $PATH
3833do
3834  IFS=$as_save_IFS
3835  test -z "$as_dir" && as_dir=.
3836    for ac_exec_ext in '' $ac_executable_extensions; do
3837  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3838    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3840    break 2
3841  fi
3842done
3843  done
3844IFS=$as_save_IFS
3845
3846  ;;
3847esac
3848fi
3849BASH=$ac_cv_path_BASH
3850if test -n "$BASH"; then
3851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3852$as_echo "$BASH" >&6; }
3853else
3854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3855$as_echo "no" >&6; }
3856fi
3857
3858
3859  test -n "$BASH" && break
3860done
3861
3862
3863    if test "x$BASH" = x; then
3864        if test "xbash" = x; then
3865          PROG_NAME=bash
3866        else
3867          PROG_NAME=bash
3868        fi
3869        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3870$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3871        as_fn_error $? "Cannot continue" "$LINENO" 5
3872    fi
3873
3874
3875
3876    for ac_prog in cat
3877do
3878  # Extract the first word of "$ac_prog", so it can be a program name with args.
3879set dummy $ac_prog; ac_word=$2
3880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3881$as_echo_n "checking for $ac_word... " >&6; }
3882if test "${ac_cv_path_CAT+set}" = set; then :
3883  $as_echo_n "(cached) " >&6
3884else
3885  case $CAT in
3886  [\\/]* | ?:[\\/]*)
3887  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3888  ;;
3889  *)
3890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3891for as_dir in $PATH
3892do
3893  IFS=$as_save_IFS
3894  test -z "$as_dir" && as_dir=.
3895    for ac_exec_ext in '' $ac_executable_extensions; do
3896  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3897    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3899    break 2
3900  fi
3901done
3902  done
3903IFS=$as_save_IFS
3904
3905  ;;
3906esac
3907fi
3908CAT=$ac_cv_path_CAT
3909if test -n "$CAT"; then
3910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3911$as_echo "$CAT" >&6; }
3912else
3913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3914$as_echo "no" >&6; }
3915fi
3916
3917
3918  test -n "$CAT" && break
3919done
3920
3921
3922    if test "x$CAT" = x; then
3923        if test "xcat" = x; then
3924          PROG_NAME=cat
3925        else
3926          PROG_NAME=cat
3927        fi
3928        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3929$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3930        as_fn_error $? "Cannot continue" "$LINENO" 5
3931    fi
3932
3933
3934
3935    for ac_prog in chmod
3936do
3937  # Extract the first word of "$ac_prog", so it can be a program name with args.
3938set dummy $ac_prog; ac_word=$2
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3940$as_echo_n "checking for $ac_word... " >&6; }
3941if test "${ac_cv_path_CHMOD+set}" = set; then :
3942  $as_echo_n "(cached) " >&6
3943else
3944  case $CHMOD in
3945  [\\/]* | ?:[\\/]*)
3946  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3947  ;;
3948  *)
3949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3950for as_dir in $PATH
3951do
3952  IFS=$as_save_IFS
3953  test -z "$as_dir" && as_dir=.
3954    for ac_exec_ext in '' $ac_executable_extensions; do
3955  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3956    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3958    break 2
3959  fi
3960done
3961  done
3962IFS=$as_save_IFS
3963
3964  ;;
3965esac
3966fi
3967CHMOD=$ac_cv_path_CHMOD
3968if test -n "$CHMOD"; then
3969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3970$as_echo "$CHMOD" >&6; }
3971else
3972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3973$as_echo "no" >&6; }
3974fi
3975
3976
3977  test -n "$CHMOD" && break
3978done
3979
3980
3981    if test "x$CHMOD" = x; then
3982        if test "xchmod" = x; then
3983          PROG_NAME=chmod
3984        else
3985          PROG_NAME=chmod
3986        fi
3987        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3988$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3989        as_fn_error $? "Cannot continue" "$LINENO" 5
3990    fi
3991
3992
3993
3994    for ac_prog in cmp
3995do
3996  # Extract the first word of "$ac_prog", so it can be a program name with args.
3997set dummy $ac_prog; ac_word=$2
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999$as_echo_n "checking for $ac_word... " >&6; }
4000if test "${ac_cv_path_CMP+set}" = set; then :
4001  $as_echo_n "(cached) " >&6
4002else
4003  case $CMP in
4004  [\\/]* | ?:[\\/]*)
4005  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4006  ;;
4007  *)
4008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009for as_dir in $PATH
4010do
4011  IFS=$as_save_IFS
4012  test -z "$as_dir" && as_dir=.
4013    for ac_exec_ext in '' $ac_executable_extensions; do
4014  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4015    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4017    break 2
4018  fi
4019done
4020  done
4021IFS=$as_save_IFS
4022
4023  ;;
4024esac
4025fi
4026CMP=$ac_cv_path_CMP
4027if test -n "$CMP"; then
4028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4029$as_echo "$CMP" >&6; }
4030else
4031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4032$as_echo "no" >&6; }
4033fi
4034
4035
4036  test -n "$CMP" && break
4037done
4038
4039
4040    if test "x$CMP" = x; then
4041        if test "xcmp" = x; then
4042          PROG_NAME=cmp
4043        else
4044          PROG_NAME=cmp
4045        fi
4046        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4047$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4048        as_fn_error $? "Cannot continue" "$LINENO" 5
4049    fi
4050
4051
4052
4053    for ac_prog in comm
4054do
4055  # Extract the first word of "$ac_prog", so it can be a program name with args.
4056set dummy $ac_prog; ac_word=$2
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058$as_echo_n "checking for $ac_word... " >&6; }
4059if test "${ac_cv_path_COMM+set}" = set; then :
4060  $as_echo_n "(cached) " >&6
4061else
4062  case $COMM in
4063  [\\/]* | ?:[\\/]*)
4064  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4065  ;;
4066  *)
4067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in $PATH
4069do
4070  IFS=$as_save_IFS
4071  test -z "$as_dir" && as_dir=.
4072    for ac_exec_ext in '' $ac_executable_extensions; do
4073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4074    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4076    break 2
4077  fi
4078done
4079  done
4080IFS=$as_save_IFS
4081
4082  ;;
4083esac
4084fi
4085COMM=$ac_cv_path_COMM
4086if test -n "$COMM"; then
4087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4088$as_echo "$COMM" >&6; }
4089else
4090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4091$as_echo "no" >&6; }
4092fi
4093
4094
4095  test -n "$COMM" && break
4096done
4097
4098
4099    if test "x$COMM" = x; then
4100        if test "xcomm" = x; then
4101          PROG_NAME=comm
4102        else
4103          PROG_NAME=comm
4104        fi
4105        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4106$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4107        as_fn_error $? "Cannot continue" "$LINENO" 5
4108    fi
4109
4110
4111
4112    for ac_prog in cp
4113do
4114  # Extract the first word of "$ac_prog", so it can be a program name with args.
4115set dummy $ac_prog; ac_word=$2
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117$as_echo_n "checking for $ac_word... " >&6; }
4118if test "${ac_cv_path_CP+set}" = set; then :
4119  $as_echo_n "(cached) " >&6
4120else
4121  case $CP in
4122  [\\/]* | ?:[\\/]*)
4123  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4124  ;;
4125  *)
4126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127for as_dir in $PATH
4128do
4129  IFS=$as_save_IFS
4130  test -z "$as_dir" && as_dir=.
4131    for ac_exec_ext in '' $ac_executable_extensions; do
4132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4133    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4135    break 2
4136  fi
4137done
4138  done
4139IFS=$as_save_IFS
4140
4141  ;;
4142esac
4143fi
4144CP=$ac_cv_path_CP
4145if test -n "$CP"; then
4146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4147$as_echo "$CP" >&6; }
4148else
4149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4150$as_echo "no" >&6; }
4151fi
4152
4153
4154  test -n "$CP" && break
4155done
4156
4157
4158    if test "x$CP" = x; then
4159        if test "xcp" = x; then
4160          PROG_NAME=cp
4161        else
4162          PROG_NAME=cp
4163        fi
4164        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4165$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4166        as_fn_error $? "Cannot continue" "$LINENO" 5
4167    fi
4168
4169
4170
4171    for ac_prog in cpio
4172do
4173  # Extract the first word of "$ac_prog", so it can be a program name with args.
4174set dummy $ac_prog; ac_word=$2
4175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4176$as_echo_n "checking for $ac_word... " >&6; }
4177if test "${ac_cv_path_CPIO+set}" = set; then :
4178  $as_echo_n "(cached) " >&6
4179else
4180  case $CPIO in
4181  [\\/]* | ?:[\\/]*)
4182  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4183  ;;
4184  *)
4185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186for as_dir in $PATH
4187do
4188  IFS=$as_save_IFS
4189  test -z "$as_dir" && as_dir=.
4190    for ac_exec_ext in '' $ac_executable_extensions; do
4191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4192    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4194    break 2
4195  fi
4196done
4197  done
4198IFS=$as_save_IFS
4199
4200  ;;
4201esac
4202fi
4203CPIO=$ac_cv_path_CPIO
4204if test -n "$CPIO"; then
4205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4206$as_echo "$CPIO" >&6; }
4207else
4208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4209$as_echo "no" >&6; }
4210fi
4211
4212
4213  test -n "$CPIO" && break
4214done
4215
4216
4217    if test "x$CPIO" = x; then
4218        if test "xcpio" = x; then
4219          PROG_NAME=cpio
4220        else
4221          PROG_NAME=cpio
4222        fi
4223        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4224$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4225        as_fn_error $? "Cannot continue" "$LINENO" 5
4226    fi
4227
4228
4229
4230    for ac_prog in cut
4231do
4232  # Extract the first word of "$ac_prog", so it can be a program name with args.
4233set dummy $ac_prog; ac_word=$2
4234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4235$as_echo_n "checking for $ac_word... " >&6; }
4236if test "${ac_cv_path_CUT+set}" = set; then :
4237  $as_echo_n "(cached) " >&6
4238else
4239  case $CUT in
4240  [\\/]* | ?:[\\/]*)
4241  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4242  ;;
4243  *)
4244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247  IFS=$as_save_IFS
4248  test -z "$as_dir" && as_dir=.
4249    for ac_exec_ext in '' $ac_executable_extensions; do
4250  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4251    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4253    break 2
4254  fi
4255done
4256  done
4257IFS=$as_save_IFS
4258
4259  ;;
4260esac
4261fi
4262CUT=$ac_cv_path_CUT
4263if test -n "$CUT"; then
4264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4265$as_echo "$CUT" >&6; }
4266else
4267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4268$as_echo "no" >&6; }
4269fi
4270
4271
4272  test -n "$CUT" && break
4273done
4274
4275
4276    if test "x$CUT" = x; then
4277        if test "xcut" = x; then
4278          PROG_NAME=cut
4279        else
4280          PROG_NAME=cut
4281        fi
4282        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4283$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4284        as_fn_error $? "Cannot continue" "$LINENO" 5
4285    fi
4286
4287
4288
4289    for ac_prog in date
4290do
4291  # Extract the first word of "$ac_prog", so it can be a program name with args.
4292set dummy $ac_prog; ac_word=$2
4293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4294$as_echo_n "checking for $ac_word... " >&6; }
4295if test "${ac_cv_path_DATE+set}" = set; then :
4296  $as_echo_n "(cached) " >&6
4297else
4298  case $DATE in
4299  [\\/]* | ?:[\\/]*)
4300  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4301  ;;
4302  *)
4303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304for as_dir in $PATH
4305do
4306  IFS=$as_save_IFS
4307  test -z "$as_dir" && as_dir=.
4308    for ac_exec_ext in '' $ac_executable_extensions; do
4309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4310    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4312    break 2
4313  fi
4314done
4315  done
4316IFS=$as_save_IFS
4317
4318  ;;
4319esac
4320fi
4321DATE=$ac_cv_path_DATE
4322if test -n "$DATE"; then
4323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4324$as_echo "$DATE" >&6; }
4325else
4326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4327$as_echo "no" >&6; }
4328fi
4329
4330
4331  test -n "$DATE" && break
4332done
4333
4334
4335    if test "x$DATE" = x; then
4336        if test "xdate" = x; then
4337          PROG_NAME=date
4338        else
4339          PROG_NAME=date
4340        fi
4341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4343        as_fn_error $? "Cannot continue" "$LINENO" 5
4344    fi
4345
4346
4347
4348    for ac_prog in gdiff diff
4349do
4350  # Extract the first word of "$ac_prog", so it can be a program name with args.
4351set dummy $ac_prog; ac_word=$2
4352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353$as_echo_n "checking for $ac_word... " >&6; }
4354if test "${ac_cv_path_DIFF+set}" = set; then :
4355  $as_echo_n "(cached) " >&6
4356else
4357  case $DIFF in
4358  [\\/]* | ?:[\\/]*)
4359  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4360  ;;
4361  *)
4362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4363for as_dir in $PATH
4364do
4365  IFS=$as_save_IFS
4366  test -z "$as_dir" && as_dir=.
4367    for ac_exec_ext in '' $ac_executable_extensions; do
4368  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4369    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4371    break 2
4372  fi
4373done
4374  done
4375IFS=$as_save_IFS
4376
4377  ;;
4378esac
4379fi
4380DIFF=$ac_cv_path_DIFF
4381if test -n "$DIFF"; then
4382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4383$as_echo "$DIFF" >&6; }
4384else
4385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4386$as_echo "no" >&6; }
4387fi
4388
4389
4390  test -n "$DIFF" && break
4391done
4392
4393
4394    if test "x$DIFF" = x; then
4395        if test "xgdiff diff" = x; then
4396          PROG_NAME=diff
4397        else
4398          PROG_NAME=gdiff diff
4399        fi
4400        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4401$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4402        as_fn_error $? "Cannot continue" "$LINENO" 5
4403    fi
4404
4405
4406
4407    for ac_prog in dirname
4408do
4409  # Extract the first word of "$ac_prog", so it can be a program name with args.
4410set dummy $ac_prog; ac_word=$2
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4412$as_echo_n "checking for $ac_word... " >&6; }
4413if test "${ac_cv_path_DIRNAME+set}" = set; then :
4414  $as_echo_n "(cached) " >&6
4415else
4416  case $DIRNAME in
4417  [\\/]* | ?:[\\/]*)
4418  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4419  ;;
4420  *)
4421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4422for as_dir in $PATH
4423do
4424  IFS=$as_save_IFS
4425  test -z "$as_dir" && as_dir=.
4426    for ac_exec_ext in '' $ac_executable_extensions; do
4427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4428    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4430    break 2
4431  fi
4432done
4433  done
4434IFS=$as_save_IFS
4435
4436  ;;
4437esac
4438fi
4439DIRNAME=$ac_cv_path_DIRNAME
4440if test -n "$DIRNAME"; then
4441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4442$as_echo "$DIRNAME" >&6; }
4443else
4444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445$as_echo "no" >&6; }
4446fi
4447
4448
4449  test -n "$DIRNAME" && break
4450done
4451
4452
4453    if test "x$DIRNAME" = x; then
4454        if test "xdirname" = x; then
4455          PROG_NAME=dirname
4456        else
4457          PROG_NAME=dirname
4458        fi
4459        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4460$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4461        as_fn_error $? "Cannot continue" "$LINENO" 5
4462    fi
4463
4464
4465
4466    for ac_prog in echo
4467do
4468  # Extract the first word of "$ac_prog", so it can be a program name with args.
4469set dummy $ac_prog; ac_word=$2
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471$as_echo_n "checking for $ac_word... " >&6; }
4472if test "${ac_cv_path_ECHO+set}" = set; then :
4473  $as_echo_n "(cached) " >&6
4474else
4475  case $ECHO in
4476  [\\/]* | ?:[\\/]*)
4477  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4478  ;;
4479  *)
4480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in $PATH
4482do
4483  IFS=$as_save_IFS
4484  test -z "$as_dir" && as_dir=.
4485    for ac_exec_ext in '' $ac_executable_extensions; do
4486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4487    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489    break 2
4490  fi
4491done
4492  done
4493IFS=$as_save_IFS
4494
4495  ;;
4496esac
4497fi
4498ECHO=$ac_cv_path_ECHO
4499if test -n "$ECHO"; then
4500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4501$as_echo "$ECHO" >&6; }
4502else
4503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504$as_echo "no" >&6; }
4505fi
4506
4507
4508  test -n "$ECHO" && break
4509done
4510
4511
4512    if test "x$ECHO" = x; then
4513        if test "xecho" = x; then
4514          PROG_NAME=echo
4515        else
4516          PROG_NAME=echo
4517        fi
4518        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4519$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4520        as_fn_error $? "Cannot continue" "$LINENO" 5
4521    fi
4522
4523
4524
4525    for ac_prog in expr
4526do
4527  # Extract the first word of "$ac_prog", so it can be a program name with args.
4528set dummy $ac_prog; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
4531if test "${ac_cv_path_EXPR+set}" = set; then :
4532  $as_echo_n "(cached) " >&6
4533else
4534  case $EXPR in
4535  [\\/]* | ?:[\\/]*)
4536  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4537  ;;
4538  *)
4539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in $PATH
4541do
4542  IFS=$as_save_IFS
4543  test -z "$as_dir" && as_dir=.
4544    for ac_exec_ext in '' $ac_executable_extensions; do
4545  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4546    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4548    break 2
4549  fi
4550done
4551  done
4552IFS=$as_save_IFS
4553
4554  ;;
4555esac
4556fi
4557EXPR=$ac_cv_path_EXPR
4558if test -n "$EXPR"; then
4559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4560$as_echo "$EXPR" >&6; }
4561else
4562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
4564fi
4565
4566
4567  test -n "$EXPR" && break
4568done
4569
4570
4571    if test "x$EXPR" = x; then
4572        if test "xexpr" = x; then
4573          PROG_NAME=expr
4574        else
4575          PROG_NAME=expr
4576        fi
4577        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4578$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4579        as_fn_error $? "Cannot continue" "$LINENO" 5
4580    fi
4581
4582
4583
4584    for ac_prog in file
4585do
4586  # Extract the first word of "$ac_prog", so it can be a program name with args.
4587set dummy $ac_prog; ac_word=$2
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4589$as_echo_n "checking for $ac_word... " >&6; }
4590if test "${ac_cv_path_FILE+set}" = set; then :
4591  $as_echo_n "(cached) " >&6
4592else
4593  case $FILE in
4594  [\\/]* | ?:[\\/]*)
4595  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4596  ;;
4597  *)
4598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599for as_dir in $PATH
4600do
4601  IFS=$as_save_IFS
4602  test -z "$as_dir" && as_dir=.
4603    for ac_exec_ext in '' $ac_executable_extensions; do
4604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4605    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4607    break 2
4608  fi
4609done
4610  done
4611IFS=$as_save_IFS
4612
4613  ;;
4614esac
4615fi
4616FILE=$ac_cv_path_FILE
4617if test -n "$FILE"; then
4618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4619$as_echo "$FILE" >&6; }
4620else
4621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4622$as_echo "no" >&6; }
4623fi
4624
4625
4626  test -n "$FILE" && break
4627done
4628
4629
4630    if test "x$FILE" = x; then
4631        if test "xfile" = x; then
4632          PROG_NAME=file
4633        else
4634          PROG_NAME=file
4635        fi
4636        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4637$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4638        as_fn_error $? "Cannot continue" "$LINENO" 5
4639    fi
4640
4641
4642
4643    for ac_prog in find
4644do
4645  # Extract the first word of "$ac_prog", so it can be a program name with args.
4646set dummy $ac_prog; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if test "${ac_cv_path_FIND+set}" = set; then :
4650  $as_echo_n "(cached) " >&6
4651else
4652  case $FIND in
4653  [\\/]* | ?:[\\/]*)
4654  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4655  ;;
4656  *)
4657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in $PATH
4659do
4660  IFS=$as_save_IFS
4661  test -z "$as_dir" && as_dir=.
4662    for ac_exec_ext in '' $ac_executable_extensions; do
4663  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4664    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666    break 2
4667  fi
4668done
4669  done
4670IFS=$as_save_IFS
4671
4672  ;;
4673esac
4674fi
4675FIND=$ac_cv_path_FIND
4676if test -n "$FIND"; then
4677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4678$as_echo "$FIND" >&6; }
4679else
4680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685  test -n "$FIND" && break
4686done
4687
4688
4689    if test "x$FIND" = x; then
4690        if test "xfind" = x; then
4691          PROG_NAME=find
4692        else
4693          PROG_NAME=find
4694        fi
4695        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4696$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4697        as_fn_error $? "Cannot continue" "$LINENO" 5
4698    fi
4699
4700
4701
4702    for ac_prog in head
4703do
4704  # Extract the first word of "$ac_prog", so it can be a program name with args.
4705set dummy $ac_prog; ac_word=$2
4706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707$as_echo_n "checking for $ac_word... " >&6; }
4708if test "${ac_cv_path_HEAD+set}" = set; then :
4709  $as_echo_n "(cached) " >&6
4710else
4711  case $HEAD in
4712  [\\/]* | ?:[\\/]*)
4713  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4714  ;;
4715  *)
4716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717for as_dir in $PATH
4718do
4719  IFS=$as_save_IFS
4720  test -z "$as_dir" && as_dir=.
4721    for ac_exec_ext in '' $ac_executable_extensions; do
4722  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4723    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725    break 2
4726  fi
4727done
4728  done
4729IFS=$as_save_IFS
4730
4731  ;;
4732esac
4733fi
4734HEAD=$ac_cv_path_HEAD
4735if test -n "$HEAD"; then
4736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4737$as_echo "$HEAD" >&6; }
4738else
4739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4740$as_echo "no" >&6; }
4741fi
4742
4743
4744  test -n "$HEAD" && break
4745done
4746
4747
4748    if test "x$HEAD" = x; then
4749        if test "xhead" = x; then
4750          PROG_NAME=head
4751        else
4752          PROG_NAME=head
4753        fi
4754        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4755$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4756        as_fn_error $? "Cannot continue" "$LINENO" 5
4757    fi
4758
4759
4760
4761    for ac_prog in ln
4762do
4763  # Extract the first word of "$ac_prog", so it can be a program name with args.
4764set dummy $ac_prog; ac_word=$2
4765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4766$as_echo_n "checking for $ac_word... " >&6; }
4767if test "${ac_cv_path_LN+set}" = set; then :
4768  $as_echo_n "(cached) " >&6
4769else
4770  case $LN in
4771  [\\/]* | ?:[\\/]*)
4772  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4773  ;;
4774  *)
4775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4776for as_dir in $PATH
4777do
4778  IFS=$as_save_IFS
4779  test -z "$as_dir" && as_dir=.
4780    for ac_exec_ext in '' $ac_executable_extensions; do
4781  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4782    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4784    break 2
4785  fi
4786done
4787  done
4788IFS=$as_save_IFS
4789
4790  ;;
4791esac
4792fi
4793LN=$ac_cv_path_LN
4794if test -n "$LN"; then
4795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4796$as_echo "$LN" >&6; }
4797else
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799$as_echo "no" >&6; }
4800fi
4801
4802
4803  test -n "$LN" && break
4804done
4805
4806
4807    if test "x$LN" = x; then
4808        if test "xln" = x; then
4809          PROG_NAME=ln
4810        else
4811          PROG_NAME=ln
4812        fi
4813        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4814$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4815        as_fn_error $? "Cannot continue" "$LINENO" 5
4816    fi
4817
4818
4819
4820    for ac_prog in ls
4821do
4822  # Extract the first word of "$ac_prog", so it can be a program name with args.
4823set dummy $ac_prog; ac_word=$2
4824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
4826if test "${ac_cv_path_LS+set}" = set; then :
4827  $as_echo_n "(cached) " >&6
4828else
4829  case $LS in
4830  [\\/]* | ?:[\\/]*)
4831  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4832  ;;
4833  *)
4834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in $PATH
4836do
4837  IFS=$as_save_IFS
4838  test -z "$as_dir" && as_dir=.
4839    for ac_exec_ext in '' $ac_executable_extensions; do
4840  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4841    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843    break 2
4844  fi
4845done
4846  done
4847IFS=$as_save_IFS
4848
4849  ;;
4850esac
4851fi
4852LS=$ac_cv_path_LS
4853if test -n "$LS"; then
4854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4855$as_echo "$LS" >&6; }
4856else
4857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858$as_echo "no" >&6; }
4859fi
4860
4861
4862  test -n "$LS" && break
4863done
4864
4865
4866    if test "x$LS" = x; then
4867        if test "xls" = x; then
4868          PROG_NAME=ls
4869        else
4870          PROG_NAME=ls
4871        fi
4872        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4873$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4874        as_fn_error $? "Cannot continue" "$LINENO" 5
4875    fi
4876
4877
4878
4879    for ac_prog in mkdir
4880do
4881  # Extract the first word of "$ac_prog", so it can be a program name with args.
4882set dummy $ac_prog; ac_word=$2
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884$as_echo_n "checking for $ac_word... " >&6; }
4885if test "${ac_cv_path_MKDIR+set}" = set; then :
4886  $as_echo_n "(cached) " >&6
4887else
4888  case $MKDIR in
4889  [\\/]* | ?:[\\/]*)
4890  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4891  ;;
4892  *)
4893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894for as_dir in $PATH
4895do
4896  IFS=$as_save_IFS
4897  test -z "$as_dir" && as_dir=.
4898    for ac_exec_ext in '' $ac_executable_extensions; do
4899  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4900    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902    break 2
4903  fi
4904done
4905  done
4906IFS=$as_save_IFS
4907
4908  ;;
4909esac
4910fi
4911MKDIR=$ac_cv_path_MKDIR
4912if test -n "$MKDIR"; then
4913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4914$as_echo "$MKDIR" >&6; }
4915else
4916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917$as_echo "no" >&6; }
4918fi
4919
4920
4921  test -n "$MKDIR" && break
4922done
4923
4924
4925    if test "x$MKDIR" = x; then
4926        if test "xmkdir" = x; then
4927          PROG_NAME=mkdir
4928        else
4929          PROG_NAME=mkdir
4930        fi
4931        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4932$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4933        as_fn_error $? "Cannot continue" "$LINENO" 5
4934    fi
4935
4936
4937
4938    for ac_prog in mktemp
4939do
4940  # Extract the first word of "$ac_prog", so it can be a program name with args.
4941set dummy $ac_prog; ac_word=$2
4942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4943$as_echo_n "checking for $ac_word... " >&6; }
4944if test "${ac_cv_path_MKTEMP+set}" = set; then :
4945  $as_echo_n "(cached) " >&6
4946else
4947  case $MKTEMP in
4948  [\\/]* | ?:[\\/]*)
4949  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4950  ;;
4951  *)
4952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4953for as_dir in $PATH
4954do
4955  IFS=$as_save_IFS
4956  test -z "$as_dir" && as_dir=.
4957    for ac_exec_ext in '' $ac_executable_extensions; do
4958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4959    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4961    break 2
4962  fi
4963done
4964  done
4965IFS=$as_save_IFS
4966
4967  ;;
4968esac
4969fi
4970MKTEMP=$ac_cv_path_MKTEMP
4971if test -n "$MKTEMP"; then
4972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4973$as_echo "$MKTEMP" >&6; }
4974else
4975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976$as_echo "no" >&6; }
4977fi
4978
4979
4980  test -n "$MKTEMP" && break
4981done
4982
4983
4984    if test "x$MKTEMP" = x; then
4985        if test "xmktemp" = x; then
4986          PROG_NAME=mktemp
4987        else
4988          PROG_NAME=mktemp
4989        fi
4990        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4991$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4992        as_fn_error $? "Cannot continue" "$LINENO" 5
4993    fi
4994
4995
4996
4997    for ac_prog in mv
4998do
4999  # Extract the first word of "$ac_prog", so it can be a program name with args.
5000set dummy $ac_prog; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if test "${ac_cv_path_MV+set}" = set; then :
5004  $as_echo_n "(cached) " >&6
5005else
5006  case $MV in
5007  [\\/]* | ?:[\\/]*)
5008  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5009  ;;
5010  *)
5011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014  IFS=$as_save_IFS
5015  test -z "$as_dir" && as_dir=.
5016    for ac_exec_ext in '' $ac_executable_extensions; do
5017  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020    break 2
5021  fi
5022done
5023  done
5024IFS=$as_save_IFS
5025
5026  ;;
5027esac
5028fi
5029MV=$ac_cv_path_MV
5030if test -n "$MV"; then
5031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5032$as_echo "$MV" >&6; }
5033else
5034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039  test -n "$MV" && break
5040done
5041
5042
5043    if test "x$MV" = x; then
5044        if test "xmv" = x; then
5045          PROG_NAME=mv
5046        else
5047          PROG_NAME=mv
5048        fi
5049        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5050$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5051        as_fn_error $? "Cannot continue" "$LINENO" 5
5052    fi
5053
5054
5055
5056    for ac_prog in printf
5057do
5058  # Extract the first word of "$ac_prog", so it can be a program name with args.
5059set dummy $ac_prog; ac_word=$2
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
5062if test "${ac_cv_path_PRINTF+set}" = set; then :
5063  $as_echo_n "(cached) " >&6
5064else
5065  case $PRINTF in
5066  [\\/]* | ?:[\\/]*)
5067  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5068  ;;
5069  *)
5070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071for as_dir in $PATH
5072do
5073  IFS=$as_save_IFS
5074  test -z "$as_dir" && as_dir=.
5075    for ac_exec_ext in '' $ac_executable_extensions; do
5076  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5077    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079    break 2
5080  fi
5081done
5082  done
5083IFS=$as_save_IFS
5084
5085  ;;
5086esac
5087fi
5088PRINTF=$ac_cv_path_PRINTF
5089if test -n "$PRINTF"; then
5090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5091$as_echo "$PRINTF" >&6; }
5092else
5093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094$as_echo "no" >&6; }
5095fi
5096
5097
5098  test -n "$PRINTF" && break
5099done
5100
5101
5102    if test "x$PRINTF" = x; then
5103        if test "xprintf" = x; then
5104          PROG_NAME=printf
5105        else
5106          PROG_NAME=printf
5107        fi
5108        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5109$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5110        as_fn_error $? "Cannot continue" "$LINENO" 5
5111    fi
5112
5113
5114
5115    for ac_prog in pwd
5116do
5117  # Extract the first word of "$ac_prog", so it can be a program name with args.
5118set dummy $ac_prog; ac_word=$2
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5120$as_echo_n "checking for $ac_word... " >&6; }
5121if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5122  $as_echo_n "(cached) " >&6
5123else
5124  case $THEPWDCMD in
5125  [\\/]* | ?:[\\/]*)
5126  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5127  ;;
5128  *)
5129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5130for as_dir in $PATH
5131do
5132  IFS=$as_save_IFS
5133  test -z "$as_dir" && as_dir=.
5134    for ac_exec_ext in '' $ac_executable_extensions; do
5135  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5136    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5138    break 2
5139  fi
5140done
5141  done
5142IFS=$as_save_IFS
5143
5144  ;;
5145esac
5146fi
5147THEPWDCMD=$ac_cv_path_THEPWDCMD
5148if test -n "$THEPWDCMD"; then
5149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5150$as_echo "$THEPWDCMD" >&6; }
5151else
5152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5153$as_echo "no" >&6; }
5154fi
5155
5156
5157  test -n "$THEPWDCMD" && break
5158done
5159
5160
5161    if test "x$THEPWDCMD" = x; then
5162        if test "xpwd" = x; then
5163          PROG_NAME=thepwdcmd
5164        else
5165          PROG_NAME=pwd
5166        fi
5167        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5168$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5169        as_fn_error $? "Cannot continue" "$LINENO" 5
5170    fi
5171
5172
5173
5174    for ac_prog in rm
5175do
5176  # Extract the first word of "$ac_prog", so it can be a program name with args.
5177set dummy $ac_prog; ac_word=$2
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179$as_echo_n "checking for $ac_word... " >&6; }
5180if test "${ac_cv_path_RM+set}" = set; then :
5181  $as_echo_n "(cached) " >&6
5182else
5183  case $RM in
5184  [\\/]* | ?:[\\/]*)
5185  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5186  ;;
5187  *)
5188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189for as_dir in $PATH
5190do
5191  IFS=$as_save_IFS
5192  test -z "$as_dir" && as_dir=.
5193    for ac_exec_ext in '' $ac_executable_extensions; do
5194  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5195    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197    break 2
5198  fi
5199done
5200  done
5201IFS=$as_save_IFS
5202
5203  ;;
5204esac
5205fi
5206RM=$ac_cv_path_RM
5207if test -n "$RM"; then
5208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5209$as_echo "$RM" >&6; }
5210else
5211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212$as_echo "no" >&6; }
5213fi
5214
5215
5216  test -n "$RM" && break
5217done
5218
5219
5220    if test "x$RM" = x; then
5221        if test "xrm" = x; then
5222          PROG_NAME=rm
5223        else
5224          PROG_NAME=rm
5225        fi
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5227$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5228        as_fn_error $? "Cannot continue" "$LINENO" 5
5229    fi
5230
5231
5232
5233    for ac_prog in sh
5234do
5235  # Extract the first word of "$ac_prog", so it can be a program name with args.
5236set dummy $ac_prog; ac_word=$2
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5238$as_echo_n "checking for $ac_word... " >&6; }
5239if test "${ac_cv_path_SH+set}" = set; then :
5240  $as_echo_n "(cached) " >&6
5241else
5242  case $SH in
5243  [\\/]* | ?:[\\/]*)
5244  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5245  ;;
5246  *)
5247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248for as_dir in $PATH
5249do
5250  IFS=$as_save_IFS
5251  test -z "$as_dir" && as_dir=.
5252    for ac_exec_ext in '' $ac_executable_extensions; do
5253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5254    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5256    break 2
5257  fi
5258done
5259  done
5260IFS=$as_save_IFS
5261
5262  ;;
5263esac
5264fi
5265SH=$ac_cv_path_SH
5266if test -n "$SH"; then
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5268$as_echo "$SH" >&6; }
5269else
5270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271$as_echo "no" >&6; }
5272fi
5273
5274
5275  test -n "$SH" && break
5276done
5277
5278
5279    if test "x$SH" = x; then
5280        if test "xsh" = x; then
5281          PROG_NAME=sh
5282        else
5283          PROG_NAME=sh
5284        fi
5285        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5286$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5287        as_fn_error $? "Cannot continue" "$LINENO" 5
5288    fi
5289
5290
5291
5292    for ac_prog in sort
5293do
5294  # Extract the first word of "$ac_prog", so it can be a program name with args.
5295set dummy $ac_prog; ac_word=$2
5296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297$as_echo_n "checking for $ac_word... " >&6; }
5298if test "${ac_cv_path_SORT+set}" = set; then :
5299  $as_echo_n "(cached) " >&6
5300else
5301  case $SORT in
5302  [\\/]* | ?:[\\/]*)
5303  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5304  ;;
5305  *)
5306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307for as_dir in $PATH
5308do
5309  IFS=$as_save_IFS
5310  test -z "$as_dir" && as_dir=.
5311    for ac_exec_ext in '' $ac_executable_extensions; do
5312  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5313    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315    break 2
5316  fi
5317done
5318  done
5319IFS=$as_save_IFS
5320
5321  ;;
5322esac
5323fi
5324SORT=$ac_cv_path_SORT
5325if test -n "$SORT"; then
5326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5327$as_echo "$SORT" >&6; }
5328else
5329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }
5331fi
5332
5333
5334  test -n "$SORT" && break
5335done
5336
5337
5338    if test "x$SORT" = x; then
5339        if test "xsort" = x; then
5340          PROG_NAME=sort
5341        else
5342          PROG_NAME=sort
5343        fi
5344        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5345$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5346        as_fn_error $? "Cannot continue" "$LINENO" 5
5347    fi
5348
5349
5350
5351    for ac_prog in tail
5352do
5353  # Extract the first word of "$ac_prog", so it can be a program name with args.
5354set dummy $ac_prog; ac_word=$2
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356$as_echo_n "checking for $ac_word... " >&6; }
5357if test "${ac_cv_path_TAIL+set}" = set; then :
5358  $as_echo_n "(cached) " >&6
5359else
5360  case $TAIL in
5361  [\\/]* | ?:[\\/]*)
5362  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5363  ;;
5364  *)
5365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366for as_dir in $PATH
5367do
5368  IFS=$as_save_IFS
5369  test -z "$as_dir" && as_dir=.
5370    for ac_exec_ext in '' $ac_executable_extensions; do
5371  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5372    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374    break 2
5375  fi
5376done
5377  done
5378IFS=$as_save_IFS
5379
5380  ;;
5381esac
5382fi
5383TAIL=$ac_cv_path_TAIL
5384if test -n "$TAIL"; then
5385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5386$as_echo "$TAIL" >&6; }
5387else
5388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389$as_echo "no" >&6; }
5390fi
5391
5392
5393  test -n "$TAIL" && break
5394done
5395
5396
5397    if test "x$TAIL" = x; then
5398        if test "xtail" = x; then
5399          PROG_NAME=tail
5400        else
5401          PROG_NAME=tail
5402        fi
5403        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5404$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5405        as_fn_error $? "Cannot continue" "$LINENO" 5
5406    fi
5407
5408
5409
5410    for ac_prog in tar
5411do
5412  # Extract the first word of "$ac_prog", so it can be a program name with args.
5413set dummy $ac_prog; ac_word=$2
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5415$as_echo_n "checking for $ac_word... " >&6; }
5416if test "${ac_cv_path_TAR+set}" = set; then :
5417  $as_echo_n "(cached) " >&6
5418else
5419  case $TAR in
5420  [\\/]* | ?:[\\/]*)
5421  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5422  ;;
5423  *)
5424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5425for as_dir in $PATH
5426do
5427  IFS=$as_save_IFS
5428  test -z "$as_dir" && as_dir=.
5429    for ac_exec_ext in '' $ac_executable_extensions; do
5430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5431    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5433    break 2
5434  fi
5435done
5436  done
5437IFS=$as_save_IFS
5438
5439  ;;
5440esac
5441fi
5442TAR=$ac_cv_path_TAR
5443if test -n "$TAR"; then
5444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5445$as_echo "$TAR" >&6; }
5446else
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448$as_echo "no" >&6; }
5449fi
5450
5451
5452  test -n "$TAR" && break
5453done
5454
5455
5456    if test "x$TAR" = x; then
5457        if test "xtar" = x; then
5458          PROG_NAME=tar
5459        else
5460          PROG_NAME=tar
5461        fi
5462        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5463$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5464        as_fn_error $? "Cannot continue" "$LINENO" 5
5465    fi
5466
5467
5468
5469    for ac_prog in tee
5470do
5471  # Extract the first word of "$ac_prog", so it can be a program name with args.
5472set dummy $ac_prog; ac_word=$2
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474$as_echo_n "checking for $ac_word... " >&6; }
5475if test "${ac_cv_path_TEE+set}" = set; then :
5476  $as_echo_n "(cached) " >&6
5477else
5478  case $TEE in
5479  [\\/]* | ?:[\\/]*)
5480  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5481  ;;
5482  *)
5483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486  IFS=$as_save_IFS
5487  test -z "$as_dir" && as_dir=.
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5490    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498  ;;
5499esac
5500fi
5501TEE=$ac_cv_path_TEE
5502if test -n "$TEE"; then
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5504$as_echo "$TEE" >&6; }
5505else
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
5508fi
5509
5510
5511  test -n "$TEE" && break
5512done
5513
5514
5515    if test "x$TEE" = x; then
5516        if test "xtee" = x; then
5517          PROG_NAME=tee
5518        else
5519          PROG_NAME=tee
5520        fi
5521        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5522$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5523        as_fn_error $? "Cannot continue" "$LINENO" 5
5524    fi
5525
5526
5527
5528    for ac_prog in touch
5529do
5530  # Extract the first word of "$ac_prog", so it can be a program name with args.
5531set dummy $ac_prog; ac_word=$2
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533$as_echo_n "checking for $ac_word... " >&6; }
5534if test "${ac_cv_path_TOUCH+set}" = set; then :
5535  $as_echo_n "(cached) " >&6
5536else
5537  case $TOUCH in
5538  [\\/]* | ?:[\\/]*)
5539  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5540  ;;
5541  *)
5542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543for as_dir in $PATH
5544do
5545  IFS=$as_save_IFS
5546  test -z "$as_dir" && as_dir=.
5547    for ac_exec_ext in '' $ac_executable_extensions; do
5548  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5549    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551    break 2
5552  fi
5553done
5554  done
5555IFS=$as_save_IFS
5556
5557  ;;
5558esac
5559fi
5560TOUCH=$ac_cv_path_TOUCH
5561if test -n "$TOUCH"; then
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5563$as_echo "$TOUCH" >&6; }
5564else
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }
5567fi
5568
5569
5570  test -n "$TOUCH" && break
5571done
5572
5573
5574    if test "x$TOUCH" = x; then
5575        if test "xtouch" = x; then
5576          PROG_NAME=touch
5577        else
5578          PROG_NAME=touch
5579        fi
5580        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5581$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5582        as_fn_error $? "Cannot continue" "$LINENO" 5
5583    fi
5584
5585
5586
5587    for ac_prog in tr
5588do
5589  # Extract the first word of "$ac_prog", so it can be a program name with args.
5590set dummy $ac_prog; ac_word=$2
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592$as_echo_n "checking for $ac_word... " >&6; }
5593if test "${ac_cv_path_TR+set}" = set; then :
5594  $as_echo_n "(cached) " >&6
5595else
5596  case $TR in
5597  [\\/]* | ?:[\\/]*)
5598  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5599  ;;
5600  *)
5601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602for as_dir in $PATH
5603do
5604  IFS=$as_save_IFS
5605  test -z "$as_dir" && as_dir=.
5606    for ac_exec_ext in '' $ac_executable_extensions; do
5607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5608    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610    break 2
5611  fi
5612done
5613  done
5614IFS=$as_save_IFS
5615
5616  ;;
5617esac
5618fi
5619TR=$ac_cv_path_TR
5620if test -n "$TR"; then
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5622$as_echo "$TR" >&6; }
5623else
5624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5625$as_echo "no" >&6; }
5626fi
5627
5628
5629  test -n "$TR" && break
5630done
5631
5632
5633    if test "x$TR" = x; then
5634        if test "xtr" = x; then
5635          PROG_NAME=tr
5636        else
5637          PROG_NAME=tr
5638        fi
5639        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5640$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5641        as_fn_error $? "Cannot continue" "$LINENO" 5
5642    fi
5643
5644
5645
5646    for ac_prog in uname
5647do
5648  # Extract the first word of "$ac_prog", so it can be a program name with args.
5649set dummy $ac_prog; ac_word=$2
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651$as_echo_n "checking for $ac_word... " >&6; }
5652if test "${ac_cv_path_UNAME+set}" = set; then :
5653  $as_echo_n "(cached) " >&6
5654else
5655  case $UNAME in
5656  [\\/]* | ?:[\\/]*)
5657  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5658  ;;
5659  *)
5660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661for as_dir in $PATH
5662do
5663  IFS=$as_save_IFS
5664  test -z "$as_dir" && as_dir=.
5665    for ac_exec_ext in '' $ac_executable_extensions; do
5666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5667    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669    break 2
5670  fi
5671done
5672  done
5673IFS=$as_save_IFS
5674
5675  ;;
5676esac
5677fi
5678UNAME=$ac_cv_path_UNAME
5679if test -n "$UNAME"; then
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5681$as_echo "$UNAME" >&6; }
5682else
5683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684$as_echo "no" >&6; }
5685fi
5686
5687
5688  test -n "$UNAME" && break
5689done
5690
5691
5692    if test "x$UNAME" = x; then
5693        if test "xuname" = x; then
5694          PROG_NAME=uname
5695        else
5696          PROG_NAME=uname
5697        fi
5698        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5699$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5700        as_fn_error $? "Cannot continue" "$LINENO" 5
5701    fi
5702
5703
5704
5705    for ac_prog in uniq
5706do
5707  # Extract the first word of "$ac_prog", so it can be a program name with args.
5708set dummy $ac_prog; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if test "${ac_cv_path_UNIQ+set}" = set; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $UNIQ in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5726    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737UNIQ=$ac_cv_path_UNIQ
5738if test -n "$UNIQ"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5740$as_echo "$UNIQ" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747  test -n "$UNIQ" && break
5748done
5749
5750
5751    if test "x$UNIQ" = x; then
5752        if test "xuniq" = x; then
5753          PROG_NAME=uniq
5754        else
5755          PROG_NAME=uniq
5756        fi
5757        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5758$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5759        as_fn_error $? "Cannot continue" "$LINENO" 5
5760    fi
5761
5762
5763
5764    for ac_prog in wc
5765do
5766  # Extract the first word of "$ac_prog", so it can be a program name with args.
5767set dummy $ac_prog; ac_word=$2
5768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5769$as_echo_n "checking for $ac_word... " >&6; }
5770if test "${ac_cv_path_WC+set}" = set; then :
5771  $as_echo_n "(cached) " >&6
5772else
5773  case $WC in
5774  [\\/]* | ?:[\\/]*)
5775  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5776  ;;
5777  *)
5778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779for as_dir in $PATH
5780do
5781  IFS=$as_save_IFS
5782  test -z "$as_dir" && as_dir=.
5783    for ac_exec_ext in '' $ac_executable_extensions; do
5784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5785    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5787    break 2
5788  fi
5789done
5790  done
5791IFS=$as_save_IFS
5792
5793  ;;
5794esac
5795fi
5796WC=$ac_cv_path_WC
5797if test -n "$WC"; then
5798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5799$as_echo "$WC" >&6; }
5800else
5801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802$as_echo "no" >&6; }
5803fi
5804
5805
5806  test -n "$WC" && break
5807done
5808
5809
5810    if test "x$WC" = x; then
5811        if test "xwc" = x; then
5812          PROG_NAME=wc
5813        else
5814          PROG_NAME=wc
5815        fi
5816        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5817$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5818        as_fn_error $? "Cannot continue" "$LINENO" 5
5819    fi
5820
5821
5822
5823    for ac_prog in which
5824do
5825  # Extract the first word of "$ac_prog", so it can be a program name with args.
5826set dummy $ac_prog; ac_word=$2
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828$as_echo_n "checking for $ac_word... " >&6; }
5829if test "${ac_cv_path_WHICH+set}" = set; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  case $WHICH in
5833  [\\/]* | ?:[\\/]*)
5834  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5835  ;;
5836  *)
5837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838for as_dir in $PATH
5839do
5840  IFS=$as_save_IFS
5841  test -z "$as_dir" && as_dir=.
5842    for ac_exec_ext in '' $ac_executable_extensions; do
5843  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5844    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846    break 2
5847  fi
5848done
5849  done
5850IFS=$as_save_IFS
5851
5852  ;;
5853esac
5854fi
5855WHICH=$ac_cv_path_WHICH
5856if test -n "$WHICH"; then
5857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5858$as_echo "$WHICH" >&6; }
5859else
5860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861$as_echo "no" >&6; }
5862fi
5863
5864
5865  test -n "$WHICH" && break
5866done
5867
5868
5869    if test "x$WHICH" = x; then
5870        if test "xwhich" = x; then
5871          PROG_NAME=which
5872        else
5873          PROG_NAME=which
5874        fi
5875        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5876$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5877        as_fn_error $? "Cannot continue" "$LINENO" 5
5878    fi
5879
5880
5881
5882    for ac_prog in xargs
5883do
5884  # Extract the first word of "$ac_prog", so it can be a program name with args.
5885set dummy $ac_prog; ac_word=$2
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887$as_echo_n "checking for $ac_word... " >&6; }
5888if test "${ac_cv_path_XARGS+set}" = set; then :
5889  $as_echo_n "(cached) " >&6
5890else
5891  case $XARGS in
5892  [\\/]* | ?:[\\/]*)
5893  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5894  ;;
5895  *)
5896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH
5898do
5899  IFS=$as_save_IFS
5900  test -z "$as_dir" && as_dir=.
5901    for ac_exec_ext in '' $ac_executable_extensions; do
5902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5903    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905    break 2
5906  fi
5907done
5908  done
5909IFS=$as_save_IFS
5910
5911  ;;
5912esac
5913fi
5914XARGS=$ac_cv_path_XARGS
5915if test -n "$XARGS"; then
5916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5917$as_echo "$XARGS" >&6; }
5918else
5919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
5921fi
5922
5923
5924  test -n "$XARGS" && break
5925done
5926
5927
5928    if test "x$XARGS" = x; then
5929        if test "xxargs" = x; then
5930          PROG_NAME=xargs
5931        else
5932          PROG_NAME=xargs
5933        fi
5934        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5935$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5936        as_fn_error $? "Cannot continue" "$LINENO" 5
5937    fi
5938
5939
5940
5941# Then required tools that require some special treatment.
5942for ac_prog in gawk mawk nawk awk
5943do
5944  # Extract the first word of "$ac_prog", so it can be a program name with args.
5945set dummy $ac_prog; ac_word=$2
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947$as_echo_n "checking for $ac_word... " >&6; }
5948if test "${ac_cv_prog_AWK+set}" = set; then :
5949  $as_echo_n "(cached) " >&6
5950else
5951  if test -n "$AWK"; then
5952  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5953else
5954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH
5956do
5957  IFS=$as_save_IFS
5958  test -z "$as_dir" && as_dir=.
5959    for ac_exec_ext in '' $ac_executable_extensions; do
5960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5961    ac_cv_prog_AWK="$ac_prog"
5962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963    break 2
5964  fi
5965done
5966  done
5967IFS=$as_save_IFS
5968
5969fi
5970fi
5971AWK=$ac_cv_prog_AWK
5972if test -n "$AWK"; then
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5974$as_echo "$AWK" >&6; }
5975else
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
5978fi
5979
5980
5981  test -n "$AWK" && break
5982done
5983
5984
5985    if test "x$AWK" = x; then
5986        if test "x" = x; then
5987          PROG_NAME=awk
5988        else
5989          PROG_NAME=
5990        fi
5991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5993        as_fn_error $? "Cannot continue" "$LINENO" 5
5994    fi
5995
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5997$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5998if test "${ac_cv_path_GREP+set}" = set; then :
5999  $as_echo_n "(cached) " >&6
6000else
6001  if test -z "$GREP"; then
6002  ac_path_GREP_found=false
6003  # Loop through the user's path and test for each of PROGNAME-LIST
6004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6006do
6007  IFS=$as_save_IFS
6008  test -z "$as_dir" && as_dir=.
6009    for ac_prog in grep ggrep; do
6010    for ac_exec_ext in '' $ac_executable_extensions; do
6011      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6012      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6013# Check for GNU ac_path_GREP and select it if it is found.
6014  # Check for GNU $ac_path_GREP
6015case `"$ac_path_GREP" --version 2>&1` in
6016*GNU*)
6017  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6018*)
6019  ac_count=0
6020  $as_echo_n 0123456789 >"conftest.in"
6021  while :
6022  do
6023    cat "conftest.in" "conftest.in" >"conftest.tmp"
6024    mv "conftest.tmp" "conftest.in"
6025    cp "conftest.in" "conftest.nl"
6026    $as_echo 'GREP' >> "conftest.nl"
6027    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6028    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6029    as_fn_arith $ac_count + 1 && ac_count=$as_val
6030    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6031      # Best one so far, save it but keep looking for a better one
6032      ac_cv_path_GREP="$ac_path_GREP"
6033      ac_path_GREP_max=$ac_count
6034    fi
6035    # 10*(2^10) chars as input seems more than enough
6036    test $ac_count -gt 10 && break
6037  done
6038  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6039esac
6040
6041      $ac_path_GREP_found && break 3
6042    done
6043  done
6044  done
6045IFS=$as_save_IFS
6046  if test -z "$ac_cv_path_GREP"; then
6047    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6048  fi
6049else
6050  ac_cv_path_GREP=$GREP
6051fi
6052
6053fi
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6055$as_echo "$ac_cv_path_GREP" >&6; }
6056 GREP="$ac_cv_path_GREP"
6057
6058
6059
6060    if test "x$GREP" = x; then
6061        if test "x" = x; then
6062          PROG_NAME=grep
6063        else
6064          PROG_NAME=
6065        fi
6066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6067$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6068        as_fn_error $? "Cannot continue" "$LINENO" 5
6069    fi
6070
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6072$as_echo_n "checking for egrep... " >&6; }
6073if test "${ac_cv_path_EGREP+set}" = set; then :
6074  $as_echo_n "(cached) " >&6
6075else
6076  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6077   then ac_cv_path_EGREP="$GREP -E"
6078   else
6079     if test -z "$EGREP"; then
6080  ac_path_EGREP_found=false
6081  # Loop through the user's path and test for each of PROGNAME-LIST
6082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6084do
6085  IFS=$as_save_IFS
6086  test -z "$as_dir" && as_dir=.
6087    for ac_prog in egrep; do
6088    for ac_exec_ext in '' $ac_executable_extensions; do
6089      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6090      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6091# Check for GNU ac_path_EGREP and select it if it is found.
6092  # Check for GNU $ac_path_EGREP
6093case `"$ac_path_EGREP" --version 2>&1` in
6094*GNU*)
6095  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6096*)
6097  ac_count=0
6098  $as_echo_n 0123456789 >"conftest.in"
6099  while :
6100  do
6101    cat "conftest.in" "conftest.in" >"conftest.tmp"
6102    mv "conftest.tmp" "conftest.in"
6103    cp "conftest.in" "conftest.nl"
6104    $as_echo 'EGREP' >> "conftest.nl"
6105    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6106    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6107    as_fn_arith $ac_count + 1 && ac_count=$as_val
6108    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6109      # Best one so far, save it but keep looking for a better one
6110      ac_cv_path_EGREP="$ac_path_EGREP"
6111      ac_path_EGREP_max=$ac_count
6112    fi
6113    # 10*(2^10) chars as input seems more than enough
6114    test $ac_count -gt 10 && break
6115  done
6116  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6117esac
6118
6119      $ac_path_EGREP_found && break 3
6120    done
6121  done
6122  done
6123IFS=$as_save_IFS
6124  if test -z "$ac_cv_path_EGREP"; then
6125    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6126  fi
6127else
6128  ac_cv_path_EGREP=$EGREP
6129fi
6130
6131   fi
6132fi
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6134$as_echo "$ac_cv_path_EGREP" >&6; }
6135 EGREP="$ac_cv_path_EGREP"
6136
6137
6138
6139    if test "x$EGREP" = x; then
6140        if test "x" = x; then
6141          PROG_NAME=egrep
6142        else
6143          PROG_NAME=
6144        fi
6145        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6146$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6147        as_fn_error $? "Cannot continue" "$LINENO" 5
6148    fi
6149
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6151$as_echo_n "checking for fgrep... " >&6; }
6152if test "${ac_cv_path_FGREP+set}" = set; then :
6153  $as_echo_n "(cached) " >&6
6154else
6155  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6156   then ac_cv_path_FGREP="$GREP -F"
6157   else
6158     if test -z "$FGREP"; then
6159  ac_path_FGREP_found=false
6160  # Loop through the user's path and test for each of PROGNAME-LIST
6161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6163do
6164  IFS=$as_save_IFS
6165  test -z "$as_dir" && as_dir=.
6166    for ac_prog in fgrep; do
6167    for ac_exec_ext in '' $ac_executable_extensions; do
6168      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6169      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6170# Check for GNU ac_path_FGREP and select it if it is found.
6171  # Check for GNU $ac_path_FGREP
6172case `"$ac_path_FGREP" --version 2>&1` in
6173*GNU*)
6174  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6175*)
6176  ac_count=0
6177  $as_echo_n 0123456789 >"conftest.in"
6178  while :
6179  do
6180    cat "conftest.in" "conftest.in" >"conftest.tmp"
6181    mv "conftest.tmp" "conftest.in"
6182    cp "conftest.in" "conftest.nl"
6183    $as_echo 'FGREP' >> "conftest.nl"
6184    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6185    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6186    as_fn_arith $ac_count + 1 && ac_count=$as_val
6187    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6188      # Best one so far, save it but keep looking for a better one
6189      ac_cv_path_FGREP="$ac_path_FGREP"
6190      ac_path_FGREP_max=$ac_count
6191    fi
6192    # 10*(2^10) chars as input seems more than enough
6193    test $ac_count -gt 10 && break
6194  done
6195  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6196esac
6197
6198      $ac_path_FGREP_found && break 3
6199    done
6200  done
6201  done
6202IFS=$as_save_IFS
6203  if test -z "$ac_cv_path_FGREP"; then
6204    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6205  fi
6206else
6207  ac_cv_path_FGREP=$FGREP
6208fi
6209
6210   fi
6211fi
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6213$as_echo "$ac_cv_path_FGREP" >&6; }
6214 FGREP="$ac_cv_path_FGREP"
6215
6216
6217
6218    if test "x$FGREP" = x; then
6219        if test "x" = x; then
6220          PROG_NAME=fgrep
6221        else
6222          PROG_NAME=
6223        fi
6224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6226        as_fn_error $? "Cannot continue" "$LINENO" 5
6227    fi
6228
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6230$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6231if test "${ac_cv_path_SED+set}" = set; then :
6232  $as_echo_n "(cached) " >&6
6233else
6234            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6235     for ac_i in 1 2 3 4 5 6 7; do
6236       ac_script="$ac_script$as_nl$ac_script"
6237     done
6238     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6239     { ac_script=; unset ac_script;}
6240     if test -z "$SED"; then
6241  ac_path_SED_found=false
6242  # Loop through the user's path and test for each of PROGNAME-LIST
6243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244for as_dir in $PATH
6245do
6246  IFS=$as_save_IFS
6247  test -z "$as_dir" && as_dir=.
6248    for ac_prog in sed gsed; do
6249    for ac_exec_ext in '' $ac_executable_extensions; do
6250      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6251      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6252# Check for GNU ac_path_SED and select it if it is found.
6253  # Check for GNU $ac_path_SED
6254case `"$ac_path_SED" --version 2>&1` in
6255*GNU*)
6256  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6257*)
6258  ac_count=0
6259  $as_echo_n 0123456789 >"conftest.in"
6260  while :
6261  do
6262    cat "conftest.in" "conftest.in" >"conftest.tmp"
6263    mv "conftest.tmp" "conftest.in"
6264    cp "conftest.in" "conftest.nl"
6265    $as_echo '' >> "conftest.nl"
6266    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6267    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6268    as_fn_arith $ac_count + 1 && ac_count=$as_val
6269    if test $ac_count -gt ${ac_path_SED_max-0}; then
6270      # Best one so far, save it but keep looking for a better one
6271      ac_cv_path_SED="$ac_path_SED"
6272      ac_path_SED_max=$ac_count
6273    fi
6274    # 10*(2^10) chars as input seems more than enough
6275    test $ac_count -gt 10 && break
6276  done
6277  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6278esac
6279
6280      $ac_path_SED_found && break 3
6281    done
6282  done
6283  done
6284IFS=$as_save_IFS
6285  if test -z "$ac_cv_path_SED"; then
6286    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6287  fi
6288else
6289  ac_cv_path_SED=$SED
6290fi
6291
6292fi
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6294$as_echo "$ac_cv_path_SED" >&6; }
6295 SED="$ac_cv_path_SED"
6296  rm -f conftest.sed
6297
6298
6299    if test "x$SED" = x; then
6300        if test "x" = x; then
6301          PROG_NAME=sed
6302        else
6303          PROG_NAME=
6304        fi
6305        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6306$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6307        as_fn_error $? "Cannot continue" "$LINENO" 5
6308    fi
6309
6310
6311for ac_prog in nawk gawk awk
6312do
6313  # Extract the first word of "$ac_prog", so it can be a program name with args.
6314set dummy $ac_prog; ac_word=$2
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6316$as_echo_n "checking for $ac_word... " >&6; }
6317if test "${ac_cv_path_NAWK+set}" = set; then :
6318  $as_echo_n "(cached) " >&6
6319else
6320  case $NAWK in
6321  [\\/]* | ?:[\\/]*)
6322  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6323  ;;
6324  *)
6325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6326for as_dir in $PATH
6327do
6328  IFS=$as_save_IFS
6329  test -z "$as_dir" && as_dir=.
6330    for ac_exec_ext in '' $ac_executable_extensions; do
6331  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6332    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6334    break 2
6335  fi
6336done
6337  done
6338IFS=$as_save_IFS
6339
6340  ;;
6341esac
6342fi
6343NAWK=$ac_cv_path_NAWK
6344if test -n "$NAWK"; then
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6346$as_echo "$NAWK" >&6; }
6347else
6348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; }
6350fi
6351
6352
6353  test -n "$NAWK" && break
6354done
6355
6356
6357    if test "x$NAWK" = x; then
6358        if test "x" = x; then
6359          PROG_NAME=nawk
6360        else
6361          PROG_NAME=
6362        fi
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6364$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6365        as_fn_error $? "Cannot continue" "$LINENO" 5
6366    fi
6367
6368
6369# Always force rm.
6370RM="$RM -f"
6371
6372# These are not required on all platforms
6373# Extract the first word of "cygpath", so it can be a program name with args.
6374set dummy cygpath; ac_word=$2
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6376$as_echo_n "checking for $ac_word... " >&6; }
6377if test "${ac_cv_path_CYGPATH+set}" = set; then :
6378  $as_echo_n "(cached) " >&6
6379else
6380  case $CYGPATH in
6381  [\\/]* | ?:[\\/]*)
6382  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6383  ;;
6384  *)
6385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6386for as_dir in $PATH
6387do
6388  IFS=$as_save_IFS
6389  test -z "$as_dir" && as_dir=.
6390    for ac_exec_ext in '' $ac_executable_extensions; do
6391  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6392    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6394    break 2
6395  fi
6396done
6397  done
6398IFS=$as_save_IFS
6399
6400  ;;
6401esac
6402fi
6403CYGPATH=$ac_cv_path_CYGPATH
6404if test -n "$CYGPATH"; then
6405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6406$as_echo "$CYGPATH" >&6; }
6407else
6408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
6412
6413# Extract the first word of "readlink", so it can be a program name with args.
6414set dummy readlink; ac_word=$2
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6416$as_echo_n "checking for $ac_word... " >&6; }
6417if test "${ac_cv_path_READLINK+set}" = set; then :
6418  $as_echo_n "(cached) " >&6
6419else
6420  case $READLINK in
6421  [\\/]* | ?:[\\/]*)
6422  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6423  ;;
6424  *)
6425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426for as_dir in $PATH
6427do
6428  IFS=$as_save_IFS
6429  test -z "$as_dir" && as_dir=.
6430    for ac_exec_ext in '' $ac_executable_extensions; do
6431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6432    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6434    break 2
6435  fi
6436done
6437  done
6438IFS=$as_save_IFS
6439
6440  ;;
6441esac
6442fi
6443READLINK=$ac_cv_path_READLINK
6444if test -n "$READLINK"; then
6445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6446$as_echo "$READLINK" >&6; }
6447else
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449$as_echo "no" >&6; }
6450fi
6451
6452
6453# Extract the first word of "df", so it can be a program name with args.
6454set dummy df; ac_word=$2
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6456$as_echo_n "checking for $ac_word... " >&6; }
6457if test "${ac_cv_path_DF+set}" = set; then :
6458  $as_echo_n "(cached) " >&6
6459else
6460  case $DF in
6461  [\\/]* | ?:[\\/]*)
6462  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6463  ;;
6464  *)
6465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6466for as_dir in $PATH
6467do
6468  IFS=$as_save_IFS
6469  test -z "$as_dir" && as_dir=.
6470    for ac_exec_ext in '' $ac_executable_extensions; do
6471  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6472    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6474    break 2
6475  fi
6476done
6477  done
6478IFS=$as_save_IFS
6479
6480  ;;
6481esac
6482fi
6483DF=$ac_cv_path_DF
6484if test -n "$DF"; then
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6486$as_echo "$DF" >&6; }
6487else
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492
6493# Extract the first word of "SetFile", so it can be a program name with args.
6494set dummy SetFile; ac_word=$2
6495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6496$as_echo_n "checking for $ac_word... " >&6; }
6497if test "${ac_cv_path_SETFILE+set}" = set; then :
6498  $as_echo_n "(cached) " >&6
6499else
6500  case $SETFILE in
6501  [\\/]* | ?:[\\/]*)
6502  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6503  ;;
6504  *)
6505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6506for as_dir in $PATH
6507do
6508  IFS=$as_save_IFS
6509  test -z "$as_dir" && as_dir=.
6510    for ac_exec_ext in '' $ac_executable_extensions; do
6511  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6512    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6514    break 2
6515  fi
6516done
6517  done
6518IFS=$as_save_IFS
6519
6520  ;;
6521esac
6522fi
6523SETFILE=$ac_cv_path_SETFILE
6524if test -n "$SETFILE"; then
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6526$as_echo "$SETFILE" >&6; }
6527else
6528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529$as_echo "no" >&6; }
6530fi
6531
6532
6533
6534
6535# Now we can determine OpenJDK build and target platforms. This is required to
6536# have early on.
6537# Make sure we can run config.sub.
6538$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6539  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6540
6541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6542$as_echo_n "checking build system type... " >&6; }
6543if test "${ac_cv_build+set}" = set; then :
6544  $as_echo_n "(cached) " >&6
6545else
6546  ac_build_alias=$build_alias
6547test "x$ac_build_alias" = x &&
6548  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6549test "x$ac_build_alias" = x &&
6550  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6551ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6552  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6553
6554fi
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6556$as_echo "$ac_cv_build" >&6; }
6557case $ac_cv_build in
6558*-*-*) ;;
6559*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6560esac
6561build=$ac_cv_build
6562ac_save_IFS=$IFS; IFS='-'
6563set x $ac_cv_build
6564shift
6565build_cpu=$1
6566build_vendor=$2
6567shift; shift
6568# Remember, the first character of IFS is used to create $*,
6569# except with old shells:
6570build_os=$*
6571IFS=$ac_save_IFS
6572case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6573
6574
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6576$as_echo_n "checking host system type... " >&6; }
6577if test "${ac_cv_host+set}" = set; then :
6578  $as_echo_n "(cached) " >&6
6579else
6580  if test "x$host_alias" = x; then
6581  ac_cv_host=$ac_cv_build
6582else
6583  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6584    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6585fi
6586
6587fi
6588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6589$as_echo "$ac_cv_host" >&6; }
6590case $ac_cv_host in
6591*-*-*) ;;
6592*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6593esac
6594host=$ac_cv_host
6595ac_save_IFS=$IFS; IFS='-'
6596set x $ac_cv_host
6597shift
6598host_cpu=$1
6599host_vendor=$2
6600shift; shift
6601# Remember, the first character of IFS is used to create $*,
6602# except with old shells:
6603host_os=$*
6604IFS=$ac_save_IFS
6605case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6606
6607
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6609$as_echo_n "checking target system type... " >&6; }
6610if test "${ac_cv_target+set}" = set; then :
6611  $as_echo_n "(cached) " >&6
6612else
6613  if test "x$target_alias" = x; then
6614  ac_cv_target=$ac_cv_host
6615else
6616  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6617    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6618fi
6619
6620fi
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6622$as_echo "$ac_cv_target" >&6; }
6623case $ac_cv_target in
6624*-*-*) ;;
6625*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6626esac
6627target=$ac_cv_target
6628ac_save_IFS=$IFS; IFS='-'
6629set x $ac_cv_target
6630shift
6631target_cpu=$1
6632target_vendor=$2
6633shift; shift
6634# Remember, the first character of IFS is used to create $*,
6635# except with old shells:
6636target_os=$*
6637IFS=$ac_save_IFS
6638case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6639
6640
6641# The aliases save the names the user supplied, while $host etc.
6642# will get canonicalized.
6643test -n "$target_alias" &&
6644  test "$program_prefix$program_suffix$program_transform_name" = \
6645    NONENONEs,x,x, &&
6646  program_prefix=${target_alias}-
6647
6648# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6649# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6650# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6651# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6652# to use the configure naming style.
6653
6654
6655
6656
6657
6658    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6659    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6660    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6661    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6662    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6663    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6664
6665
6666
6667    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6668
6669  case "$build_os" in
6670    *linux*)
6671      VAR_OS=linux
6672      VAR_OS_API=posix
6673      VAR_OS_ENV=linux
6674      ;;
6675    *solaris*)
6676      VAR_OS=solaris
6677      VAR_OS_API=posix
6678      VAR_OS_ENV=solaris
6679      ;;
6680    *darwin*)
6681      VAR_OS=macosx
6682      VAR_OS_API=posix
6683      VAR_OS_ENV=macosx
6684      ;;
6685    *bsd*)
6686      VAR_OS=bsd
6687      VAR_OS_API=posix
6688      VAR_OS_ENV=bsd
6689      ;;
6690    *cygwin*)
6691      VAR_OS=windows
6692      VAR_OS_API=winapi
6693      VAR_OS_ENV=windows.cygwin
6694      ;;
6695    *mingw*)
6696      VAR_OS=windows
6697      VAR_OS_API=winapi
6698      VAR_OS_ENV=windows.msys
6699      ;;
6700    *)
6701      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6702      ;;
6703  esac
6704
6705
6706  # First argument is the cpu name from the trip/quad
6707  case "$build_cpu" in
6708    x86_64)
6709      VAR_CPU=x86_64
6710      VAR_CPU_ARCH=x86
6711      VAR_CPU_BITS=64
6712      VAR_CPU_ENDIAN=little
6713      ;;
6714    i?86)
6715      VAR_CPU=x86
6716      VAR_CPU_ARCH=x86
6717      VAR_CPU_BITS=32
6718      VAR_CPU_ENDIAN=little
6719      ;;
6720    arm*)
6721      VAR_CPU=arm
6722      VAR_CPU_ARCH=arm
6723      VAR_CPU_BITS=32
6724      VAR_CPU_ENDIAN=little
6725      ;;
6726    powerpc)
6727      VAR_CPU=ppc
6728      VAR_CPU_ARCH=ppc
6729      VAR_CPU_BITS=32
6730      VAR_CPU_ENDIAN=big
6731       ;;
6732    powerpc64)
6733      VAR_CPU=ppc64
6734      VAR_CPU_ARCH=ppc
6735      VAR_CPU_BITS=64
6736      VAR_CPU_ENDIAN=big
6737       ;;
6738    sparc)
6739      VAR_CPU=sparc
6740      VAR_CPU_ARCH=sparc
6741      VAR_CPU_BITS=32
6742      VAR_CPU_ENDIAN=big
6743       ;;
6744    sparcv9)
6745      VAR_CPU=sparcv9
6746      VAR_CPU_ARCH=sparc
6747      VAR_CPU_BITS=64
6748      VAR_CPU_ENDIAN=big
6749       ;;
6750    *)
6751      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6752      ;;
6753  esac
6754
6755    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6756    OPENJDK_BUILD_OS="$VAR_OS"
6757    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6758    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6759    OPENJDK_BUILD_CPU="$VAR_CPU"
6760    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6761    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6762    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6763
6764
6765
6766
6767
6768
6769
6770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6771$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6773$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6774
6775    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6776
6777  case "$host_os" in
6778    *linux*)
6779      VAR_OS=linux
6780      VAR_OS_API=posix
6781      VAR_OS_ENV=linux
6782      ;;
6783    *solaris*)
6784      VAR_OS=solaris
6785      VAR_OS_API=posix
6786      VAR_OS_ENV=solaris
6787      ;;
6788    *darwin*)
6789      VAR_OS=macosx
6790      VAR_OS_API=posix
6791      VAR_OS_ENV=macosx
6792      ;;
6793    *bsd*)
6794      VAR_OS=bsd
6795      VAR_OS_API=posix
6796      VAR_OS_ENV=bsd
6797      ;;
6798    *cygwin*)
6799      VAR_OS=windows
6800      VAR_OS_API=winapi
6801      VAR_OS_ENV=windows.cygwin
6802      ;;
6803    *mingw*)
6804      VAR_OS=windows
6805      VAR_OS_API=winapi
6806      VAR_OS_ENV=windows.msys
6807      ;;
6808    *)
6809      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6810      ;;
6811  esac
6812
6813
6814  # First argument is the cpu name from the trip/quad
6815  case "$host_cpu" in
6816    x86_64)
6817      VAR_CPU=x86_64
6818      VAR_CPU_ARCH=x86
6819      VAR_CPU_BITS=64
6820      VAR_CPU_ENDIAN=little
6821      ;;
6822    i?86)
6823      VAR_CPU=x86
6824      VAR_CPU_ARCH=x86
6825      VAR_CPU_BITS=32
6826      VAR_CPU_ENDIAN=little
6827      ;;
6828    arm*)
6829      VAR_CPU=arm
6830      VAR_CPU_ARCH=arm
6831      VAR_CPU_BITS=32
6832      VAR_CPU_ENDIAN=little
6833      ;;
6834    powerpc)
6835      VAR_CPU=ppc
6836      VAR_CPU_ARCH=ppc
6837      VAR_CPU_BITS=32
6838      VAR_CPU_ENDIAN=big
6839       ;;
6840    powerpc64)
6841      VAR_CPU=ppc64
6842      VAR_CPU_ARCH=ppc
6843      VAR_CPU_BITS=64
6844      VAR_CPU_ENDIAN=big
6845       ;;
6846    sparc)
6847      VAR_CPU=sparc
6848      VAR_CPU_ARCH=sparc
6849      VAR_CPU_BITS=32
6850      VAR_CPU_ENDIAN=big
6851       ;;
6852    sparcv9)
6853      VAR_CPU=sparcv9
6854      VAR_CPU_ARCH=sparc
6855      VAR_CPU_BITS=64
6856      VAR_CPU_ENDIAN=big
6857       ;;
6858    *)
6859      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6860      ;;
6861  esac
6862
6863    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6864    OPENJDK_TARGET_OS="$VAR_OS"
6865    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6866    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6867    OPENJDK_TARGET_CPU="$VAR_CPU"
6868    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6869    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6870    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6871
6872
6873
6874
6875
6876
6877
6878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6879$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6881$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6882
6883
6884
6885# Check whether --with-target-bits was given.
6886if test "${with_target_bits+set}" = set; then :
6887  withval=$with_target_bits;
6888fi
6889
6890
6891  # We have three types of compiles:
6892  # native  == normal compilation, target system == build system
6893  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6894  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6895  #
6896  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6897    # We're doing a proper cross-compilation
6898    COMPILE_TYPE="cross"
6899  else
6900    COMPILE_TYPE="native"
6901  fi
6902
6903  if test "x$with_target_bits" != x; then
6904    if test "x$COMPILE_TYPE" = "xcross"; then
6905      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6906    fi
6907
6908    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6909      # A reduced build is requested
6910      COMPILE_TYPE="reduced"
6911      OPENJDK_TARGET_CPU_BITS=32
6912      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6913        OPENJDK_TARGET_CPU=x86
6914      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6915        OPENJDK_TARGET_CPU=sparc
6916      else
6917        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6918      fi
6919    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6920      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
6921    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6922      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6923$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6924    else
6925      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6926    fi
6927  fi
6928
6929
6930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6931$as_echo_n "checking compilation type... " >&6; }
6932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6933$as_echo "$COMPILE_TYPE" >&6; }
6934
6935
6936    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6937       REQUIRED_OS_NAME=SunOS
6938       REQUIRED_OS_VERSION=5.10
6939    fi
6940    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6941       REQUIRED_OS_NAME=Linux
6942       REQUIRED_OS_VERSION=2.6
6943    fi
6944    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6945        REQUIRED_OS_NAME=Windows
6946        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6947            REQUIRED_OS_VERSION=5.2
6948        else
6949            REQUIRED_OS_VERSION=5.1
6950        fi
6951    fi
6952    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6953        REQUIRED_OS_NAME=Darwin
6954        REQUIRED_OS_VERSION=11.2
6955    fi
6956
6957
6958
6959
6960
6961    # Also store the legacy naming of the cpu.
6962    # Ie i586 and amd64 instead of x86 and x86_64
6963    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6964    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6965      OPENJDK_TARGET_CPU_LEGACY="i586"
6966    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6967      # On all platforms except MacOSX replace x86_64 with amd64.
6968      OPENJDK_TARGET_CPU_LEGACY="amd64"
6969    fi
6970
6971
6972    # And the second legacy naming of the cpu.
6973    # Ie i386 and amd64 instead of x86 and x86_64.
6974    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6975    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6976      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6977    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6978      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6979    fi
6980
6981
6982    # This is the name of the cpu (but using i386 and amd64 instead of
6983    # x86 and x86_64, respectively), preceeded by a /, to be used when
6984    # locating libraries. On macosx, it's empty, though.
6985    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6986    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6987        OPENJDK_TARGET_CPU_LIBDIR=""
6988    fi
6989
6990
6991    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6992    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6993    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6994    OPENJDK_TARGET_CPU_ISADIR=""
6995    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6996      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6997          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6998      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6999          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7000      fi
7001    fi
7002
7003
7004    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7005    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7006    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7007      # On linux only, we replace x86 with i386.
7008      OPENJDK_TARGET_CPU_OSARCH="i386"
7009    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7010      # On all platforms except macosx, we replace x86_64 with amd64.
7011      OPENJDK_TARGET_CPU_OSARCH="amd64"
7012    fi
7013
7014
7015    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7016    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7017      OPENJDK_TARGET_CPU_JLI="i386"
7018    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7019      # On all platforms except macosx, we replace x86_64 with amd64.
7020      OPENJDK_TARGET_CPU_JLI="amd64"
7021    fi
7022    # Now setup the -D flags for building libjli.
7023    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7024    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7025      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7026        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7027      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7028        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7029      fi
7030    fi
7031
7032
7033    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7034    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7035        OPENJDK_TARGET_OS_API_DIR="solaris"
7036    fi
7037    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7038        OPENJDK_TARGET_OS_API_DIR="windows"
7039    fi
7040
7041
7042    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7043        A_LP64="LP64:="
7044        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7045        # unpack200.exe
7046        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7047            ADD_LP64="-D_LP64=1"
7048        fi
7049    fi
7050    LP64=$A_LP64
7051
7052
7053    if test "x$COMPILE_TYPE" = "xcross"; then
7054      # FIXME: ... or should this include reduced builds..?
7055      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7056    else
7057      DEFINE_CROSS_COMPILE_ARCH=""
7058    fi
7059
7060
7061
7062
7063# Continue setting up basic stuff. Most remaining code require fundamental tools.
7064
7065# Locate the directory of this script.
7066SCRIPT="$0"
7067
7068    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7069        # Follow a chain of symbolic links. Use readlink
7070        # where it exists, else fall back to horribly
7071        # complicated shell code.
7072        if test "x$READLINK_TESTED" != yes; then
7073            # On MacOSX there is a readlink tool with a different
7074            # purpose than the GNU readlink tool. Check the found readlink.
7075            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7076            if test "x$ISGNU" = x; then
7077                 # A readlink that we do not know how to use.
7078                 # Are there other non-GNU readlinks out there?
7079                 READLINK_TESTED=yes
7080                 READLINK=
7081            fi
7082        fi
7083
7084        if test "x$READLINK" != x; then
7085            SCRIPT=`$READLINK -f $SCRIPT`
7086        else
7087            # Save the current directory for restoring afterwards
7088            STARTDIR=$PWD
7089            COUNTER=0
7090            sym_link_dir=`$DIRNAME $SCRIPT`
7091            sym_link_file=`$BASENAME $SCRIPT`
7092            # Use the system pwd and not the shell builtin to resolve directory symlinks
7093            cd $sym_link_dir
7094            cd `$THEPWDCMD`
7095            sym_link_dir=`$THEPWDCMD`
7096            # Resolve file symlinks
7097            while test $COUNTER -lt 20; do
7098                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7099                if test "x$ISLINK" == x; then
7100                    # This is not a symbolic link! We are done!
7101                    break
7102                fi
7103                # Again resolve directory symlinks since the target of the just found
7104                # link could be in a different directory
7105                cd `$DIRNAME $ISLINK`
7106                sym_link_dir=`$THEPWDCMD`
7107                sym_link_file=`$BASENAME $ISLINK`
7108                let COUNTER=COUNTER+1
7109            done
7110            cd $STARTDIR
7111            SCRIPT=$sym_link_dir/$sym_link_file
7112        fi
7113    fi
7114
7115AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7116
7117# Where is the source? It is located two levels above the configure script.
7118CURDIR="$PWD"
7119cd "$AUTOCONF_DIR/../.."
7120SRC_ROOT="`$THEPWDCMD`"
7121
7122if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7123  PATH_SEP=";"
7124
7125  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7126  if test $SRC_ROOT_LENGTH -gt 100; then
7127      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7128  fi
7129
7130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7132$as_echo_n "checking cygwin release... " >&6; }
7133    CYGWIN_VERSION=`$UNAME -r`
7134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7135$as_echo "$CYGWIN_VERSION" >&6; }
7136    WINDOWS_ENV_VENDOR='cygwin'
7137    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7138
7139    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7140    if test "x$CYGWIN_VERSION_OK" = x; then
7141      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
7142$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
7143      as_fn_error $? "Cannot continue" "$LINENO" 5
7144    fi
7145    if test "x$CYGPATH" = x; then
7146        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7147    fi
7148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7149$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7150    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7151    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7152    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7153    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7155$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7156    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7157    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7158    if test "x$test_cygdrive_prefix" = x; then
7159        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7160    fi
7161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7163$as_echo_n "checking msys release... " >&6; }
7164    MSYS_VERSION=`$UNAME -r`
7165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7166$as_echo "$MSYS_VERSION" >&6; }
7167
7168    WINDOWS_ENV_VENDOR='msys'
7169    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7170
7171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7172$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7173    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7174    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7175
7176  windows_path="$MSYS_ROOT_PATH"
7177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7178    unix_path=`$CYGPATH -u "$windows_path"`
7179    MSYS_ROOT_PATH="$unix_path"
7180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7182    MSYS_ROOT_PATH="$unix_path"
7183  fi
7184
7185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7186$as_echo "$MSYS_ROOT_PATH" >&6; }
7187    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7188  else
7189    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7190  fi
7191
7192  # Test if windows or unix (cygwin/msys) find is first in path.
7193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7194$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7195  FIND_BINARY_OUTPUT=`find --version 2>&1`
7196  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7198$as_echo "unix style" >&6; }
7199  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7201$as_echo "Windows" >&6; }
7202    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7203$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7204    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
7205$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7206    as_fn_error $? "Cannot continue" "$LINENO" 5
7207  else
7208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7209$as_echo "unknown" >&6; }
7210    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7211$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7212  fi
7213
7214else
7215  PATH_SEP=":"
7216fi
7217
7218
7219
7220cd "$CURDIR"
7221
7222
7223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7224
7225  # Input might be given as Windows format, start by converting to
7226  # unix format.
7227  path="$SRC_ROOT"
7228  new_path=`$CYGPATH -u "$path"`
7229
7230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7233  # "foo.exe" is OK but "foo" is an error.
7234  #
7235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7236  # It is also a way to make sure we got the proper file name for the real test later on.
7237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7238  if test "x$test_shortpath" = x; then
7239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7240$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7241    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7242  fi
7243
7244  # Call helper function which possibly converts this using DOS-style short mode.
7245  # If so, the updated path is stored in $new_path.
7246
7247  input_path="$new_path"
7248  # Check if we need to convert this using DOS-style short mode. If the path
7249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7250  # take no chances and rewrite it.
7251  # Note: m4 eats our [], so we need to use [ and ] instead.
7252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7253  if test "x$has_forbidden_chars" != x; then
7254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7258      # Going to short mode and back again did indeed matter. Since short mode is
7259      # case insensitive, let's make it lowercase to improve readability.
7260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7261      # Now convert it back to Unix-stile (cygpath)
7262      input_path=`$CYGPATH -u "$shortmode_path"`
7263      new_path="$input_path"
7264    fi
7265  fi
7266
7267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7268  if test "x$test_cygdrive_prefix" = x; then
7269    # As a simple fix, exclude /usr/bin since it's not a real path.
7270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7272      # a path prefixed by /cygdrive for fixpath to work.
7273      new_path="$CYGWIN_ROOT_PATH$input_path"
7274    fi
7275  fi
7276
7277
7278  if test "x$path" != "x$new_path"; then
7279    SRC_ROOT="$new_path"
7280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7281$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7282  fi
7283
7284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7285
7286  path="$SRC_ROOT"
7287  has_colon=`$ECHO $path | $GREP ^.:`
7288  new_path="$path"
7289  if test "x$has_colon" = x; then
7290    # Not in mixed or Windows style, start by that.
7291    new_path=`cmd //c echo $path`
7292  fi
7293
7294
7295  input_path="$new_path"
7296  # Check if we need to convert this using DOS-style short mode. If the path
7297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7298  # take no chances and rewrite it.
7299  # Note: m4 eats our [], so we need to use [ and ] instead.
7300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7301  if test "x$has_forbidden_chars" != x; then
7302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7304  fi
7305
7306
7307  windows_path="$new_path"
7308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7309    unix_path=`$CYGPATH -u "$windows_path"`
7310    new_path="$unix_path"
7311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7313    new_path="$unix_path"
7314  fi
7315
7316  if test "x$path" != "x$new_path"; then
7317    SRC_ROOT="$new_path"
7318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7319$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7320  fi
7321
7322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7324
7325  else
7326    # We're on a posix platform. Hooray! :)
7327    path="$SRC_ROOT"
7328
7329    if test ! -f "$path" && test ! -d "$path"; then
7330      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7331    fi
7332
7333    has_space=`$ECHO "$path" | $GREP " "`
7334    if test "x$has_space" != x; then
7335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7336$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7337      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7338    fi
7339  fi
7340
7341
7342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7343
7344  # Input might be given as Windows format, start by converting to
7345  # unix format.
7346  path="$CURDIR"
7347  new_path=`$CYGPATH -u "$path"`
7348
7349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7352  # "foo.exe" is OK but "foo" is an error.
7353  #
7354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7355  # It is also a way to make sure we got the proper file name for the real test later on.
7356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7357  if test "x$test_shortpath" = x; then
7358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7359$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7360    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7361  fi
7362
7363  # Call helper function which possibly converts this using DOS-style short mode.
7364  # If so, the updated path is stored in $new_path.
7365
7366  input_path="$new_path"
7367  # Check if we need to convert this using DOS-style short mode. If the path
7368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7369  # take no chances and rewrite it.
7370  # Note: m4 eats our [], so we need to use [ and ] instead.
7371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7372  if test "x$has_forbidden_chars" != x; then
7373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7377      # Going to short mode and back again did indeed matter. Since short mode is
7378      # case insensitive, let's make it lowercase to improve readability.
7379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7380      # Now convert it back to Unix-stile (cygpath)
7381      input_path=`$CYGPATH -u "$shortmode_path"`
7382      new_path="$input_path"
7383    fi
7384  fi
7385
7386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7387  if test "x$test_cygdrive_prefix" = x; then
7388    # As a simple fix, exclude /usr/bin since it's not a real path.
7389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7391      # a path prefixed by /cygdrive for fixpath to work.
7392      new_path="$CYGWIN_ROOT_PATH$input_path"
7393    fi
7394  fi
7395
7396
7397  if test "x$path" != "x$new_path"; then
7398    CURDIR="$new_path"
7399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7400$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7401  fi
7402
7403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7404
7405  path="$CURDIR"
7406  has_colon=`$ECHO $path | $GREP ^.:`
7407  new_path="$path"
7408  if test "x$has_colon" = x; then
7409    # Not in mixed or Windows style, start by that.
7410    new_path=`cmd //c echo $path`
7411  fi
7412
7413
7414  input_path="$new_path"
7415  # Check if we need to convert this using DOS-style short mode. If the path
7416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7417  # take no chances and rewrite it.
7418  # Note: m4 eats our [], so we need to use [ and ] instead.
7419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7420  if test "x$has_forbidden_chars" != x; then
7421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7423  fi
7424
7425
7426  windows_path="$new_path"
7427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7428    unix_path=`$CYGPATH -u "$windows_path"`
7429    new_path="$unix_path"
7430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7432    new_path="$unix_path"
7433  fi
7434
7435  if test "x$path" != "x$new_path"; then
7436    CURDIR="$new_path"
7437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7438$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7439  fi
7440
7441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7443
7444  else
7445    # We're on a posix platform. Hooray! :)
7446    path="$CURDIR"
7447
7448    if test ! -f "$path" && test ! -d "$path"; then
7449      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7450    fi
7451
7452    has_space=`$ECHO "$path" | $GREP " "`
7453    if test "x$has_space" != x; then
7454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7455$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7456      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7457    fi
7458  fi
7459
7460
7461if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7462    # Add extra search paths on solaris for utilities like ar and as etc...
7463    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7464fi
7465
7466# You can force the sys-root if the sys-root encoded into the cross compiler tools
7467# is not correct.
7468
7469# Check whether --with-sys-root was given.
7470if test "${with_sys_root+set}" = set; then :
7471  withval=$with_sys_root;
7472fi
7473
7474
7475if test "x$with_sys_root" != x; then
7476  SYS_ROOT=$with_sys_root
7477else
7478  SYS_ROOT=/
7479fi
7480
7481
7482
7483# Check whether --with-tools-dir was given.
7484if test "${with_tools_dir+set}" = set; then :
7485  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7486fi
7487
7488
7489
7490# Check whether --with-devkit was given.
7491if test "${with_devkit+set}" = set; then :
7492  withval=$with_devkit;
7493    if test "x$with_sys_root" != x; then
7494      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7495    fi
7496    if test "x$with_tools_dir" != x; then
7497      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7498    fi
7499    TOOLS_DIR=$with_devkit/bin
7500    SYS_ROOT=$with_devkit/$host_alias/libc
7501
7502fi
7503
7504
7505
7506
7507# Setup default logging of stdout and stderr to build.log in the output root.
7508BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7509BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7510BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7511
7512
7513
7514
7515
7516# Check if it's a pure open build or if custom sources are to be used.
7517
7518  # Check whether --enable-openjdk-only was given.
7519if test "${enable_openjdk_only+set}" = set; then :
7520  enableval=$enable_openjdk_only;
7521else
7522  enable_openjdk_only="no"
7523fi
7524
7525
7526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7527$as_echo_n "checking for presence of closed sources... " >&6; }
7528  if test -d "$SRC_ROOT/jdk/src/closed"; then
7529    CLOSED_SOURCE_PRESENT=yes
7530  else
7531    CLOSED_SOURCE_PRESENT=no
7532  fi
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7534$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7535
7536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7537$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7538  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7540$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7541
7542  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7543    OPENJDK=true
7544    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7545      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7546$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7547    fi
7548  else
7549    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7550      OPENJDK=true
7551    else
7552      OPENJDK=false
7553    fi
7554  fi
7555
7556  if test "x$OPENJDK" = "xtrue"; then
7557    SET_OPENJDK="OPENJDK=true"
7558  fi
7559
7560
7561
7562
7563# These are needed to be able to create a configuration name (and thus the output directory)
7564
7565###############################################################################
7566#
7567# Check which variant of the JDK that we want to build.
7568# Currently we have:
7569#    normal:   standard edition
7570# but the custom make system may add other variants
7571#
7572# Effectively the JDK variant gives a name to a specific set of
7573# modules to compile into the JDK. In the future, these modules
7574# might even be Jigsaw modules.
7575#
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7577$as_echo_n "checking which variant of the JDK to build... " >&6; }
7578
7579# Check whether --with-jdk-variant was given.
7580if test "${with_jdk_variant+set}" = set; then :
7581  withval=$with_jdk_variant;
7582fi
7583
7584
7585if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7586    JDK_VARIANT="normal"
7587else
7588    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7589fi
7590
7591
7592
7593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7594$as_echo "$JDK_VARIANT" >&6; }
7595
7596
7597
7598###############################################################################
7599#
7600# Check which variants of the JVM that we want to build.
7601# Currently we have:
7602#    server: normal interpreter and a tiered C1/C2 compiler
7603#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7604#    minimal1: reduced form of client with optional VM services and features stripped out
7605#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7606#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7607#    zero: no machine code interpreter, no compiler
7608#    zeroshark: zero interpreter and shark/llvm compiler backend
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7610$as_echo_n "checking which variants of the JVM to build... " >&6; }
7611
7612# Check whether --with-jvm-variants was given.
7613if test "${with_jvm_variants+set}" = set; then :
7614  withval=$with_jvm_variants;
7615fi
7616
7617
7618if test "x$with_jvm_variants" = x; then
7619     with_jvm_variants="server"
7620fi
7621
7622JVM_VARIANTS=",$with_jvm_variants,"
7623TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7624
7625if test "x$TEST_VARIANTS" != "x,"; then
7626   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7627fi
7628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7629$as_echo "$with_jvm_variants" >&6; }
7630
7631JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7632JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7633JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7634JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7635JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7636JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7637
7638if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7639    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7640        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7641    fi
7642fi
7643if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7644    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7645        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7646    fi
7647fi
7648if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7649    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7650        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7651    fi
7652fi
7653
7654# Replace the commas with AND for use in the build directory name.
7655ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7656COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7657if test "x$COUNT_VARIANTS" != "x,1"; then
7658    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7659else
7660    BUILDING_MULTIPLE_JVM_VARIANTS=no
7661fi
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7672   MACOSX_UNIVERSAL="true"
7673fi
7674
7675
7676
7677
7678
7679###############################################################################
7680#
7681# Set the debug level
7682#    release: no debug information, all optimizations, no asserts.
7683#    fastdebug: debug information (-g), all optimizations, all asserts
7684#    slowdebug: debug information (-g), no optimizations, all asserts
7685#
7686DEBUG_LEVEL="release"
7687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7688$as_echo_n "checking which debug level to use... " >&6; }
7689# Check whether --enable-debug was given.
7690if test "${enable_debug+set}" = set; then :
7691  enableval=$enable_debug;
7692        ENABLE_DEBUG="${enableval}"
7693        DEBUG_LEVEL="fastdebug"
7694
7695else
7696  ENABLE_DEBUG="no"
7697fi
7698
7699
7700
7701# Check whether --with-debug-level was given.
7702if test "${with_debug_level+set}" = set; then :
7703  withval=$with_debug_level;
7704        DEBUG_LEVEL="${withval}"
7705        if test "x$ENABLE_DEBUG" = xyes; then
7706			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7707        fi
7708
7709fi
7710
7711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7712$as_echo "$DEBUG_LEVEL" >&6; }
7713
7714if test "x$DEBUG_LEVEL" != xrelease && \
7715   test "x$DEBUG_LEVEL" != xfastdebug && \
7716   test "x$DEBUG_LEVEL" != xslowdebug; then
7717   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7718fi
7719
7720
7721###############################################################################
7722#
7723# Setup legacy vars/targets and new vars to deal with different debug levels.
7724#
7725
7726case $DEBUG_LEVEL in
7727      release )
7728          VARIANT="OPT"
7729          FASTDEBUG="false"
7730          DEBUG_CLASSFILES="false"
7731          BUILD_VARIANT_RELEASE=""
7732          HOTSPOT_DEBUG_LEVEL="product"
7733          HOTSPOT_EXPORT="product"
7734           ;;
7735      fastdebug )
7736          VARIANT="DBG"
7737          FASTDEBUG="true"
7738          DEBUG_CLASSFILES="true"
7739          BUILD_VARIANT_RELEASE="-fastdebug"
7740          HOTSPOT_DEBUG_LEVEL="fastdebug"
7741          HOTSPOT_EXPORT="fastdebug"
7742           ;;
7743      slowdebug )
7744          VARIANT="DBG"
7745          FASTDEBUG="false"
7746          DEBUG_CLASSFILES="true"
7747          BUILD_VARIANT_RELEASE="-debug"
7748          HOTSPOT_DEBUG_LEVEL="jvmg"
7749          HOTSPOT_EXPORT="debug"
7750           ;;
7751esac
7752
7753#####
7754# Generate the legacy makefile targets for hotspot.
7755# The hotspot api for selecting the build artifacts, really, needs to be improved.
7756# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7757# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7758# But until then ...
7759HOTSPOT_TARGET=""
7760
7761if test "x$JVM_VARIANT_SERVER" = xtrue; then
7762    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7763fi
7764
7765if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7766    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7767fi
7768
7769if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7770    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7771fi
7772
7773if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7774    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7775fi
7776
7777if test "x$JVM_VARIANT_ZERO" = xtrue; then
7778    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7779fi
7780
7781if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7782    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7783fi
7784
7785HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7786
7787# On Macosx universal binaries are produced, but they only contain
7788# 64 bit intel. This invalidates control of which jvms are built
7789# from configure, but only server is valid anyway. Fix this
7790# when hotspot makefiles are rewritten.
7791if test "x$MACOSX_UNIVERSAL" = xtrue; then
7792    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7793fi
7794
7795#####
7796
7797
7798
7799
7800
7801
7802
7803
7804# With basic setup done, call the custom early hook.
7805
7806
7807# To properly create a configuration name, we need to have the OpenJDK target
7808# and options (variants and debug level) parsed.
7809
7810
7811
7812# Check whether --with-conf-name was given.
7813if test "${with_conf_name+set}" = set; then :
7814  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7815fi
7816
7817
7818# Test from where we are running configure, in or outside of src root.
7819# To enable comparison of directories, CURDIR needs to be symlink free
7820# just like SRC_ROOT already is
7821NOSYM_CURDIR="$CURDIR"
7822
7823    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7824        # Follow a chain of symbolic links. Use readlink
7825        # where it exists, else fall back to horribly
7826        # complicated shell code.
7827        if test "x$READLINK_TESTED" != yes; then
7828            # On MacOSX there is a readlink tool with a different
7829            # purpose than the GNU readlink tool. Check the found readlink.
7830            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7831            if test "x$ISGNU" = x; then
7832                 # A readlink that we do not know how to use.
7833                 # Are there other non-GNU readlinks out there?
7834                 READLINK_TESTED=yes
7835                 READLINK=
7836            fi
7837        fi
7838
7839        if test "x$READLINK" != x; then
7840            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7841        else
7842            # Save the current directory for restoring afterwards
7843            STARTDIR=$PWD
7844            COUNTER=0
7845            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7846            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7847            # Use the system pwd and not the shell builtin to resolve directory symlinks
7848            cd $sym_link_dir
7849            cd `$THEPWDCMD`
7850            sym_link_dir=`$THEPWDCMD`
7851            # Resolve file symlinks
7852            while test $COUNTER -lt 20; do
7853                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7854                if test "x$ISLINK" == x; then
7855                    # This is not a symbolic link! We are done!
7856                    break
7857                fi
7858                # Again resolve directory symlinks since the target of the just found
7859                # link could be in a different directory
7860                cd `$DIRNAME $ISLINK`
7861                sym_link_dir=`$THEPWDCMD`
7862                sym_link_file=`$BASENAME $ISLINK`
7863                let COUNTER=COUNTER+1
7864            done
7865            cd $STARTDIR
7866            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7867        fi
7868    fi
7869
7870if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7871        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7872        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7873    # We are running configure from the src root.
7874    # Create a default ./build/target-variant-debuglevel output root.
7875    if test "x${CONF_NAME}" = x; then
7876        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7877    fi
7878    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7879    $MKDIR -p "$OUTPUT_ROOT"
7880    if test ! -d "$OUTPUT_ROOT"; then
7881        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7882    fi
7883else
7884    # We are running configure from outside of the src dir.
7885    # Then use the current directory as output dir!
7886    # If configuration is situated in normal build directory, just use the build
7887    # directory name as configuration name, otherwise use the complete path.
7888    if test "x${CONF_NAME}" = x; then
7889        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7890    fi
7891    OUTPUT_ROOT="$CURDIR"
7892
7893    # WARNING: This might be a bad thing to do. You need to be sure you want to
7894    # have a configuration in this directory. Do some sanity checks!
7895
7896    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7897      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7898      # other files
7899      files_present=`$LS $OUTPUT_ROOT`
7900      # Configure has already touched config.log and confdefs.h in the current dir when this check
7901      # is performed.
7902      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7903                                             | $TR -d '\n'`
7904      if test "x$filtered_files" != x; then
7905        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7906$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7907        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7908$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7909        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7910$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7911        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7912$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7913        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7914$as_echo "$as_me: seriously mess up just about everything." >&6;}
7915        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7916$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7917        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7918$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7919        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7920      fi
7921    fi
7922fi
7923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7924$as_echo_n "checking what configuration name to use... " >&6; }
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7926$as_echo "$CONF_NAME" >&6; }
7927
7928
7929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7930
7931  # Input might be given as Windows format, start by converting to
7932  # unix format.
7933  path="$OUTPUT_ROOT"
7934  new_path=`$CYGPATH -u "$path"`
7935
7936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7939  # "foo.exe" is OK but "foo" is an error.
7940  #
7941  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7942  # It is also a way to make sure we got the proper file name for the real test later on.
7943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7944  if test "x$test_shortpath" = x; then
7945    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7946$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7947    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7948  fi
7949
7950  # Call helper function which possibly converts this using DOS-style short mode.
7951  # If so, the updated path is stored in $new_path.
7952
7953  input_path="$new_path"
7954  # Check if we need to convert this using DOS-style short mode. If the path
7955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7956  # take no chances and rewrite it.
7957  # Note: m4 eats our [], so we need to use [ and ] instead.
7958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7959  if test "x$has_forbidden_chars" != x; then
7960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7964      # Going to short mode and back again did indeed matter. Since short mode is
7965      # case insensitive, let's make it lowercase to improve readability.
7966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7967      # Now convert it back to Unix-stile (cygpath)
7968      input_path=`$CYGPATH -u "$shortmode_path"`
7969      new_path="$input_path"
7970    fi
7971  fi
7972
7973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7974  if test "x$test_cygdrive_prefix" = x; then
7975    # As a simple fix, exclude /usr/bin since it's not a real path.
7976    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7978      # a path prefixed by /cygdrive for fixpath to work.
7979      new_path="$CYGWIN_ROOT_PATH$input_path"
7980    fi
7981  fi
7982
7983
7984  if test "x$path" != "x$new_path"; then
7985    OUTPUT_ROOT="$new_path"
7986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7987$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7988  fi
7989
7990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7991
7992  path="$OUTPUT_ROOT"
7993  has_colon=`$ECHO $path | $GREP ^.:`
7994  new_path="$path"
7995  if test "x$has_colon" = x; then
7996    # Not in mixed or Windows style, start by that.
7997    new_path=`cmd //c echo $path`
7998  fi
7999
8000
8001  input_path="$new_path"
8002  # Check if we need to convert this using DOS-style short mode. If the path
8003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8004  # take no chances and rewrite it.
8005  # Note: m4 eats our [], so we need to use [ and ] instead.
8006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8007  if test "x$has_forbidden_chars" != x; then
8008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8010  fi
8011
8012
8013  windows_path="$new_path"
8014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8015    unix_path=`$CYGPATH -u "$windows_path"`
8016    new_path="$unix_path"
8017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8019    new_path="$unix_path"
8020  fi
8021
8022  if test "x$path" != "x$new_path"; then
8023    OUTPUT_ROOT="$new_path"
8024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8025$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8026  fi
8027
8028  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8029  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8030
8031  else
8032    # We're on a posix platform. Hooray! :)
8033    path="$OUTPUT_ROOT"
8034
8035    if test ! -f "$path" && test ! -d "$path"; then
8036      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8037    fi
8038
8039    has_space=`$ECHO "$path" | $GREP " "`
8040    if test "x$has_space" != x; then
8041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8042$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8043      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8044    fi
8045  fi
8046
8047
8048SPEC=$OUTPUT_ROOT/spec.gmk
8049
8050CONF_NAME=$CONF_NAME
8051
8052OUTPUT_ROOT=$OUTPUT_ROOT
8053
8054
8055# Most of the probed defines are put into config.h
8056ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8057
8058# The spec.gmk file contains all variables for the make system.
8059ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8060
8061# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8062ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8063
8064# The bootcycle-spec.gmk file contains support for boot cycle builds.
8065ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8066
8067# The compare.sh is used to compare the build output to other builds.
8068ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8069
8070# Spec.sh is currently used by compare-objects.sh
8071ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8072
8073# The generated Makefile knows where the spec.gmk is and where the source is.
8074# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8075# which will look for generated configurations
8076ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8077
8078
8079# Save the arguments given to us
8080echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8081
8082
8083# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8084
8085    for ac_prog in apt-get yum port pkgutil pkgadd
8086do
8087  # Extract the first word of "$ac_prog", so it can be a program name with args.
8088set dummy $ac_prog; ac_word=$2
8089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8090$as_echo_n "checking for $ac_word... " >&6; }
8091if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8092  $as_echo_n "(cached) " >&6
8093else
8094  if test -n "$PKGHANDLER"; then
8095  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8096else
8097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8098for as_dir in $PATH
8099do
8100  IFS=$as_save_IFS
8101  test -z "$as_dir" && as_dir=.
8102    for ac_exec_ext in '' $ac_executable_extensions; do
8103  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8104    ac_cv_prog_PKGHANDLER="$ac_prog"
8105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8106    break 2
8107  fi
8108done
8109  done
8110IFS=$as_save_IFS
8111
8112fi
8113fi
8114PKGHANDLER=$ac_cv_prog_PKGHANDLER
8115if test -n "$PKGHANDLER"; then
8116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8117$as_echo "$PKGHANDLER" >&6; }
8118else
8119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8120$as_echo "no" >&6; }
8121fi
8122
8123
8124  test -n "$PKGHANDLER" && break
8125done
8126
8127
8128
8129# Setup tools that requires more complex handling, or that is not needed by the configure script.
8130
8131
8132  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8133  if test "x$MAKE" != x; then
8134    # User has supplied a make, test it.
8135    if test ! -f "$MAKE"; then
8136      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8137    fi
8138
8139  MAKE_CANDIDATE=""$MAKE""
8140  DESCRIPTION="user supplied MAKE=$MAKE"
8141  if test "x$MAKE_CANDIDATE" != x; then
8142    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8143$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8144    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8145    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8146    if test "x$IS_GNU_MAKE" = x; then
8147      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8148$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8149    else
8150      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8151      if test "x$IS_MODERN_MAKE" = x; then
8152        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8153$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8154      else
8155        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8156          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8157            MAKE_EXPECTED_ENV='cygwin'
8158          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8159            MAKE_EXPECTED_ENV='msys'
8160          else
8161            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8162          fi
8163          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8164          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8165        else
8166          # Not relevant for non-Windows
8167          IS_MAKE_CORRECT_ENV=true
8168        fi
8169        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8170          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8171$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8172        else
8173          FOUND_MAKE=$MAKE_CANDIDATE
8174
8175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8176
8177  # First separate the path from the arguments. This will split at the first
8178  # space.
8179  complete="$FOUND_MAKE"
8180  path="${complete%% *}"
8181  tmp="$complete EOL"
8182  arguments="${tmp#* }"
8183
8184  # Input might be given as Windows format, start by converting to
8185  # unix format.
8186  new_path=`$CYGPATH -u "$path"`
8187
8188  # Now try to locate executable using which
8189  new_path=`$WHICH "$new_path" 2> /dev/null`
8190  # bat and cmd files are not always considered executable in cygwin causing which
8191  # to not find them
8192  if test "x$new_path" = x \
8193           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8194           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8195    new_path=`$CYGPATH -u "$path"`
8196  fi
8197  if test "x$new_path" = x; then
8198    # Oops. Which didn't find the executable.
8199    # The splitting of arguments from the executable at a space might have been incorrect,
8200    # since paths with space are more likely in Windows. Give it another try with the whole
8201    # argument.
8202    path="$complete"
8203    arguments="EOL"
8204    new_path=`$CYGPATH -u "$path"`
8205    new_path=`$WHICH "$new_path" 2> /dev/null`
8206    # bat and cmd files are not always considered executable in cygwin causing which
8207    # to not find them
8208    if test "x$new_path" = x \
8209             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8210             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8211      new_path=`$CYGPATH -u "$path"`
8212    fi
8213    if test "x$new_path" = x; then
8214      # It's still not found. Now this is an unrecoverable error.
8215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8216$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8217      has_space=`$ECHO "$complete" | $GREP " "`
8218      if test "x$has_space" != x; then
8219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8221      fi
8222      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8223    fi
8224  fi
8225
8226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8229  # "foo.exe" is OK but "foo" is an error.
8230  #
8231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8232  # It is also a way to make sure we got the proper file name for the real test later on.
8233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8234  if test "x$test_shortpath" = x; then
8235    # Short path failed, file does not exist as specified.
8236    # Try adding .exe or .cmd
8237    if test -f "${new_path}.exe"; then
8238       input_to_shortpath="${new_path}.exe"
8239    elif test -f "${new_path}.cmd"; then
8240       input_to_shortpath="${new_path}.cmd"
8241    else
8242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8243$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8246      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8247    fi
8248  else
8249    input_to_shortpath="$new_path"
8250  fi
8251
8252  # Call helper function which possibly converts this using DOS-style short mode.
8253  # If so, the updated path is stored in $new_path.
8254  new_path="$input_to_shortpath"
8255
8256  input_path="$input_to_shortpath"
8257  # Check if we need to convert this using DOS-style short mode. If the path
8258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8259  # take no chances and rewrite it.
8260  # Note: m4 eats our [], so we need to use [ and ] instead.
8261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8262  if test "x$has_forbidden_chars" != x; then
8263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8267      # Going to short mode and back again did indeed matter. Since short mode is
8268      # case insensitive, let's make it lowercase to improve readability.
8269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8270      # Now convert it back to Unix-stile (cygpath)
8271      input_path=`$CYGPATH -u "$shortmode_path"`
8272      new_path="$input_path"
8273    fi
8274  fi
8275
8276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8277  if test "x$test_cygdrive_prefix" = x; then
8278    # As a simple fix, exclude /usr/bin since it's not a real path.
8279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8281      # a path prefixed by /cygdrive for fixpath to work.
8282      new_path="$CYGWIN_ROOT_PATH$input_path"
8283    fi
8284  fi
8285
8286  # remove trailing .exe if any
8287  new_path="${new_path/%.exe/}"
8288
8289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8290
8291  # First separate the path from the arguments. This will split at the first
8292  # space.
8293  complete="$FOUND_MAKE"
8294  path="${complete%% *}"
8295  tmp="$complete EOL"
8296  arguments="${tmp#* }"
8297
8298  # Input might be given as Windows format, start by converting to
8299  # unix format.
8300  new_path="$path"
8301
8302  windows_path="$new_path"
8303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8304    unix_path=`$CYGPATH -u "$windows_path"`
8305    new_path="$unix_path"
8306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8308    new_path="$unix_path"
8309  fi
8310
8311
8312  # Now try to locate executable using which
8313  new_path=`$WHICH "$new_path" 2> /dev/null`
8314
8315  if test "x$new_path" = x; then
8316    # Oops. Which didn't find the executable.
8317    # The splitting of arguments from the executable at a space might have been incorrect,
8318    # since paths with space are more likely in Windows. Give it another try with the whole
8319    # argument.
8320    path="$complete"
8321    arguments="EOL"
8322    new_path="$path"
8323
8324  windows_path="$new_path"
8325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8326    unix_path=`$CYGPATH -u "$windows_path"`
8327    new_path="$unix_path"
8328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8330    new_path="$unix_path"
8331  fi
8332
8333
8334    new_path=`$WHICH "$new_path" 2> /dev/null`
8335
8336    if test "x$new_path" = x; then
8337      # It's still not found. Now this is an unrecoverable error.
8338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8339$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8340      has_space=`$ECHO "$complete" | $GREP " "`
8341      if test "x$has_space" != x; then
8342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8344      fi
8345      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8346    fi
8347  fi
8348
8349  # Now new_path has a complete unix path to the binary
8350  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8351    # Keep paths in /bin as-is, but remove trailing .exe if any
8352    new_path="${new_path/%.exe/}"
8353    # Do not save /bin paths to all_fixpath_prefixes!
8354  else
8355    # Not in mixed or Windows style, start by that.
8356    new_path=`cmd //c echo $new_path`
8357
8358  input_path="$new_path"
8359  # Check if we need to convert this using DOS-style short mode. If the path
8360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8361  # take no chances and rewrite it.
8362  # Note: m4 eats our [], so we need to use [ and ] instead.
8363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8364  if test "x$has_forbidden_chars" != x; then
8365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8367  fi
8368
8369    # Output is in $new_path
8370
8371  windows_path="$new_path"
8372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8373    unix_path=`$CYGPATH -u "$windows_path"`
8374    new_path="$unix_path"
8375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8377    new_path="$unix_path"
8378  fi
8379
8380    # remove trailing .exe if any
8381    new_path="${new_path/%.exe/}"
8382
8383    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8384    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8385  fi
8386
8387  else
8388    # We're on a posix platform. Hooray! :)
8389    # First separate the path from the arguments. This will split at the first
8390    # space.
8391    complete="$FOUND_MAKE"
8392    path="${complete%% *}"
8393    tmp="$complete EOL"
8394    arguments="${tmp#* }"
8395
8396    # Cannot rely on the command "which" here since it doesn't always work.
8397    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8398    if test -z "$is_absolute_path"; then
8399      # Path to executable is not absolute. Find it.
8400      IFS_save="$IFS"
8401      IFS=:
8402      for p in $PATH; do
8403        if test -f "$p/$path" && test -x "$p/$path"; then
8404          new_path="$p/$path"
8405          break
8406        fi
8407      done
8408      IFS="$IFS_save"
8409    else
8410      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8411$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8412      new_path="$path"
8413    fi
8414
8415    if test "x$new_path" = x; then
8416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8417$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8418        has_space=`$ECHO "$complete" | $GREP " "`
8419        if test "x$has_space" != x; then
8420          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8421$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8422        fi
8423        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8424      fi
8425  fi
8426
8427      # Now join together the path and the arguments once again
8428      if test "x$arguments" != xEOL; then
8429        new_complete="$new_path ${arguments% *}"
8430      else
8431        new_complete="$new_path"
8432      fi
8433
8434  if test "x$complete" != "x$new_complete"; then
8435      FOUND_MAKE="$new_complete"
8436      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8437$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8438    fi
8439
8440        fi
8441      fi
8442    fi
8443  fi
8444
8445    if test "x$FOUND_MAKE" = x; then
8446      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8447    fi
8448  else
8449    # Try our hardest to locate a correct version of GNU make
8450    for ac_prog in gmake
8451do
8452  # Extract the first word of "$ac_prog", so it can be a program name with args.
8453set dummy $ac_prog; ac_word=$2
8454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8455$as_echo_n "checking for $ac_word... " >&6; }
8456if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8457  $as_echo_n "(cached) " >&6
8458else
8459  case $CHECK_GMAKE in
8460  [\\/]* | ?:[\\/]*)
8461  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8462  ;;
8463  *)
8464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8465for as_dir in $PATH
8466do
8467  IFS=$as_save_IFS
8468  test -z "$as_dir" && as_dir=.
8469    for ac_exec_ext in '' $ac_executable_extensions; do
8470  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8471    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8473    break 2
8474  fi
8475done
8476  done
8477IFS=$as_save_IFS
8478
8479  ;;
8480esac
8481fi
8482CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8483if test -n "$CHECK_GMAKE"; then
8484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8485$as_echo "$CHECK_GMAKE" >&6; }
8486else
8487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8488$as_echo "no" >&6; }
8489fi
8490
8491
8492  test -n "$CHECK_GMAKE" && break
8493done
8494
8495
8496  MAKE_CANDIDATE=""$CHECK_GMAKE""
8497  DESCRIPTION="gmake in PATH"
8498  if test "x$MAKE_CANDIDATE" != x; then
8499    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8500$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8501    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8502    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8503    if test "x$IS_GNU_MAKE" = x; then
8504      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8505$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8506    else
8507      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8508      if test "x$IS_MODERN_MAKE" = x; then
8509        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8510$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8511      else
8512        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8513          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8514            MAKE_EXPECTED_ENV='cygwin'
8515          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8516            MAKE_EXPECTED_ENV='msys'
8517          else
8518            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8519          fi
8520          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8521          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8522        else
8523          # Not relevant for non-Windows
8524          IS_MAKE_CORRECT_ENV=true
8525        fi
8526        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8527          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8528$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8529        else
8530          FOUND_MAKE=$MAKE_CANDIDATE
8531
8532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8533
8534  # First separate the path from the arguments. This will split at the first
8535  # space.
8536  complete="$FOUND_MAKE"
8537  path="${complete%% *}"
8538  tmp="$complete EOL"
8539  arguments="${tmp#* }"
8540
8541  # Input might be given as Windows format, start by converting to
8542  # unix format.
8543  new_path=`$CYGPATH -u "$path"`
8544
8545  # Now try to locate executable using which
8546  new_path=`$WHICH "$new_path" 2> /dev/null`
8547  # bat and cmd files are not always considered executable in cygwin causing which
8548  # to not find them
8549  if test "x$new_path" = x \
8550           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8551           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8552    new_path=`$CYGPATH -u "$path"`
8553  fi
8554  if test "x$new_path" = x; then
8555    # Oops. Which didn't find the executable.
8556    # The splitting of arguments from the executable at a space might have been incorrect,
8557    # since paths with space are more likely in Windows. Give it another try with the whole
8558    # argument.
8559    path="$complete"
8560    arguments="EOL"
8561    new_path=`$CYGPATH -u "$path"`
8562    new_path=`$WHICH "$new_path" 2> /dev/null`
8563    # bat and cmd files are not always considered executable in cygwin causing which
8564    # to not find them
8565    if test "x$new_path" = x \
8566             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8567             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8568      new_path=`$CYGPATH -u "$path"`
8569    fi
8570    if test "x$new_path" = x; then
8571      # It's still not found. Now this is an unrecoverable error.
8572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8573$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8574      has_space=`$ECHO "$complete" | $GREP " "`
8575      if test "x$has_space" != x; then
8576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8578      fi
8579      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8580    fi
8581  fi
8582
8583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8586  # "foo.exe" is OK but "foo" is an error.
8587  #
8588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8589  # It is also a way to make sure we got the proper file name for the real test later on.
8590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8591  if test "x$test_shortpath" = x; then
8592    # Short path failed, file does not exist as specified.
8593    # Try adding .exe or .cmd
8594    if test -f "${new_path}.exe"; then
8595       input_to_shortpath="${new_path}.exe"
8596    elif test -f "${new_path}.cmd"; then
8597       input_to_shortpath="${new_path}.cmd"
8598    else
8599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8600$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8603      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8604    fi
8605  else
8606    input_to_shortpath="$new_path"
8607  fi
8608
8609  # Call helper function which possibly converts this using DOS-style short mode.
8610  # If so, the updated path is stored in $new_path.
8611  new_path="$input_to_shortpath"
8612
8613  input_path="$input_to_shortpath"
8614  # Check if we need to convert this using DOS-style short mode. If the path
8615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8616  # take no chances and rewrite it.
8617  # Note: m4 eats our [], so we need to use [ and ] instead.
8618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8619  if test "x$has_forbidden_chars" != x; then
8620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8624      # Going to short mode and back again did indeed matter. Since short mode is
8625      # case insensitive, let's make it lowercase to improve readability.
8626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8627      # Now convert it back to Unix-stile (cygpath)
8628      input_path=`$CYGPATH -u "$shortmode_path"`
8629      new_path="$input_path"
8630    fi
8631  fi
8632
8633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8634  if test "x$test_cygdrive_prefix" = x; then
8635    # As a simple fix, exclude /usr/bin since it's not a real path.
8636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8638      # a path prefixed by /cygdrive for fixpath to work.
8639      new_path="$CYGWIN_ROOT_PATH$input_path"
8640    fi
8641  fi
8642
8643  # remove trailing .exe if any
8644  new_path="${new_path/%.exe/}"
8645
8646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8647
8648  # First separate the path from the arguments. This will split at the first
8649  # space.
8650  complete="$FOUND_MAKE"
8651  path="${complete%% *}"
8652  tmp="$complete EOL"
8653  arguments="${tmp#* }"
8654
8655  # Input might be given as Windows format, start by converting to
8656  # unix format.
8657  new_path="$path"
8658
8659  windows_path="$new_path"
8660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8661    unix_path=`$CYGPATH -u "$windows_path"`
8662    new_path="$unix_path"
8663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8665    new_path="$unix_path"
8666  fi
8667
8668
8669  # Now try to locate executable using which
8670  new_path=`$WHICH "$new_path" 2> /dev/null`
8671
8672  if test "x$new_path" = x; then
8673    # Oops. Which didn't find the executable.
8674    # The splitting of arguments from the executable at a space might have been incorrect,
8675    # since paths with space are more likely in Windows. Give it another try with the whole
8676    # argument.
8677    path="$complete"
8678    arguments="EOL"
8679    new_path="$path"
8680
8681  windows_path="$new_path"
8682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8683    unix_path=`$CYGPATH -u "$windows_path"`
8684    new_path="$unix_path"
8685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8687    new_path="$unix_path"
8688  fi
8689
8690
8691    new_path=`$WHICH "$new_path" 2> /dev/null`
8692
8693    if test "x$new_path" = x; then
8694      # It's still not found. Now this is an unrecoverable error.
8695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8696$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8697      has_space=`$ECHO "$complete" | $GREP " "`
8698      if test "x$has_space" != x; then
8699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8701      fi
8702      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8703    fi
8704  fi
8705
8706  # Now new_path has a complete unix path to the binary
8707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8708    # Keep paths in /bin as-is, but remove trailing .exe if any
8709    new_path="${new_path/%.exe/}"
8710    # Do not save /bin paths to all_fixpath_prefixes!
8711  else
8712    # Not in mixed or Windows style, start by that.
8713    new_path=`cmd //c echo $new_path`
8714
8715  input_path="$new_path"
8716  # Check if we need to convert this using DOS-style short mode. If the path
8717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8718  # take no chances and rewrite it.
8719  # Note: m4 eats our [], so we need to use [ and ] instead.
8720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8721  if test "x$has_forbidden_chars" != x; then
8722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8724  fi
8725
8726    # Output is in $new_path
8727
8728  windows_path="$new_path"
8729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8730    unix_path=`$CYGPATH -u "$windows_path"`
8731    new_path="$unix_path"
8732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8734    new_path="$unix_path"
8735  fi
8736
8737    # remove trailing .exe if any
8738    new_path="${new_path/%.exe/}"
8739
8740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8742  fi
8743
8744  else
8745    # We're on a posix platform. Hooray! :)
8746    # First separate the path from the arguments. This will split at the first
8747    # space.
8748    complete="$FOUND_MAKE"
8749    path="${complete%% *}"
8750    tmp="$complete EOL"
8751    arguments="${tmp#* }"
8752
8753    # Cannot rely on the command "which" here since it doesn't always work.
8754    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8755    if test -z "$is_absolute_path"; then
8756      # Path to executable is not absolute. Find it.
8757      IFS_save="$IFS"
8758      IFS=:
8759      for p in $PATH; do
8760        if test -f "$p/$path" && test -x "$p/$path"; then
8761          new_path="$p/$path"
8762          break
8763        fi
8764      done
8765      IFS="$IFS_save"
8766    else
8767      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8768$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8769      new_path="$path"
8770    fi
8771
8772    if test "x$new_path" = x; then
8773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8774$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8775        has_space=`$ECHO "$complete" | $GREP " "`
8776        if test "x$has_space" != x; then
8777          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8778$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8779        fi
8780        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8781      fi
8782  fi
8783
8784      # Now join together the path and the arguments once again
8785      if test "x$arguments" != xEOL; then
8786        new_complete="$new_path ${arguments% *}"
8787      else
8788        new_complete="$new_path"
8789      fi
8790
8791  if test "x$complete" != "x$new_complete"; then
8792      FOUND_MAKE="$new_complete"
8793      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8794$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8795    fi
8796
8797        fi
8798      fi
8799    fi
8800  fi
8801
8802
8803    if test "x$FOUND_MAKE" = x; then
8804      for ac_prog in make
8805do
8806  # Extract the first word of "$ac_prog", so it can be a program name with args.
8807set dummy $ac_prog; ac_word=$2
8808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8809$as_echo_n "checking for $ac_word... " >&6; }
8810if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8811  $as_echo_n "(cached) " >&6
8812else
8813  case $CHECK_MAKE in
8814  [\\/]* | ?:[\\/]*)
8815  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8816  ;;
8817  *)
8818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8819for as_dir in $PATH
8820do
8821  IFS=$as_save_IFS
8822  test -z "$as_dir" && as_dir=.
8823    for ac_exec_ext in '' $ac_executable_extensions; do
8824  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8825    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8827    break 2
8828  fi
8829done
8830  done
8831IFS=$as_save_IFS
8832
8833  ;;
8834esac
8835fi
8836CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8837if test -n "$CHECK_MAKE"; then
8838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8839$as_echo "$CHECK_MAKE" >&6; }
8840else
8841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842$as_echo "no" >&6; }
8843fi
8844
8845
8846  test -n "$CHECK_MAKE" && break
8847done
8848
8849
8850  MAKE_CANDIDATE=""$CHECK_MAKE""
8851  DESCRIPTION="make in PATH"
8852  if test "x$MAKE_CANDIDATE" != x; then
8853    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8854$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8855    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8856    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8857    if test "x$IS_GNU_MAKE" = x; then
8858      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8859$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8860    else
8861      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8862      if test "x$IS_MODERN_MAKE" = x; then
8863        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8864$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8865      else
8866        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8867          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8868            MAKE_EXPECTED_ENV='cygwin'
8869          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8870            MAKE_EXPECTED_ENV='msys'
8871          else
8872            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8873          fi
8874          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8875          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8876        else
8877          # Not relevant for non-Windows
8878          IS_MAKE_CORRECT_ENV=true
8879        fi
8880        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8881          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8882$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8883        else
8884          FOUND_MAKE=$MAKE_CANDIDATE
8885
8886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8887
8888  # First separate the path from the arguments. This will split at the first
8889  # space.
8890  complete="$FOUND_MAKE"
8891  path="${complete%% *}"
8892  tmp="$complete EOL"
8893  arguments="${tmp#* }"
8894
8895  # Input might be given as Windows format, start by converting to
8896  # unix format.
8897  new_path=`$CYGPATH -u "$path"`
8898
8899  # Now try to locate executable using which
8900  new_path=`$WHICH "$new_path" 2> /dev/null`
8901  # bat and cmd files are not always considered executable in cygwin causing which
8902  # to not find them
8903  if test "x$new_path" = x \
8904           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8905           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8906    new_path=`$CYGPATH -u "$path"`
8907  fi
8908  if test "x$new_path" = x; then
8909    # Oops. Which didn't find the executable.
8910    # The splitting of arguments from the executable at a space might have been incorrect,
8911    # since paths with space are more likely in Windows. Give it another try with the whole
8912    # argument.
8913    path="$complete"
8914    arguments="EOL"
8915    new_path=`$CYGPATH -u "$path"`
8916    new_path=`$WHICH "$new_path" 2> /dev/null`
8917    # bat and cmd files are not always considered executable in cygwin causing which
8918    # to not find them
8919    if test "x$new_path" = x \
8920             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8921             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8922      new_path=`$CYGPATH -u "$path"`
8923    fi
8924    if test "x$new_path" = x; then
8925      # It's still not found. Now this is an unrecoverable error.
8926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8927$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8928      has_space=`$ECHO "$complete" | $GREP " "`
8929      if test "x$has_space" != x; then
8930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8932      fi
8933      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8934    fi
8935  fi
8936
8937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8940  # "foo.exe" is OK but "foo" is an error.
8941  #
8942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8943  # It is also a way to make sure we got the proper file name for the real test later on.
8944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8945  if test "x$test_shortpath" = x; then
8946    # Short path failed, file does not exist as specified.
8947    # Try adding .exe or .cmd
8948    if test -f "${new_path}.exe"; then
8949       input_to_shortpath="${new_path}.exe"
8950    elif test -f "${new_path}.cmd"; then
8951       input_to_shortpath="${new_path}.cmd"
8952    else
8953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8954$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8955      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8956$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8957      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8958    fi
8959  else
8960    input_to_shortpath="$new_path"
8961  fi
8962
8963  # Call helper function which possibly converts this using DOS-style short mode.
8964  # If so, the updated path is stored in $new_path.
8965  new_path="$input_to_shortpath"
8966
8967  input_path="$input_to_shortpath"
8968  # Check if we need to convert this using DOS-style short mode. If the path
8969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8970  # take no chances and rewrite it.
8971  # Note: m4 eats our [], so we need to use [ and ] instead.
8972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8973  if test "x$has_forbidden_chars" != x; then
8974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8978      # Going to short mode and back again did indeed matter. Since short mode is
8979      # case insensitive, let's make it lowercase to improve readability.
8980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8981      # Now convert it back to Unix-stile (cygpath)
8982      input_path=`$CYGPATH -u "$shortmode_path"`
8983      new_path="$input_path"
8984    fi
8985  fi
8986
8987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8988  if test "x$test_cygdrive_prefix" = x; then
8989    # As a simple fix, exclude /usr/bin since it's not a real path.
8990    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8992      # a path prefixed by /cygdrive for fixpath to work.
8993      new_path="$CYGWIN_ROOT_PATH$input_path"
8994    fi
8995  fi
8996
8997  # remove trailing .exe if any
8998  new_path="${new_path/%.exe/}"
8999
9000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9001
9002  # First separate the path from the arguments. This will split at the first
9003  # space.
9004  complete="$FOUND_MAKE"
9005  path="${complete%% *}"
9006  tmp="$complete EOL"
9007  arguments="${tmp#* }"
9008
9009  # Input might be given as Windows format, start by converting to
9010  # unix format.
9011  new_path="$path"
9012
9013  windows_path="$new_path"
9014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9015    unix_path=`$CYGPATH -u "$windows_path"`
9016    new_path="$unix_path"
9017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9019    new_path="$unix_path"
9020  fi
9021
9022
9023  # Now try to locate executable using which
9024  new_path=`$WHICH "$new_path" 2> /dev/null`
9025
9026  if test "x$new_path" = x; then
9027    # Oops. Which didn't find the executable.
9028    # The splitting of arguments from the executable at a space might have been incorrect,
9029    # since paths with space are more likely in Windows. Give it another try with the whole
9030    # argument.
9031    path="$complete"
9032    arguments="EOL"
9033    new_path="$path"
9034
9035  windows_path="$new_path"
9036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9037    unix_path=`$CYGPATH -u "$windows_path"`
9038    new_path="$unix_path"
9039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9041    new_path="$unix_path"
9042  fi
9043
9044
9045    new_path=`$WHICH "$new_path" 2> /dev/null`
9046
9047    if test "x$new_path" = x; then
9048      # It's still not found. Now this is an unrecoverable error.
9049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9051      has_space=`$ECHO "$complete" | $GREP " "`
9052      if test "x$has_space" != x; then
9053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9055      fi
9056      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9057    fi
9058  fi
9059
9060  # Now new_path has a complete unix path to the binary
9061  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9062    # Keep paths in /bin as-is, but remove trailing .exe if any
9063    new_path="${new_path/%.exe/}"
9064    # Do not save /bin paths to all_fixpath_prefixes!
9065  else
9066    # Not in mixed or Windows style, start by that.
9067    new_path=`cmd //c echo $new_path`
9068
9069  input_path="$new_path"
9070  # Check if we need to convert this using DOS-style short mode. If the path
9071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9072  # take no chances and rewrite it.
9073  # Note: m4 eats our [], so we need to use [ and ] instead.
9074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9075  if test "x$has_forbidden_chars" != x; then
9076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9078  fi
9079
9080    # Output is in $new_path
9081
9082  windows_path="$new_path"
9083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9084    unix_path=`$CYGPATH -u "$windows_path"`
9085    new_path="$unix_path"
9086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9088    new_path="$unix_path"
9089  fi
9090
9091    # remove trailing .exe if any
9092    new_path="${new_path/%.exe/}"
9093
9094    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9095    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9096  fi
9097
9098  else
9099    # We're on a posix platform. Hooray! :)
9100    # First separate the path from the arguments. This will split at the first
9101    # space.
9102    complete="$FOUND_MAKE"
9103    path="${complete%% *}"
9104    tmp="$complete EOL"
9105    arguments="${tmp#* }"
9106
9107    # Cannot rely on the command "which" here since it doesn't always work.
9108    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9109    if test -z "$is_absolute_path"; then
9110      # Path to executable is not absolute. Find it.
9111      IFS_save="$IFS"
9112      IFS=:
9113      for p in $PATH; do
9114        if test -f "$p/$path" && test -x "$p/$path"; then
9115          new_path="$p/$path"
9116          break
9117        fi
9118      done
9119      IFS="$IFS_save"
9120    else
9121      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9122$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9123      new_path="$path"
9124    fi
9125
9126    if test "x$new_path" = x; then
9127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9128$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9129        has_space=`$ECHO "$complete" | $GREP " "`
9130        if test "x$has_space" != x; then
9131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9133        fi
9134        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9135      fi
9136  fi
9137
9138      # Now join together the path and the arguments once again
9139      if test "x$arguments" != xEOL; then
9140        new_complete="$new_path ${arguments% *}"
9141      else
9142        new_complete="$new_path"
9143      fi
9144
9145  if test "x$complete" != "x$new_complete"; then
9146      FOUND_MAKE="$new_complete"
9147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9148$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9149    fi
9150
9151        fi
9152      fi
9153    fi
9154  fi
9155
9156    fi
9157
9158    if test "x$FOUND_MAKE" = x; then
9159      if test "x$TOOLS_DIR" != x; then
9160        # We have a tools-dir, check that as well before giving up.
9161        OLD_PATH=$PATH
9162        PATH=$TOOLS_DIR:$PATH
9163        for ac_prog in gmake
9164do
9165  # Extract the first word of "$ac_prog", so it can be a program name with args.
9166set dummy $ac_prog; ac_word=$2
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168$as_echo_n "checking for $ac_word... " >&6; }
9169if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9170  $as_echo_n "(cached) " >&6
9171else
9172  case $CHECK_TOOLSDIR_GMAKE in
9173  [\\/]* | ?:[\\/]*)
9174  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9175  ;;
9176  *)
9177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178for as_dir in $PATH
9179do
9180  IFS=$as_save_IFS
9181  test -z "$as_dir" && as_dir=.
9182    for ac_exec_ext in '' $ac_executable_extensions; do
9183  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9184    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186    break 2
9187  fi
9188done
9189  done
9190IFS=$as_save_IFS
9191
9192  ;;
9193esac
9194fi
9195CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9196if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9198$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9199else
9200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
9202fi
9203
9204
9205  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9206done
9207
9208
9209  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9210  DESCRIPTION="gmake in tools-dir"
9211  if test "x$MAKE_CANDIDATE" != x; then
9212    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9213$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9214    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9215    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9216    if test "x$IS_GNU_MAKE" = x; then
9217      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9218$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9219    else
9220      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9221      if test "x$IS_MODERN_MAKE" = x; then
9222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9223$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9224      else
9225        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9226          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9227            MAKE_EXPECTED_ENV='cygwin'
9228          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9229            MAKE_EXPECTED_ENV='msys'
9230          else
9231            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9232          fi
9233          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9234          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9235        else
9236          # Not relevant for non-Windows
9237          IS_MAKE_CORRECT_ENV=true
9238        fi
9239        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9240          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9241$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9242        else
9243          FOUND_MAKE=$MAKE_CANDIDATE
9244
9245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9246
9247  # First separate the path from the arguments. This will split at the first
9248  # space.
9249  complete="$FOUND_MAKE"
9250  path="${complete%% *}"
9251  tmp="$complete EOL"
9252  arguments="${tmp#* }"
9253
9254  # Input might be given as Windows format, start by converting to
9255  # unix format.
9256  new_path=`$CYGPATH -u "$path"`
9257
9258  # Now try to locate executable using which
9259  new_path=`$WHICH "$new_path" 2> /dev/null`
9260  # bat and cmd files are not always considered executable in cygwin causing which
9261  # to not find them
9262  if test "x$new_path" = x \
9263           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9264           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9265    new_path=`$CYGPATH -u "$path"`
9266  fi
9267  if test "x$new_path" = x; then
9268    # Oops. Which didn't find the executable.
9269    # The splitting of arguments from the executable at a space might have been incorrect,
9270    # since paths with space are more likely in Windows. Give it another try with the whole
9271    # argument.
9272    path="$complete"
9273    arguments="EOL"
9274    new_path=`$CYGPATH -u "$path"`
9275    new_path=`$WHICH "$new_path" 2> /dev/null`
9276    # bat and cmd files are not always considered executable in cygwin causing which
9277    # to not find them
9278    if test "x$new_path" = x \
9279             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9280             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9281      new_path=`$CYGPATH -u "$path"`
9282    fi
9283    if test "x$new_path" = x; then
9284      # It's still not found. Now this is an unrecoverable error.
9285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9286$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9287      has_space=`$ECHO "$complete" | $GREP " "`
9288      if test "x$has_space" != x; then
9289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9291      fi
9292      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9293    fi
9294  fi
9295
9296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9299  # "foo.exe" is OK but "foo" is an error.
9300  #
9301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9302  # It is also a way to make sure we got the proper file name for the real test later on.
9303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9304  if test "x$test_shortpath" = x; then
9305    # Short path failed, file does not exist as specified.
9306    # Try adding .exe or .cmd
9307    if test -f "${new_path}.exe"; then
9308       input_to_shortpath="${new_path}.exe"
9309    elif test -f "${new_path}.cmd"; then
9310       input_to_shortpath="${new_path}.cmd"
9311    else
9312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9313$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9314      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9315$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9316      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9317    fi
9318  else
9319    input_to_shortpath="$new_path"
9320  fi
9321
9322  # Call helper function which possibly converts this using DOS-style short mode.
9323  # If so, the updated path is stored in $new_path.
9324  new_path="$input_to_shortpath"
9325
9326  input_path="$input_to_shortpath"
9327  # Check if we need to convert this using DOS-style short mode. If the path
9328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9329  # take no chances and rewrite it.
9330  # Note: m4 eats our [], so we need to use [ and ] instead.
9331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9332  if test "x$has_forbidden_chars" != x; then
9333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9337      # Going to short mode and back again did indeed matter. Since short mode is
9338      # case insensitive, let's make it lowercase to improve readability.
9339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9340      # Now convert it back to Unix-stile (cygpath)
9341      input_path=`$CYGPATH -u "$shortmode_path"`
9342      new_path="$input_path"
9343    fi
9344  fi
9345
9346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9347  if test "x$test_cygdrive_prefix" = x; then
9348    # As a simple fix, exclude /usr/bin since it's not a real path.
9349    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9351      # a path prefixed by /cygdrive for fixpath to work.
9352      new_path="$CYGWIN_ROOT_PATH$input_path"
9353    fi
9354  fi
9355
9356  # remove trailing .exe if any
9357  new_path="${new_path/%.exe/}"
9358
9359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9360
9361  # First separate the path from the arguments. This will split at the first
9362  # space.
9363  complete="$FOUND_MAKE"
9364  path="${complete%% *}"
9365  tmp="$complete EOL"
9366  arguments="${tmp#* }"
9367
9368  # Input might be given as Windows format, start by converting to
9369  # unix format.
9370  new_path="$path"
9371
9372  windows_path="$new_path"
9373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9374    unix_path=`$CYGPATH -u "$windows_path"`
9375    new_path="$unix_path"
9376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9378    new_path="$unix_path"
9379  fi
9380
9381
9382  # Now try to locate executable using which
9383  new_path=`$WHICH "$new_path" 2> /dev/null`
9384
9385  if test "x$new_path" = x; then
9386    # Oops. Which didn't find the executable.
9387    # The splitting of arguments from the executable at a space might have been incorrect,
9388    # since paths with space are more likely in Windows. Give it another try with the whole
9389    # argument.
9390    path="$complete"
9391    arguments="EOL"
9392    new_path="$path"
9393
9394  windows_path="$new_path"
9395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9396    unix_path=`$CYGPATH -u "$windows_path"`
9397    new_path="$unix_path"
9398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9400    new_path="$unix_path"
9401  fi
9402
9403
9404    new_path=`$WHICH "$new_path" 2> /dev/null`
9405
9406    if test "x$new_path" = x; then
9407      # It's still not found. Now this is an unrecoverable error.
9408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9409$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9410      has_space=`$ECHO "$complete" | $GREP " "`
9411      if test "x$has_space" != x; then
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9414      fi
9415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9416    fi
9417  fi
9418
9419  # Now new_path has a complete unix path to the binary
9420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9421    # Keep paths in /bin as-is, but remove trailing .exe if any
9422    new_path="${new_path/%.exe/}"
9423    # Do not save /bin paths to all_fixpath_prefixes!
9424  else
9425    # Not in mixed or Windows style, start by that.
9426    new_path=`cmd //c echo $new_path`
9427
9428  input_path="$new_path"
9429  # Check if we need to convert this using DOS-style short mode. If the path
9430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9431  # take no chances and rewrite it.
9432  # Note: m4 eats our [], so we need to use [ and ] instead.
9433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9434  if test "x$has_forbidden_chars" != x; then
9435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9437  fi
9438
9439    # Output is in $new_path
9440
9441  windows_path="$new_path"
9442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9443    unix_path=`$CYGPATH -u "$windows_path"`
9444    new_path="$unix_path"
9445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9447    new_path="$unix_path"
9448  fi
9449
9450    # remove trailing .exe if any
9451    new_path="${new_path/%.exe/}"
9452
9453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9455  fi
9456
9457  else
9458    # We're on a posix platform. Hooray! :)
9459    # First separate the path from the arguments. This will split at the first
9460    # space.
9461    complete="$FOUND_MAKE"
9462    path="${complete%% *}"
9463    tmp="$complete EOL"
9464    arguments="${tmp#* }"
9465
9466    # Cannot rely on the command "which" here since it doesn't always work.
9467    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9468    if test -z "$is_absolute_path"; then
9469      # Path to executable is not absolute. Find it.
9470      IFS_save="$IFS"
9471      IFS=:
9472      for p in $PATH; do
9473        if test -f "$p/$path" && test -x "$p/$path"; then
9474          new_path="$p/$path"
9475          break
9476        fi
9477      done
9478      IFS="$IFS_save"
9479    else
9480      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9481$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9482      new_path="$path"
9483    fi
9484
9485    if test "x$new_path" = x; then
9486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9487$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9488        has_space=`$ECHO "$complete" | $GREP " "`
9489        if test "x$has_space" != x; then
9490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9492        fi
9493        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9494      fi
9495  fi
9496
9497      # Now join together the path and the arguments once again
9498      if test "x$arguments" != xEOL; then
9499        new_complete="$new_path ${arguments% *}"
9500      else
9501        new_complete="$new_path"
9502      fi
9503
9504  if test "x$complete" != "x$new_complete"; then
9505      FOUND_MAKE="$new_complete"
9506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9507$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9508    fi
9509
9510        fi
9511      fi
9512    fi
9513  fi
9514
9515        if test "x$FOUND_MAKE" = x; then
9516          for ac_prog in make
9517do
9518  # Extract the first word of "$ac_prog", so it can be a program name with args.
9519set dummy $ac_prog; ac_word=$2
9520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9521$as_echo_n "checking for $ac_word... " >&6; }
9522if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9523  $as_echo_n "(cached) " >&6
9524else
9525  case $CHECK_TOOLSDIR_MAKE in
9526  [\\/]* | ?:[\\/]*)
9527  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9528  ;;
9529  *)
9530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9531for as_dir in $PATH
9532do
9533  IFS=$as_save_IFS
9534  test -z "$as_dir" && as_dir=.
9535    for ac_exec_ext in '' $ac_executable_extensions; do
9536  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9537    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9539    break 2
9540  fi
9541done
9542  done
9543IFS=$as_save_IFS
9544
9545  ;;
9546esac
9547fi
9548CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9549if test -n "$CHECK_TOOLSDIR_MAKE"; then
9550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9551$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9552else
9553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9554$as_echo "no" >&6; }
9555fi
9556
9557
9558  test -n "$CHECK_TOOLSDIR_MAKE" && break
9559done
9560
9561
9562  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9563  DESCRIPTION="make in tools-dir"
9564  if test "x$MAKE_CANDIDATE" != x; then
9565    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9566$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9567    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9568    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9569    if test "x$IS_GNU_MAKE" = x; then
9570      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9571$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9572    else
9573      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9574      if test "x$IS_MODERN_MAKE" = x; then
9575        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9576$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9577      else
9578        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9579          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9580            MAKE_EXPECTED_ENV='cygwin'
9581          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9582            MAKE_EXPECTED_ENV='msys'
9583          else
9584            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9585          fi
9586          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9587          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9588        else
9589          # Not relevant for non-Windows
9590          IS_MAKE_CORRECT_ENV=true
9591        fi
9592        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9593          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9594$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9595        else
9596          FOUND_MAKE=$MAKE_CANDIDATE
9597
9598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9599
9600  # First separate the path from the arguments. This will split at the first
9601  # space.
9602  complete="$FOUND_MAKE"
9603  path="${complete%% *}"
9604  tmp="$complete EOL"
9605  arguments="${tmp#* }"
9606
9607  # Input might be given as Windows format, start by converting to
9608  # unix format.
9609  new_path=`$CYGPATH -u "$path"`
9610
9611  # Now try to locate executable using which
9612  new_path=`$WHICH "$new_path" 2> /dev/null`
9613  # bat and cmd files are not always considered executable in cygwin causing which
9614  # to not find them
9615  if test "x$new_path" = x \
9616           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9617           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9618    new_path=`$CYGPATH -u "$path"`
9619  fi
9620  if test "x$new_path" = x; then
9621    # Oops. Which didn't find the executable.
9622    # The splitting of arguments from the executable at a space might have been incorrect,
9623    # since paths with space are more likely in Windows. Give it another try with the whole
9624    # argument.
9625    path="$complete"
9626    arguments="EOL"
9627    new_path=`$CYGPATH -u "$path"`
9628    new_path=`$WHICH "$new_path" 2> /dev/null`
9629    # bat and cmd files are not always considered executable in cygwin causing which
9630    # to not find them
9631    if test "x$new_path" = x \
9632             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9633             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9634      new_path=`$CYGPATH -u "$path"`
9635    fi
9636    if test "x$new_path" = x; then
9637      # It's still not found. Now this is an unrecoverable error.
9638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9639$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9640      has_space=`$ECHO "$complete" | $GREP " "`
9641      if test "x$has_space" != x; then
9642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9644      fi
9645      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9646    fi
9647  fi
9648
9649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9652  # "foo.exe" is OK but "foo" is an error.
9653  #
9654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9655  # It is also a way to make sure we got the proper file name for the real test later on.
9656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9657  if test "x$test_shortpath" = x; then
9658    # Short path failed, file does not exist as specified.
9659    # Try adding .exe or .cmd
9660    if test -f "${new_path}.exe"; then
9661       input_to_shortpath="${new_path}.exe"
9662    elif test -f "${new_path}.cmd"; then
9663       input_to_shortpath="${new_path}.cmd"
9664    else
9665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9666$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9667      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9668$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9669      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9670    fi
9671  else
9672    input_to_shortpath="$new_path"
9673  fi
9674
9675  # Call helper function which possibly converts this using DOS-style short mode.
9676  # If so, the updated path is stored in $new_path.
9677  new_path="$input_to_shortpath"
9678
9679  input_path="$input_to_shortpath"
9680  # Check if we need to convert this using DOS-style short mode. If the path
9681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9682  # take no chances and rewrite it.
9683  # Note: m4 eats our [], so we need to use [ and ] instead.
9684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9685  if test "x$has_forbidden_chars" != x; then
9686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9690      # Going to short mode and back again did indeed matter. Since short mode is
9691      # case insensitive, let's make it lowercase to improve readability.
9692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9693      # Now convert it back to Unix-stile (cygpath)
9694      input_path=`$CYGPATH -u "$shortmode_path"`
9695      new_path="$input_path"
9696    fi
9697  fi
9698
9699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9700  if test "x$test_cygdrive_prefix" = x; then
9701    # As a simple fix, exclude /usr/bin since it's not a real path.
9702    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9704      # a path prefixed by /cygdrive for fixpath to work.
9705      new_path="$CYGWIN_ROOT_PATH$input_path"
9706    fi
9707  fi
9708
9709  # remove trailing .exe if any
9710  new_path="${new_path/%.exe/}"
9711
9712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9713
9714  # First separate the path from the arguments. This will split at the first
9715  # space.
9716  complete="$FOUND_MAKE"
9717  path="${complete%% *}"
9718  tmp="$complete EOL"
9719  arguments="${tmp#* }"
9720
9721  # Input might be given as Windows format, start by converting to
9722  # unix format.
9723  new_path="$path"
9724
9725  windows_path="$new_path"
9726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9727    unix_path=`$CYGPATH -u "$windows_path"`
9728    new_path="$unix_path"
9729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9731    new_path="$unix_path"
9732  fi
9733
9734
9735  # Now try to locate executable using which
9736  new_path=`$WHICH "$new_path" 2> /dev/null`
9737
9738  if test "x$new_path" = x; then
9739    # Oops. Which didn't find the executable.
9740    # The splitting of arguments from the executable at a space might have been incorrect,
9741    # since paths with space are more likely in Windows. Give it another try with the whole
9742    # argument.
9743    path="$complete"
9744    arguments="EOL"
9745    new_path="$path"
9746
9747  windows_path="$new_path"
9748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9749    unix_path=`$CYGPATH -u "$windows_path"`
9750    new_path="$unix_path"
9751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9753    new_path="$unix_path"
9754  fi
9755
9756
9757    new_path=`$WHICH "$new_path" 2> /dev/null`
9758
9759    if test "x$new_path" = x; then
9760      # It's still not found. Now this is an unrecoverable error.
9761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9763      has_space=`$ECHO "$complete" | $GREP " "`
9764      if test "x$has_space" != x; then
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9767      fi
9768      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9769    fi
9770  fi
9771
9772  # Now new_path has a complete unix path to the binary
9773  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9774    # Keep paths in /bin as-is, but remove trailing .exe if any
9775    new_path="${new_path/%.exe/}"
9776    # Do not save /bin paths to all_fixpath_prefixes!
9777  else
9778    # Not in mixed or Windows style, start by that.
9779    new_path=`cmd //c echo $new_path`
9780
9781  input_path="$new_path"
9782  # Check if we need to convert this using DOS-style short mode. If the path
9783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9784  # take no chances and rewrite it.
9785  # Note: m4 eats our [], so we need to use [ and ] instead.
9786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9787  if test "x$has_forbidden_chars" != x; then
9788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9790  fi
9791
9792    # Output is in $new_path
9793
9794  windows_path="$new_path"
9795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9796    unix_path=`$CYGPATH -u "$windows_path"`
9797    new_path="$unix_path"
9798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9800    new_path="$unix_path"
9801  fi
9802
9803    # remove trailing .exe if any
9804    new_path="${new_path/%.exe/}"
9805
9806    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9807    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9808  fi
9809
9810  else
9811    # We're on a posix platform. Hooray! :)
9812    # First separate the path from the arguments. This will split at the first
9813    # space.
9814    complete="$FOUND_MAKE"
9815    path="${complete%% *}"
9816    tmp="$complete EOL"
9817    arguments="${tmp#* }"
9818
9819    # Cannot rely on the command "which" here since it doesn't always work.
9820    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9821    if test -z "$is_absolute_path"; then
9822      # Path to executable is not absolute. Find it.
9823      IFS_save="$IFS"
9824      IFS=:
9825      for p in $PATH; do
9826        if test -f "$p/$path" && test -x "$p/$path"; then
9827          new_path="$p/$path"
9828          break
9829        fi
9830      done
9831      IFS="$IFS_save"
9832    else
9833      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9834$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9835      new_path="$path"
9836    fi
9837
9838    if test "x$new_path" = x; then
9839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9840$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9841        has_space=`$ECHO "$complete" | $GREP " "`
9842        if test "x$has_space" != x; then
9843          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9844$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9845        fi
9846        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9847      fi
9848  fi
9849
9850      # Now join together the path and the arguments once again
9851      if test "x$arguments" != xEOL; then
9852        new_complete="$new_path ${arguments% *}"
9853      else
9854        new_complete="$new_path"
9855      fi
9856
9857  if test "x$complete" != "x$new_complete"; then
9858      FOUND_MAKE="$new_complete"
9859      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9860$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9861    fi
9862
9863        fi
9864      fi
9865    fi
9866  fi
9867
9868        fi
9869        PATH=$OLD_PATH
9870      fi
9871    fi
9872
9873    if test "x$FOUND_MAKE" = x; then
9874      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
9875    fi
9876  fi
9877
9878  MAKE=$FOUND_MAKE
9879
9880  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9881$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9882
9883
9884
9885    # Test if find supports -delete
9886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9887$as_echo_n "checking if find supports -delete... " >&6; }
9888    FIND_DELETE="-delete"
9889
9890    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9891
9892    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9893
9894    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9895    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9896        # No, it does not.
9897        rm $DELETEDIR/TestIfFindSupportsDelete
9898        FIND_DELETE="-exec rm \{\} \+"
9899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9900$as_echo "no" >&6; }
9901    else
9902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9903$as_echo "yes" >&6; }
9904    fi
9905    rmdir $DELETEDIR
9906
9907
9908
9909# These tools might not be installed by default,
9910# need hint on how to install them.
9911
9912    for ac_prog in unzip
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if test "${ac_cv_path_UNZIP+set}" = set; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $UNZIP in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9933    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944UNZIP=$ac_cv_path_UNZIP
9945if test -n "$UNZIP"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9947$as_echo "$UNZIP" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$UNZIP" && break
9955done
9956
9957
9958    if test "x$UNZIP" = x; then
9959        if test "xunzip" = x; then
9960          PROG_NAME=unzip
9961        else
9962          PROG_NAME=unzip
9963        fi
9964        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9965$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9966        as_fn_error $? "Cannot continue" "$LINENO" 5
9967    fi
9968
9969
9970
9971    for ac_prog in zip
9972do
9973  # Extract the first word of "$ac_prog", so it can be a program name with args.
9974set dummy $ac_prog; ac_word=$2
9975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9976$as_echo_n "checking for $ac_word... " >&6; }
9977if test "${ac_cv_path_ZIP+set}" = set; then :
9978  $as_echo_n "(cached) " >&6
9979else
9980  case $ZIP in
9981  [\\/]* | ?:[\\/]*)
9982  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9983  ;;
9984  *)
9985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9986for as_dir in $PATH
9987do
9988  IFS=$as_save_IFS
9989  test -z "$as_dir" && as_dir=.
9990    for ac_exec_ext in '' $ac_executable_extensions; do
9991  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9992    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9994    break 2
9995  fi
9996done
9997  done
9998IFS=$as_save_IFS
9999
10000  ;;
10001esac
10002fi
10003ZIP=$ac_cv_path_ZIP
10004if test -n "$ZIP"; then
10005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10006$as_echo "$ZIP" >&6; }
10007else
10008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10009$as_echo "no" >&6; }
10010fi
10011
10012
10013  test -n "$ZIP" && break
10014done
10015
10016
10017    if test "x$ZIP" = x; then
10018        if test "xzip" = x; then
10019          PROG_NAME=zip
10020        else
10021          PROG_NAME=zip
10022        fi
10023        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10024$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10025        as_fn_error $? "Cannot continue" "$LINENO" 5
10026    fi
10027
10028
10029
10030# Non-required basic tools
10031
10032# Extract the first word of "ldd", so it can be a program name with args.
10033set dummy ldd; ac_word=$2
10034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10035$as_echo_n "checking for $ac_word... " >&6; }
10036if test "${ac_cv_path_LDD+set}" = set; then :
10037  $as_echo_n "(cached) " >&6
10038else
10039  case $LDD in
10040  [\\/]* | ?:[\\/]*)
10041  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10042  ;;
10043  *)
10044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10045for as_dir in $PATH
10046do
10047  IFS=$as_save_IFS
10048  test -z "$as_dir" && as_dir=.
10049    for ac_exec_ext in '' $ac_executable_extensions; do
10050  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10051    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10053    break 2
10054  fi
10055done
10056  done
10057IFS=$as_save_IFS
10058
10059  ;;
10060esac
10061fi
10062LDD=$ac_cv_path_LDD
10063if test -n "$LDD"; then
10064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10065$as_echo "$LDD" >&6; }
10066else
10067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10068$as_echo "no" >&6; }
10069fi
10070
10071
10072if test "x$LDD" = "x"; then
10073    # List shared lib dependencies is used for
10074    # debug output and checking for forbidden dependencies.
10075    # We can build without it.
10076    LDD="true"
10077fi
10078# Extract the first word of "otool", so it can be a program name with args.
10079set dummy otool; ac_word=$2
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10081$as_echo_n "checking for $ac_word... " >&6; }
10082if test "${ac_cv_path_OTOOL+set}" = set; then :
10083  $as_echo_n "(cached) " >&6
10084else
10085  case $OTOOL in
10086  [\\/]* | ?:[\\/]*)
10087  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10088  ;;
10089  *)
10090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10091for as_dir in $PATH
10092do
10093  IFS=$as_save_IFS
10094  test -z "$as_dir" && as_dir=.
10095    for ac_exec_ext in '' $ac_executable_extensions; do
10096  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10097    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10099    break 2
10100  fi
10101done
10102  done
10103IFS=$as_save_IFS
10104
10105  ;;
10106esac
10107fi
10108OTOOL=$ac_cv_path_OTOOL
10109if test -n "$OTOOL"; then
10110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10111$as_echo "$OTOOL" >&6; }
10112else
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10114$as_echo "no" >&6; }
10115fi
10116
10117
10118if test "x$OTOOL" = "x"; then
10119   OTOOL="true"
10120fi
10121for ac_prog in readelf greadelf
10122do
10123  # Extract the first word of "$ac_prog", so it can be a program name with args.
10124set dummy $ac_prog; ac_word=$2
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10126$as_echo_n "checking for $ac_word... " >&6; }
10127if test "${ac_cv_path_READELF+set}" = set; then :
10128  $as_echo_n "(cached) " >&6
10129else
10130  case $READELF in
10131  [\\/]* | ?:[\\/]*)
10132  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10133  ;;
10134  *)
10135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10136for as_dir in $PATH
10137do
10138  IFS=$as_save_IFS
10139  test -z "$as_dir" && as_dir=.
10140    for ac_exec_ext in '' $ac_executable_extensions; do
10141  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10142    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10144    break 2
10145  fi
10146done
10147  done
10148IFS=$as_save_IFS
10149
10150  ;;
10151esac
10152fi
10153READELF=$ac_cv_path_READELF
10154if test -n "$READELF"; then
10155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10156$as_echo "$READELF" >&6; }
10157else
10158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
10160fi
10161
10162
10163  test -n "$READELF" && break
10164done
10165
10166# Extract the first word of "hg", so it can be a program name with args.
10167set dummy hg; ac_word=$2
10168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10169$as_echo_n "checking for $ac_word... " >&6; }
10170if test "${ac_cv_path_HG+set}" = set; then :
10171  $as_echo_n "(cached) " >&6
10172else
10173  case $HG in
10174  [\\/]* | ?:[\\/]*)
10175  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10176  ;;
10177  *)
10178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10179for as_dir in $PATH
10180do
10181  IFS=$as_save_IFS
10182  test -z "$as_dir" && as_dir=.
10183    for ac_exec_ext in '' $ac_executable_extensions; do
10184  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10185    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10187    break 2
10188  fi
10189done
10190  done
10191IFS=$as_save_IFS
10192
10193  ;;
10194esac
10195fi
10196HG=$ac_cv_path_HG
10197if test -n "$HG"; then
10198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10199$as_echo "$HG" >&6; }
10200else
10201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10202$as_echo "no" >&6; }
10203fi
10204
10205
10206# Extract the first word of "stat", so it can be a program name with args.
10207set dummy stat; ac_word=$2
10208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10209$as_echo_n "checking for $ac_word... " >&6; }
10210if test "${ac_cv_path_STAT+set}" = set; then :
10211  $as_echo_n "(cached) " >&6
10212else
10213  case $STAT in
10214  [\\/]* | ?:[\\/]*)
10215  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10216  ;;
10217  *)
10218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10219for as_dir in $PATH
10220do
10221  IFS=$as_save_IFS
10222  test -z "$as_dir" && as_dir=.
10223    for ac_exec_ext in '' $ac_executable_extensions; do
10224  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10225    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10227    break 2
10228  fi
10229done
10230  done
10231IFS=$as_save_IFS
10232
10233  ;;
10234esac
10235fi
10236STAT=$ac_cv_path_STAT
10237if test -n "$STAT"; then
10238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10239$as_echo "$STAT" >&6; }
10240else
10241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10242$as_echo "no" >&6; }
10243fi
10244
10245
10246# Extract the first word of "time", so it can be a program name with args.
10247set dummy time; ac_word=$2
10248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10249$as_echo_n "checking for $ac_word... " >&6; }
10250if test "${ac_cv_path_TIME+set}" = set; then :
10251  $as_echo_n "(cached) " >&6
10252else
10253  case $TIME in
10254  [\\/]* | ?:[\\/]*)
10255  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10256  ;;
10257  *)
10258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10259for as_dir in $PATH
10260do
10261  IFS=$as_save_IFS
10262  test -z "$as_dir" && as_dir=.
10263    for ac_exec_ext in '' $ac_executable_extensions; do
10264  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10265    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10267    break 2
10268  fi
10269done
10270  done
10271IFS=$as_save_IFS
10272
10273  ;;
10274esac
10275fi
10276TIME=$ac_cv_path_TIME
10277if test -n "$TIME"; then
10278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10279$as_echo "$TIME" >&6; }
10280else
10281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282$as_echo "no" >&6; }
10283fi
10284
10285
10286
10287if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10288
10289    for ac_prog in comm
10290do
10291  # Extract the first word of "$ac_prog", so it can be a program name with args.
10292set dummy $ac_prog; ac_word=$2
10293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10294$as_echo_n "checking for $ac_word... " >&6; }
10295if test "${ac_cv_path_COMM+set}" = set; then :
10296  $as_echo_n "(cached) " >&6
10297else
10298  case $COMM in
10299  [\\/]* | ?:[\\/]*)
10300  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10301  ;;
10302  *)
10303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10304for as_dir in $PATH
10305do
10306  IFS=$as_save_IFS
10307  test -z "$as_dir" && as_dir=.
10308    for ac_exec_ext in '' $ac_executable_extensions; do
10309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10310    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10312    break 2
10313  fi
10314done
10315  done
10316IFS=$as_save_IFS
10317
10318  ;;
10319esac
10320fi
10321COMM=$ac_cv_path_COMM
10322if test -n "$COMM"; then
10323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10324$as_echo "$COMM" >&6; }
10325else
10326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10327$as_echo "no" >&6; }
10328fi
10329
10330
10331  test -n "$COMM" && break
10332done
10333
10334
10335    if test "x$COMM" = x; then
10336        if test "xcomm" = x; then
10337          PROG_NAME=comm
10338        else
10339          PROG_NAME=comm
10340        fi
10341        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10342$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10343        as_fn_error $? "Cannot continue" "$LINENO" 5
10344    fi
10345
10346
10347fi
10348
10349
10350# Check if pkg-config is available.
10351
10352
10353if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10354	if test -n "$ac_tool_prefix"; then
10355  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10356set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10358$as_echo_n "checking for $ac_word... " >&6; }
10359if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10360  $as_echo_n "(cached) " >&6
10361else
10362  case $PKG_CONFIG in
10363  [\\/]* | ?:[\\/]*)
10364  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10365  ;;
10366  *)
10367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10368for as_dir in $PATH
10369do
10370  IFS=$as_save_IFS
10371  test -z "$as_dir" && as_dir=.
10372    for ac_exec_ext in '' $ac_executable_extensions; do
10373  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10374    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10376    break 2
10377  fi
10378done
10379  done
10380IFS=$as_save_IFS
10381
10382  ;;
10383esac
10384fi
10385PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10386if test -n "$PKG_CONFIG"; then
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10388$as_echo "$PKG_CONFIG" >&6; }
10389else
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
10392fi
10393
10394
10395fi
10396if test -z "$ac_cv_path_PKG_CONFIG"; then
10397  ac_pt_PKG_CONFIG=$PKG_CONFIG
10398  # Extract the first word of "pkg-config", so it can be a program name with args.
10399set dummy pkg-config; ac_word=$2
10400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10401$as_echo_n "checking for $ac_word... " >&6; }
10402if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10403  $as_echo_n "(cached) " >&6
10404else
10405  case $ac_pt_PKG_CONFIG in
10406  [\\/]* | ?:[\\/]*)
10407  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10408  ;;
10409  *)
10410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10411for as_dir in $PATH
10412do
10413  IFS=$as_save_IFS
10414  test -z "$as_dir" && as_dir=.
10415    for ac_exec_ext in '' $ac_executable_extensions; do
10416  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10417    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10419    break 2
10420  fi
10421done
10422  done
10423IFS=$as_save_IFS
10424
10425  ;;
10426esac
10427fi
10428ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10429if test -n "$ac_pt_PKG_CONFIG"; then
10430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10431$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10432else
10433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10434$as_echo "no" >&6; }
10435fi
10436
10437  if test "x$ac_pt_PKG_CONFIG" = x; then
10438    PKG_CONFIG=""
10439  else
10440    case $cross_compiling:$ac_tool_warned in
10441yes:)
10442{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10443$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10444ac_tool_warned=yes ;;
10445esac
10446    PKG_CONFIG=$ac_pt_PKG_CONFIG
10447  fi
10448else
10449  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10450fi
10451
10452fi
10453if test -n "$PKG_CONFIG"; then
10454	_pkg_min_version=0.9.0
10455	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10456$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10457	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10458		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10459$as_echo "yes" >&6; }
10460	else
10461		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10462$as_echo "no" >&6; }
10463		PKG_CONFIG=""
10464	fi
10465
10466fi
10467
10468# After basic tools have been setup, we can check build os specific details.
10469
10470###############################################################################
10471
10472# Note that this is the build platform OS version!
10473
10474OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10475OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10476OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10477OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10478
10479
10480
10481
10482
10483# Setup builddeps, for automatic downloading of tools we need.
10484# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10485# boot-jdk setup, but we need to have basic tools setup first.
10486
10487
10488# Check whether --with-builddeps-conf was given.
10489if test "${with_builddeps_conf+set}" = set; then :
10490  withval=$with_builddeps_conf;
10491fi
10492
10493
10494
10495# Check whether --with-builddeps-server was given.
10496if test "${with_builddeps_server+set}" = set; then :
10497  withval=$with_builddeps_server;
10498fi
10499
10500
10501
10502# Check whether --with-builddeps-dir was given.
10503if test "${with_builddeps_dir+set}" = set; then :
10504  withval=$with_builddeps_dir;
10505else
10506  with_builddeps_dir=/localhome/builddeps
10507fi
10508
10509
10510
10511# Check whether --with-builddeps-group was given.
10512if test "${with_builddeps_group+set}" = set; then :
10513  withval=$with_builddeps_group;
10514fi
10515
10516
10517
10518
10519    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10520        if test "x$with_builddeps_conf" != x; then
10521            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10522$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10523            builddepsfile=$with_builddeps_conf
10524            if test -s $builddepsfile; then
10525                . $builddepsfile
10526                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10527$as_echo "loaded!" >&6; }
10528            else
10529               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10530           fi
10531        else
10532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10533$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10534            builddepsfile=`mktemp`
10535            touch $builddepsfile
10536            # Put all found confs into a single file.
10537            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10538            # Source the file to acquire the variables
10539            if test -s $builddepsfile; then
10540                . $builddepsfile
10541                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10542$as_echo "found at least one!" >&6; }
10543            else
10544               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10545           fi
10546        fi
10547        # Create build and target names that use _ instead of "-" and ".".
10548        # This is necessary to use them in variable names.
10549        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10550        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10551        # Extract rewrite information for build and target
10552        eval rewritten_build=\${REWRITE_${build_var}}
10553        if test "x$rewritten_build" = x; then
10554            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10555            echo Build stays the same $rewritten_build
10556        else
10557            echo Rewriting build for builddeps into $rewritten_build
10558        fi
10559        eval rewritten_target=\${REWRITE_${target_var}}
10560        if test "x$rewritten_target" = x; then
10561            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10562            echo Target stays the same $rewritten_target
10563        else
10564            echo Rewriting target for builddeps into $rewritten_target
10565        fi
10566        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10567        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10568    fi
10569    for ac_prog in 7z unzip
10570do
10571  # Extract the first word of "$ac_prog", so it can be a program name with args.
10572set dummy $ac_prog; ac_word=$2
10573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10574$as_echo_n "checking for $ac_word... " >&6; }
10575if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10576  $as_echo_n "(cached) " >&6
10577else
10578  if test -n "$BDEPS_UNZIP"; then
10579  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10580else
10581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10582for as_dir in $PATH
10583do
10584  IFS=$as_save_IFS
10585  test -z "$as_dir" && as_dir=.
10586    for ac_exec_ext in '' $ac_executable_extensions; do
10587  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10588    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10590    break 2
10591  fi
10592done
10593  done
10594IFS=$as_save_IFS
10595
10596fi
10597fi
10598BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10599if test -n "$BDEPS_UNZIP"; then
10600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10601$as_echo "$BDEPS_UNZIP" >&6; }
10602else
10603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10604$as_echo "no" >&6; }
10605fi
10606
10607
10608  test -n "$BDEPS_UNZIP" && break
10609done
10610
10611    if test "x$BDEPS_UNZIP" = x7z; then
10612        BDEPS_UNZIP="7z x"
10613    fi
10614
10615    for ac_prog in wget lftp ftp
10616do
10617  # Extract the first word of "$ac_prog", so it can be a program name with args.
10618set dummy $ac_prog; ac_word=$2
10619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10620$as_echo_n "checking for $ac_word... " >&6; }
10621if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10622  $as_echo_n "(cached) " >&6
10623else
10624  if test -n "$BDEPS_FTP"; then
10625  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10626else
10627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10628for as_dir in $PATH
10629do
10630  IFS=$as_save_IFS
10631  test -z "$as_dir" && as_dir=.
10632    for ac_exec_ext in '' $ac_executable_extensions; do
10633  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10634    ac_cv_prog_BDEPS_FTP="$ac_prog"
10635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10636    break 2
10637  fi
10638done
10639  done
10640IFS=$as_save_IFS
10641
10642fi
10643fi
10644BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10645if test -n "$BDEPS_FTP"; then
10646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10647$as_echo "$BDEPS_FTP" >&6; }
10648else
10649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10650$as_echo "no" >&6; }
10651fi
10652
10653
10654  test -n "$BDEPS_FTP" && break
10655done
10656
10657
10658
10659###############################################################################
10660#
10661# Determine OpenJDK variants, options and version numbers.
10662#
10663###############################################################################
10664
10665# We need build & target for this.
10666
10667
10668###############################################################################
10669#
10670# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10671# We always build headless support.
10672#
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10674$as_echo_n "checking headful support... " >&6; }
10675# Check whether --enable-headful was given.
10676if test "${enable_headful+set}" = set; then :
10677  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10678else
10679  SUPPORT_HEADFUL=yes
10680fi
10681
10682
10683SUPPORT_HEADLESS=yes
10684BUILD_HEADLESS="BUILD_HEADLESS:=true"
10685
10686if test "x$SUPPORT_HEADFUL" = xyes; then
10687    # We are building both headful and headless.
10688    headful_msg="inlude support for both headful and headless"
10689fi
10690
10691if test "x$SUPPORT_HEADFUL" = xno; then
10692    # Thus we are building headless only.
10693    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10694    headful_msg="headless only"
10695fi
10696
10697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10698$as_echo "$headful_msg" >&6; }
10699
10700
10701
10702
10703
10704# Control wether Hotspot runs Queens test after build.
10705# Check whether --enable-hotspot-test-in-build was given.
10706if test "${enable_hotspot_test_in_build+set}" = set; then :
10707  enableval=$enable_hotspot_test_in_build;
10708else
10709  enable_hotspot_test_in_build=no
10710fi
10711
10712if test "x$enable_hotspot_test_in_build" = "xyes"; then
10713    TEST_IN_BUILD=true
10714else
10715    TEST_IN_BUILD=false
10716fi
10717
10718
10719###############################################################################
10720#
10721# Choose cacerts source file
10722#
10723
10724# Check whether --with-cacerts-file was given.
10725if test "${with_cacerts_file+set}" = set; then :
10726  withval=$with_cacerts_file;
10727fi
10728
10729if test "x$with_cacerts_file" != x; then
10730    CACERTS_FILE=$with_cacerts_file
10731else
10732    if test "x$OPENJDK" = "xtrue"; then
10733        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10734    else
10735        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10736    fi
10737fi
10738
10739
10740###############################################################################
10741#
10742# Enable or disable unlimited crypto
10743#
10744# Check whether --enable-unlimited-crypto was given.
10745if test "${enable_unlimited_crypto+set}" = set; then :
10746  enableval=$enable_unlimited_crypto;
10747else
10748  enable_unlimited_crypto=no
10749fi
10750
10751if test "x$enable_unlimited_crypto" = "xyes"; then
10752    UNLIMITED_CRYPTO=true
10753else
10754    UNLIMITED_CRYPTO=false
10755fi
10756
10757
10758###############################################################################
10759#
10760# Compress jars
10761#
10762COMPRESS_JARS=false
10763
10764
10765
10766
10767# Source the version numbers
10768. $AUTOCONF_DIR/version-numbers
10769
10770# Get the settings from parameters
10771
10772# Check whether --with-milestone was given.
10773if test "${with_milestone+set}" = set; then :
10774  withval=$with_milestone;
10775fi
10776
10777if test "x$with_milestone" = xyes; then
10778  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10779elif test "x$with_milestone" != x; then
10780    MILESTONE="$with_milestone"
10781fi
10782if test "x$MILESTONE" = x; then
10783  MILESTONE=internal
10784fi
10785
10786
10787# Check whether --with-build-number was given.
10788if test "${with_build_number+set}" = set; then :
10789  withval=$with_build_number;
10790fi
10791
10792if test "x$with_build_number" = xyes; then
10793  as_fn_error $? "Build number must have a value" "$LINENO" 5
10794elif test "x$with_build_number" != x; then
10795  JDK_BUILD_NUMBER="$with_build_number"
10796fi
10797if test "x$JDK_BUILD_NUMBER" = x; then
10798  JDK_BUILD_NUMBER=b00
10799fi
10800
10801
10802# Check whether --with-user-release-suffix was given.
10803if test "${with_user_release_suffix+set}" = set; then :
10804  withval=$with_user_release_suffix;
10805fi
10806
10807if test "x$with_user_release_suffix" = xyes; then
10808  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10809elif test "x$with_user_release_suffix" != x; then
10810  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10811else
10812  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10813  # Avoid [:alnum:] since it depends on the locale.
10814  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10815  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10816fi
10817
10818
10819# Now set the JDK version, milestone, build number etc.
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834COPYRIGHT_YEAR=`date +'%Y'`
10835
10836
10837if test "x$JDK_UPDATE_VERSION" != x; then
10838  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10839else
10840  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10841fi
10842
10843
10844COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10845
10846
10847
10848###############################################################################
10849#
10850# Setup BootJDK, used to bootstrap the build.
10851#
10852###############################################################################
10853
10854
10855BOOT_JDK_FOUND=no
10856
10857# Check whether --with-boot-jdk was given.
10858if test "${with_boot_jdk+set}" = set; then :
10859  withval=$with_boot_jdk;
10860fi
10861
10862
10863# We look for the Boot JDK through various means, going from more certain to
10864# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10865# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10866# must check if this is indeed valid; otherwise we'll continue looking.
10867
10868# Test: Is bootjdk explicitely set by command line arguments?
10869
10870  if test "x$BOOT_JDK_FOUND" = xno; then
10871    # Now execute the test
10872
10873if test "x$with_boot_jdk" != x; then
10874    BOOT_JDK=$with_boot_jdk
10875    BOOT_JDK_FOUND=maybe
10876    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10877$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10878fi
10879
10880
10881    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10882    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10883      # Do we have a bin/java?
10884      if test ! -x "$BOOT_JDK/bin/java"; then
10885        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10887        BOOT_JDK_FOUND=no
10888      else
10889        # Do we have a bin/javac?
10890        if test ! -x "$BOOT_JDK/bin/javac"; then
10891          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10893          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10894$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10895          BOOT_JDK_FOUND=no
10896        else
10897          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10898          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10899            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10901            BOOT_JDK_FOUND=no
10902          else
10903            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10904            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10905
10906            # Extra M4 quote needed to protect [] in grep expression.
10907            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10908            if test "x$FOUND_VERSION_78" = x; then
10909              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10911              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10912$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10913              BOOT_JDK_FOUND=no
10914            else
10915              # We're done! :-)
10916              BOOT_JDK_FOUND=yes
10917
10918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10919
10920  # Input might be given as Windows format, start by converting to
10921  # unix format.
10922  path="$BOOT_JDK"
10923  new_path=`$CYGPATH -u "$path"`
10924
10925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10928  # "foo.exe" is OK but "foo" is an error.
10929  #
10930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10931  # It is also a way to make sure we got the proper file name for the real test later on.
10932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10933  if test "x$test_shortpath" = x; then
10934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10935$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10936    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10937  fi
10938
10939  # Call helper function which possibly converts this using DOS-style short mode.
10940  # If so, the updated path is stored in $new_path.
10941
10942  input_path="$new_path"
10943  # Check if we need to convert this using DOS-style short mode. If the path
10944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10945  # take no chances and rewrite it.
10946  # Note: m4 eats our [], so we need to use [ and ] instead.
10947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10948  if test "x$has_forbidden_chars" != x; then
10949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10953      # Going to short mode and back again did indeed matter. Since short mode is
10954      # case insensitive, let's make it lowercase to improve readability.
10955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10956      # Now convert it back to Unix-stile (cygpath)
10957      input_path=`$CYGPATH -u "$shortmode_path"`
10958      new_path="$input_path"
10959    fi
10960  fi
10961
10962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10963  if test "x$test_cygdrive_prefix" = x; then
10964    # As a simple fix, exclude /usr/bin since it's not a real path.
10965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10967      # a path prefixed by /cygdrive for fixpath to work.
10968      new_path="$CYGWIN_ROOT_PATH$input_path"
10969    fi
10970  fi
10971
10972
10973  if test "x$path" != "x$new_path"; then
10974    BOOT_JDK="$new_path"
10975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10976$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10977  fi
10978
10979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10980
10981  path="$BOOT_JDK"
10982  has_colon=`$ECHO $path | $GREP ^.:`
10983  new_path="$path"
10984  if test "x$has_colon" = x; then
10985    # Not in mixed or Windows style, start by that.
10986    new_path=`cmd //c echo $path`
10987  fi
10988
10989
10990  input_path="$new_path"
10991  # Check if we need to convert this using DOS-style short mode. If the path
10992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10993  # take no chances and rewrite it.
10994  # Note: m4 eats our [], so we need to use [ and ] instead.
10995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10996  if test "x$has_forbidden_chars" != x; then
10997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10999  fi
11000
11001
11002  windows_path="$new_path"
11003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11004    unix_path=`$CYGPATH -u "$windows_path"`
11005    new_path="$unix_path"
11006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11008    new_path="$unix_path"
11009  fi
11010
11011  if test "x$path" != "x$new_path"; then
11012    BOOT_JDK="$new_path"
11013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11014$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11015  fi
11016
11017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11019
11020  else
11021    # We're on a posix platform. Hooray! :)
11022    path="$BOOT_JDK"
11023
11024    if test ! -f "$path" && test ! -d "$path"; then
11025      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11026    fi
11027
11028    has_space=`$ECHO "$path" | $GREP " "`
11029    if test "x$has_space" != x; then
11030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11032      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11033    fi
11034  fi
11035
11036              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11037$as_echo_n "checking for Boot JDK... " >&6; }
11038              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11039$as_echo "$BOOT_JDK" >&6; }
11040              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11041$as_echo_n "checking Boot JDK version... " >&6; }
11042              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11043              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11044$as_echo "$BOOT_JDK_VERSION" >&6; }
11045            fi # end check jdk version
11046          fi # end check rt.jar
11047        fi # end check javac
11048      fi # end check java
11049    fi # end check boot jdk found
11050  fi
11051
11052if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11053  # Having specified an argument which is incorrect will produce an instant failure;
11054  # we should not go on looking
11055  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11056fi
11057
11058# Test: Is bootjdk available from builddeps?
11059
11060  if test "x$BOOT_JDK_FOUND" = xno; then
11061    # Now execute the test
11062
11063
11064
11065    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11066        # Source the builddeps file again, to make sure it uses the latest variables!
11067        . $builddepsfile
11068        # Look for a target and build machine specific resource!
11069        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11070        if test "x$resource" = x; then
11071            # Ok, lets instead look for a target specific resource
11072            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11073        fi
11074        if test "x$resource" = x; then
11075            # Ok, lets instead look for a build specific resource
11076            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11077        fi
11078        if test "x$resource" = x; then
11079            # Ok, lets instead look for a generic resource
11080            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11081            resource=${builddep_bootjdk}
11082        fi
11083        if test "x$resource" != x; then
11084            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11085$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11086	    # If the resource in the builddeps.conf file is an existing directory,
11087	    # for example /java/linux/cups
11088	    if test -d ${resource}; then
11089	       depdir=${resource}
11090	    else
11091
11092# bootjdk is for example mymodule
11093# $resource is for example libs/general/libmymod_1_2_3.zip
11094# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11095# $with_builddeps_dir is for example /localhome/builddeps
11096# depdir is the name of the variable into which we store the depdir, eg MYMOD
11097# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11098# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11099    filename=`basename $resource`
11100    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11101    filebase=${filename%%.*}
11102    extension=${filename#*.}
11103    installdir=$with_builddeps_dir/$filebase
11104    if test ! -f $installdir/$filename.unpacked; then
11105        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11106$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11107        if test ! -d $installdir; then
11108            mkdir -p $installdir
11109        fi
11110        if test ! -d $installdir; then
11111            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11112        fi
11113        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11114        touch $tmpfile
11115        if test ! -f $tmpfile; then
11116            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11117        fi
11118
11119    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11120    # $tmpfile is the local file name for the downloaded file.
11121    VALID_TOOL=no
11122    if test "x$BDEPS_FTP" = xwget; then
11123       VALID_TOOL=yes
11124       wget -O $tmpfile $with_builddeps_server/$resource
11125    fi
11126    if test "x$BDEPS_FTP" = xlftp; then
11127       VALID_TOOL=yes
11128       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11129    fi
11130    if test "x$BDEPS_FTP" = xftp; then
11131        VALID_TOOL=yes
11132        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11133        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11134        FTPUSERPWD=${FTPSERVER%%@*}
11135        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11136            FTPUSER=${userpwd%%:*}
11137            FTPPWD=${userpwd#*@}
11138            FTPSERVER=${FTPSERVER#*@}
11139        else
11140            FTPUSER=ftp
11141            FTPPWD=ftp
11142        fi
11143        # the "pass" command does not work on some
11144        # ftp clients (read ftp.exe) but if it works,
11145        # passive mode is better!
11146        (\
11147            echo "user $FTPUSER $FTPPWD"        ;\
11148            echo "pass"                         ;\
11149            echo "bin"                          ;\
11150            echo "get $FTPPATH $tmpfile"              ;\
11151        ) | ftp -in $FTPSERVER
11152    fi
11153    if test "x$VALID_TOOL" != xyes; then
11154       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11155    fi
11156
11157        mv $tmpfile $installdir/$filename
11158        if test ! -s $installdir/$filename; then
11159            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11160        fi
11161        case "$extension" in
11162            zip)  echo "Unzipping $installdir/$filename..."
11163               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11164            ;;
11165            tar.gz) echo "Untaring $installdir/$filename..."
11166               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11167            ;;
11168            tgz) echo "Untaring $installdir/$filename..."
11169               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11170            ;;
11171            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11172            ;;
11173        esac
11174    fi
11175    if test -f $installdir/$filename.unpacked; then
11176        depdir=$installdir
11177    fi
11178
11179	    fi
11180            # Source the builddeps file again, because in the previous command, the depdir
11181            # was updated to point at the current build dependency install directory.
11182            . $builddepsfile
11183            # Now extract variables from the builddeps.conf files.
11184            theroot=${builddep_bootjdk_ROOT}
11185            thecflags=${builddep_bootjdk_CFLAGS}
11186            thelibs=${builddep_bootjdk_LIBS}
11187            if test "x$depdir" = x; then
11188                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11189            fi
11190            BOOT_JDK=$depdir
11191            if test "x$theroot" != x; then
11192               BOOT_JDK="$theroot"
11193            fi
11194            if test "x$thecflags" != x; then
11195               BOOT_JDK_CFLAGS="$thecflags"
11196            fi
11197            if test "x$thelibs" != x; then
11198               BOOT_JDK_LIBS="$thelibs"
11199            fi
11200            BOOT_JDK_FOUND=maybe
11201            else BOOT_JDK_FOUND=no
11202
11203        fi
11204        else BOOT_JDK_FOUND=no
11205
11206    fi
11207
11208
11209
11210    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11211    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11212      # Do we have a bin/java?
11213      if test ! -x "$BOOT_JDK/bin/java"; then
11214        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11216        BOOT_JDK_FOUND=no
11217      else
11218        # Do we have a bin/javac?
11219        if test ! -x "$BOOT_JDK/bin/javac"; then
11220          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11222          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11223$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11224          BOOT_JDK_FOUND=no
11225        else
11226          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11227          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11228            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11230            BOOT_JDK_FOUND=no
11231          else
11232            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11233            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11234
11235            # Extra M4 quote needed to protect [] in grep expression.
11236            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11237            if test "x$FOUND_VERSION_78" = x; then
11238              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11240              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11241$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11242              BOOT_JDK_FOUND=no
11243            else
11244              # We're done! :-)
11245              BOOT_JDK_FOUND=yes
11246
11247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11248
11249  # Input might be given as Windows format, start by converting to
11250  # unix format.
11251  path="$BOOT_JDK"
11252  new_path=`$CYGPATH -u "$path"`
11253
11254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11257  # "foo.exe" is OK but "foo" is an error.
11258  #
11259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11260  # It is also a way to make sure we got the proper file name for the real test later on.
11261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11262  if test "x$test_shortpath" = x; then
11263    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11264$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11265    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11266  fi
11267
11268  # Call helper function which possibly converts this using DOS-style short mode.
11269  # If so, the updated path is stored in $new_path.
11270
11271  input_path="$new_path"
11272  # Check if we need to convert this using DOS-style short mode. If the path
11273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11274  # take no chances and rewrite it.
11275  # Note: m4 eats our [], so we need to use [ and ] instead.
11276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11277  if test "x$has_forbidden_chars" != x; then
11278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11282      # Going to short mode and back again did indeed matter. Since short mode is
11283      # case insensitive, let's make it lowercase to improve readability.
11284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11285      # Now convert it back to Unix-stile (cygpath)
11286      input_path=`$CYGPATH -u "$shortmode_path"`
11287      new_path="$input_path"
11288    fi
11289  fi
11290
11291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11292  if test "x$test_cygdrive_prefix" = x; then
11293    # As a simple fix, exclude /usr/bin since it's not a real path.
11294    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11296      # a path prefixed by /cygdrive for fixpath to work.
11297      new_path="$CYGWIN_ROOT_PATH$input_path"
11298    fi
11299  fi
11300
11301
11302  if test "x$path" != "x$new_path"; then
11303    BOOT_JDK="$new_path"
11304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11305$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11306  fi
11307
11308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11309
11310  path="$BOOT_JDK"
11311  has_colon=`$ECHO $path | $GREP ^.:`
11312  new_path="$path"
11313  if test "x$has_colon" = x; then
11314    # Not in mixed or Windows style, start by that.
11315    new_path=`cmd //c echo $path`
11316  fi
11317
11318
11319  input_path="$new_path"
11320  # Check if we need to convert this using DOS-style short mode. If the path
11321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11322  # take no chances and rewrite it.
11323  # Note: m4 eats our [], so we need to use [ and ] instead.
11324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11325  if test "x$has_forbidden_chars" != x; then
11326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11328  fi
11329
11330
11331  windows_path="$new_path"
11332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11333    unix_path=`$CYGPATH -u "$windows_path"`
11334    new_path="$unix_path"
11335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11337    new_path="$unix_path"
11338  fi
11339
11340  if test "x$path" != "x$new_path"; then
11341    BOOT_JDK="$new_path"
11342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11343$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11344  fi
11345
11346  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11347  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11348
11349  else
11350    # We're on a posix platform. Hooray! :)
11351    path="$BOOT_JDK"
11352
11353    if test ! -f "$path" && test ! -d "$path"; then
11354      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11355    fi
11356
11357    has_space=`$ECHO "$path" | $GREP " "`
11358    if test "x$has_space" != x; then
11359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11361      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11362    fi
11363  fi
11364
11365              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11366$as_echo_n "checking for Boot JDK... " >&6; }
11367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11368$as_echo "$BOOT_JDK" >&6; }
11369              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11370$as_echo_n "checking Boot JDK version... " >&6; }
11371              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11372              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11373$as_echo "$BOOT_JDK_VERSION" >&6; }
11374            fi # end check jdk version
11375          fi # end check rt.jar
11376        fi # end check javac
11377      fi # end check java
11378    fi # end check boot jdk found
11379  fi
11380
11381
11382# Test: Is $JAVA_HOME set?
11383
11384  if test "x$BOOT_JDK_FOUND" = xno; then
11385    # Now execute the test
11386
11387    if test "x$JAVA_HOME" != x; then
11388        JAVA_HOME_PROCESSED="$JAVA_HOME"
11389
11390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11391
11392  # Input might be given as Windows format, start by converting to
11393  # unix format.
11394  path="$JAVA_HOME_PROCESSED"
11395  new_path=`$CYGPATH -u "$path"`
11396
11397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11400  # "foo.exe" is OK but "foo" is an error.
11401  #
11402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11403  # It is also a way to make sure we got the proper file name for the real test later on.
11404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11405  if test "x$test_shortpath" = x; then
11406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11407$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11408    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11409  fi
11410
11411  # Call helper function which possibly converts this using DOS-style short mode.
11412  # If so, the updated path is stored in $new_path.
11413
11414  input_path="$new_path"
11415  # Check if we need to convert this using DOS-style short mode. If the path
11416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11417  # take no chances and rewrite it.
11418  # Note: m4 eats our [], so we need to use [ and ] instead.
11419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11420  if test "x$has_forbidden_chars" != x; then
11421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11425      # Going to short mode and back again did indeed matter. Since short mode is
11426      # case insensitive, let's make it lowercase to improve readability.
11427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11428      # Now convert it back to Unix-stile (cygpath)
11429      input_path=`$CYGPATH -u "$shortmode_path"`
11430      new_path="$input_path"
11431    fi
11432  fi
11433
11434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11435  if test "x$test_cygdrive_prefix" = x; then
11436    # As a simple fix, exclude /usr/bin since it's not a real path.
11437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11439      # a path prefixed by /cygdrive for fixpath to work.
11440      new_path="$CYGWIN_ROOT_PATH$input_path"
11441    fi
11442  fi
11443
11444
11445  if test "x$path" != "x$new_path"; then
11446    JAVA_HOME_PROCESSED="$new_path"
11447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11448$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11449  fi
11450
11451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11452
11453  path="$JAVA_HOME_PROCESSED"
11454  has_colon=`$ECHO $path | $GREP ^.:`
11455  new_path="$path"
11456  if test "x$has_colon" = x; then
11457    # Not in mixed or Windows style, start by that.
11458    new_path=`cmd //c echo $path`
11459  fi
11460
11461
11462  input_path="$new_path"
11463  # Check if we need to convert this using DOS-style short mode. If the path
11464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11465  # take no chances and rewrite it.
11466  # Note: m4 eats our [], so we need to use [ and ] instead.
11467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11468  if test "x$has_forbidden_chars" != x; then
11469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11471  fi
11472
11473
11474  windows_path="$new_path"
11475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11476    unix_path=`$CYGPATH -u "$windows_path"`
11477    new_path="$unix_path"
11478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11480    new_path="$unix_path"
11481  fi
11482
11483  if test "x$path" != "x$new_path"; then
11484    JAVA_HOME_PROCESSED="$new_path"
11485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11486$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11487  fi
11488
11489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11491
11492  else
11493    # We're on a posix platform. Hooray! :)
11494    path="$JAVA_HOME_PROCESSED"
11495
11496    if test ! -f "$path" && test ! -d "$path"; then
11497      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11498    fi
11499
11500    has_space=`$ECHO "$path" | $GREP " "`
11501    if test "x$has_space" != x; then
11502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11503$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11504      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11505    fi
11506  fi
11507
11508        if test ! -d "$JAVA_HOME_PROCESSED"; then
11509            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11510$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11511        else
11512          # Aha, the user has set a JAVA_HOME
11513          # let us use that as the Boot JDK.
11514          BOOT_JDK="$JAVA_HOME_PROCESSED"
11515          BOOT_JDK_FOUND=maybe
11516          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11517$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11518        fi
11519    fi
11520
11521
11522    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11523    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11524      # Do we have a bin/java?
11525      if test ! -x "$BOOT_JDK/bin/java"; then
11526        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11528        BOOT_JDK_FOUND=no
11529      else
11530        # Do we have a bin/javac?
11531        if test ! -x "$BOOT_JDK/bin/javac"; then
11532          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11534          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11535$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11536          BOOT_JDK_FOUND=no
11537        else
11538          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11539          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11540            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11542            BOOT_JDK_FOUND=no
11543          else
11544            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11545            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11546
11547            # Extra M4 quote needed to protect [] in grep expression.
11548            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11549            if test "x$FOUND_VERSION_78" = x; then
11550              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11552              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11553$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11554              BOOT_JDK_FOUND=no
11555            else
11556              # We're done! :-)
11557              BOOT_JDK_FOUND=yes
11558
11559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11560
11561  # Input might be given as Windows format, start by converting to
11562  # unix format.
11563  path="$BOOT_JDK"
11564  new_path=`$CYGPATH -u "$path"`
11565
11566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11569  # "foo.exe" is OK but "foo" is an error.
11570  #
11571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11572  # It is also a way to make sure we got the proper file name for the real test later on.
11573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11574  if test "x$test_shortpath" = x; then
11575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11576$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11577    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11578  fi
11579
11580  # Call helper function which possibly converts this using DOS-style short mode.
11581  # If so, the updated path is stored in $new_path.
11582
11583  input_path="$new_path"
11584  # Check if we need to convert this using DOS-style short mode. If the path
11585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11586  # take no chances and rewrite it.
11587  # Note: m4 eats our [], so we need to use [ and ] instead.
11588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11589  if test "x$has_forbidden_chars" != x; then
11590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11594      # Going to short mode and back again did indeed matter. Since short mode is
11595      # case insensitive, let's make it lowercase to improve readability.
11596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11597      # Now convert it back to Unix-stile (cygpath)
11598      input_path=`$CYGPATH -u "$shortmode_path"`
11599      new_path="$input_path"
11600    fi
11601  fi
11602
11603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11604  if test "x$test_cygdrive_prefix" = x; then
11605    # As a simple fix, exclude /usr/bin since it's not a real path.
11606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11608      # a path prefixed by /cygdrive for fixpath to work.
11609      new_path="$CYGWIN_ROOT_PATH$input_path"
11610    fi
11611  fi
11612
11613
11614  if test "x$path" != "x$new_path"; then
11615    BOOT_JDK="$new_path"
11616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11618  fi
11619
11620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11621
11622  path="$BOOT_JDK"
11623  has_colon=`$ECHO $path | $GREP ^.:`
11624  new_path="$path"
11625  if test "x$has_colon" = x; then
11626    # Not in mixed or Windows style, start by that.
11627    new_path=`cmd //c echo $path`
11628  fi
11629
11630
11631  input_path="$new_path"
11632  # Check if we need to convert this using DOS-style short mode. If the path
11633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11634  # take no chances and rewrite it.
11635  # Note: m4 eats our [], so we need to use [ and ] instead.
11636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11637  if test "x$has_forbidden_chars" != x; then
11638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11640  fi
11641
11642
11643  windows_path="$new_path"
11644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11645    unix_path=`$CYGPATH -u "$windows_path"`
11646    new_path="$unix_path"
11647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11649    new_path="$unix_path"
11650  fi
11651
11652  if test "x$path" != "x$new_path"; then
11653    BOOT_JDK="$new_path"
11654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11655$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11656  fi
11657
11658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11660
11661  else
11662    # We're on a posix platform. Hooray! :)
11663    path="$BOOT_JDK"
11664
11665    if test ! -f "$path" && test ! -d "$path"; then
11666      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11667    fi
11668
11669    has_space=`$ECHO "$path" | $GREP " "`
11670    if test "x$has_space" != x; then
11671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11672$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11673      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11674    fi
11675  fi
11676
11677              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11678$as_echo_n "checking for Boot JDK... " >&6; }
11679              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11680$as_echo "$BOOT_JDK" >&6; }
11681              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11682$as_echo_n "checking Boot JDK version... " >&6; }
11683              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11684              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11685$as_echo "$BOOT_JDK_VERSION" >&6; }
11686            fi # end check jdk version
11687          fi # end check rt.jar
11688        fi # end check javac
11689      fi # end check java
11690    fi # end check boot jdk found
11691  fi
11692
11693
11694# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11695
11696  if test "x$BOOT_JDK_FOUND" = xno; then
11697    # Now execute the test
11698
11699    if test -x /usr/libexec/java_home; then
11700        BOOT_JDK=`/usr/libexec/java_home`
11701        BOOT_JDK_FOUND=maybe
11702        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11703$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11704    fi
11705
11706
11707    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11708    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11709      # Do we have a bin/java?
11710      if test ! -x "$BOOT_JDK/bin/java"; then
11711        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11713        BOOT_JDK_FOUND=no
11714      else
11715        # Do we have a bin/javac?
11716        if test ! -x "$BOOT_JDK/bin/javac"; then
11717          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11719          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11720$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11721          BOOT_JDK_FOUND=no
11722        else
11723          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11724          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11725            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11727            BOOT_JDK_FOUND=no
11728          else
11729            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11731
11732            # Extra M4 quote needed to protect [] in grep expression.
11733            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11734            if test "x$FOUND_VERSION_78" = x; then
11735              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11737              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11738$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11739              BOOT_JDK_FOUND=no
11740            else
11741              # We're done! :-)
11742              BOOT_JDK_FOUND=yes
11743
11744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11745
11746  # Input might be given as Windows format, start by converting to
11747  # unix format.
11748  path="$BOOT_JDK"
11749  new_path=`$CYGPATH -u "$path"`
11750
11751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11754  # "foo.exe" is OK but "foo" is an error.
11755  #
11756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11757  # It is also a way to make sure we got the proper file name for the real test later on.
11758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11759  if test "x$test_shortpath" = x; then
11760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11762    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11763  fi
11764
11765  # Call helper function which possibly converts this using DOS-style short mode.
11766  # If so, the updated path is stored in $new_path.
11767
11768  input_path="$new_path"
11769  # Check if we need to convert this using DOS-style short mode. If the path
11770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11771  # take no chances and rewrite it.
11772  # Note: m4 eats our [], so we need to use [ and ] instead.
11773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11774  if test "x$has_forbidden_chars" != x; then
11775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11779      # Going to short mode and back again did indeed matter. Since short mode is
11780      # case insensitive, let's make it lowercase to improve readability.
11781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11782      # Now convert it back to Unix-stile (cygpath)
11783      input_path=`$CYGPATH -u "$shortmode_path"`
11784      new_path="$input_path"
11785    fi
11786  fi
11787
11788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11789  if test "x$test_cygdrive_prefix" = x; then
11790    # As a simple fix, exclude /usr/bin since it's not a real path.
11791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11793      # a path prefixed by /cygdrive for fixpath to work.
11794      new_path="$CYGWIN_ROOT_PATH$input_path"
11795    fi
11796  fi
11797
11798
11799  if test "x$path" != "x$new_path"; then
11800    BOOT_JDK="$new_path"
11801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11803  fi
11804
11805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11806
11807  path="$BOOT_JDK"
11808  has_colon=`$ECHO $path | $GREP ^.:`
11809  new_path="$path"
11810  if test "x$has_colon" = x; then
11811    # Not in mixed or Windows style, start by that.
11812    new_path=`cmd //c echo $path`
11813  fi
11814
11815
11816  input_path="$new_path"
11817  # Check if we need to convert this using DOS-style short mode. If the path
11818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11819  # take no chances and rewrite it.
11820  # Note: m4 eats our [], so we need to use [ and ] instead.
11821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11822  if test "x$has_forbidden_chars" != x; then
11823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11825  fi
11826
11827
11828  windows_path="$new_path"
11829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11830    unix_path=`$CYGPATH -u "$windows_path"`
11831    new_path="$unix_path"
11832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11834    new_path="$unix_path"
11835  fi
11836
11837  if test "x$path" != "x$new_path"; then
11838    BOOT_JDK="$new_path"
11839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11841  fi
11842
11843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11845
11846  else
11847    # We're on a posix platform. Hooray! :)
11848    path="$BOOT_JDK"
11849
11850    if test ! -f "$path" && test ! -d "$path"; then
11851      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11852    fi
11853
11854    has_space=`$ECHO "$path" | $GREP " "`
11855    if test "x$has_space" != x; then
11856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11858      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11859    fi
11860  fi
11861
11862              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11863$as_echo_n "checking for Boot JDK... " >&6; }
11864              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11865$as_echo "$BOOT_JDK" >&6; }
11866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11867$as_echo_n "checking Boot JDK version... " >&6; }
11868              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11869              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11870$as_echo "$BOOT_JDK_VERSION" >&6; }
11871            fi # end check jdk version
11872          fi # end check rt.jar
11873        fi # end check javac
11874      fi # end check java
11875    fi # end check boot jdk found
11876  fi
11877
11878
11879# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11880
11881  if test "x$BOOT_JDK_FOUND" = xno; then
11882    # Now execute the test
11883
11884    # Extract the first word of "javac", so it can be a program name with args.
11885set dummy javac; ac_word=$2
11886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11887$as_echo_n "checking for $ac_word... " >&6; }
11888if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11889  $as_echo_n "(cached) " >&6
11890else
11891  case $JAVAC_CHECK in
11892  [\\/]* | ?:[\\/]*)
11893  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11894  ;;
11895  *)
11896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11897for as_dir in $PATH
11898do
11899  IFS=$as_save_IFS
11900  test -z "$as_dir" && as_dir=.
11901    for ac_exec_ext in '' $ac_executable_extensions; do
11902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11903    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11905    break 2
11906  fi
11907done
11908  done
11909IFS=$as_save_IFS
11910
11911  ;;
11912esac
11913fi
11914JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11915if test -n "$JAVAC_CHECK"; then
11916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11917$as_echo "$JAVAC_CHECK" >&6; }
11918else
11919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11920$as_echo "no" >&6; }
11921fi
11922
11923
11924    # Extract the first word of "java", so it can be a program name with args.
11925set dummy java; ac_word=$2
11926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11927$as_echo_n "checking for $ac_word... " >&6; }
11928if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11929  $as_echo_n "(cached) " >&6
11930else
11931  case $JAVA_CHECK in
11932  [\\/]* | ?:[\\/]*)
11933  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11934  ;;
11935  *)
11936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11937for as_dir in $PATH
11938do
11939  IFS=$as_save_IFS
11940  test -z "$as_dir" && as_dir=.
11941    for ac_exec_ext in '' $ac_executable_extensions; do
11942  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11943    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11945    break 2
11946  fi
11947done
11948  done
11949IFS=$as_save_IFS
11950
11951  ;;
11952esac
11953fi
11954JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11955if test -n "$JAVA_CHECK"; then
11956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11957$as_echo "$JAVA_CHECK" >&6; }
11958else
11959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11960$as_echo "no" >&6; }
11961fi
11962
11963
11964    BINARY="$JAVAC_CHECK"
11965    if test "x$JAVAC_CHECK" = x; then
11966        BINARY="$JAVA_CHECK"
11967    fi
11968    if test "x$BINARY" != x; then
11969        # So there is a java(c) binary, it might be part of a JDK.
11970        # Lets find the JDK/JRE directory by following symbolic links.
11971        # Linux/GNU systems often have links from /usr/bin/java to
11972        # /etc/alternatives/java to the real JDK binary.
11973
11974    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11975        # Follow a chain of symbolic links. Use readlink
11976        # where it exists, else fall back to horribly
11977        # complicated shell code.
11978        if test "x$READLINK_TESTED" != yes; then
11979            # On MacOSX there is a readlink tool with a different
11980            # purpose than the GNU readlink tool. Check the found readlink.
11981            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11982            if test "x$ISGNU" = x; then
11983                 # A readlink that we do not know how to use.
11984                 # Are there other non-GNU readlinks out there?
11985                 READLINK_TESTED=yes
11986                 READLINK=
11987            fi
11988        fi
11989
11990        if test "x$READLINK" != x; then
11991            BINARY=`$READLINK -f $BINARY`
11992        else
11993            # Save the current directory for restoring afterwards
11994            STARTDIR=$PWD
11995            COUNTER=0
11996            sym_link_dir=`$DIRNAME $BINARY`
11997            sym_link_file=`$BASENAME $BINARY`
11998            # Use the system pwd and not the shell builtin to resolve directory symlinks
11999            cd $sym_link_dir
12000            cd `$THEPWDCMD`
12001            sym_link_dir=`$THEPWDCMD`
12002            # Resolve file symlinks
12003            while test $COUNTER -lt 20; do
12004                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12005                if test "x$ISLINK" == x; then
12006                    # This is not a symbolic link! We are done!
12007                    break
12008                fi
12009                # Again resolve directory symlinks since the target of the just found
12010                # link could be in a different directory
12011                cd `$DIRNAME $ISLINK`
12012                sym_link_dir=`$THEPWDCMD`
12013                sym_link_file=`$BASENAME $ISLINK`
12014                let COUNTER=COUNTER+1
12015            done
12016            cd $STARTDIR
12017            BINARY=$sym_link_dir/$sym_link_file
12018        fi
12019    fi
12020
12021        BOOT_JDK=`dirname "$BINARY"`
12022        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12023        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12024            # Looks like we found ourselves an JDK
12025            BOOT_JDK_FOUND=maybe
12026            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12027$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12028        fi
12029    fi
12030
12031
12032    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12033    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12034      # Do we have a bin/java?
12035      if test ! -x "$BOOT_JDK/bin/java"; then
12036        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12038        BOOT_JDK_FOUND=no
12039      else
12040        # Do we have a bin/javac?
12041        if test ! -x "$BOOT_JDK/bin/javac"; then
12042          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12044          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12045$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12046          BOOT_JDK_FOUND=no
12047        else
12048          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12049          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12050            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12052            BOOT_JDK_FOUND=no
12053          else
12054            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12055            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12056
12057            # Extra M4 quote needed to protect [] in grep expression.
12058            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12059            if test "x$FOUND_VERSION_78" = x; then
12060              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12062              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12063$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12064              BOOT_JDK_FOUND=no
12065            else
12066              # We're done! :-)
12067              BOOT_JDK_FOUND=yes
12068
12069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12070
12071  # Input might be given as Windows format, start by converting to
12072  # unix format.
12073  path="$BOOT_JDK"
12074  new_path=`$CYGPATH -u "$path"`
12075
12076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12079  # "foo.exe" is OK but "foo" is an error.
12080  #
12081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12082  # It is also a way to make sure we got the proper file name for the real test later on.
12083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12084  if test "x$test_shortpath" = x; then
12085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12087    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12088  fi
12089
12090  # Call helper function which possibly converts this using DOS-style short mode.
12091  # If so, the updated path is stored in $new_path.
12092
12093  input_path="$new_path"
12094  # Check if we need to convert this using DOS-style short mode. If the path
12095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12096  # take no chances and rewrite it.
12097  # Note: m4 eats our [], so we need to use [ and ] instead.
12098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12099  if test "x$has_forbidden_chars" != x; then
12100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12104      # Going to short mode and back again did indeed matter. Since short mode is
12105      # case insensitive, let's make it lowercase to improve readability.
12106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12107      # Now convert it back to Unix-stile (cygpath)
12108      input_path=`$CYGPATH -u "$shortmode_path"`
12109      new_path="$input_path"
12110    fi
12111  fi
12112
12113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12114  if test "x$test_cygdrive_prefix" = x; then
12115    # As a simple fix, exclude /usr/bin since it's not a real path.
12116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12118      # a path prefixed by /cygdrive for fixpath to work.
12119      new_path="$CYGWIN_ROOT_PATH$input_path"
12120    fi
12121  fi
12122
12123
12124  if test "x$path" != "x$new_path"; then
12125    BOOT_JDK="$new_path"
12126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12128  fi
12129
12130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12131
12132  path="$BOOT_JDK"
12133  has_colon=`$ECHO $path | $GREP ^.:`
12134  new_path="$path"
12135  if test "x$has_colon" = x; then
12136    # Not in mixed or Windows style, start by that.
12137    new_path=`cmd //c echo $path`
12138  fi
12139
12140
12141  input_path="$new_path"
12142  # Check if we need to convert this using DOS-style short mode. If the path
12143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12144  # take no chances and rewrite it.
12145  # Note: m4 eats our [], so we need to use [ and ] instead.
12146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12147  if test "x$has_forbidden_chars" != x; then
12148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12150  fi
12151
12152
12153  windows_path="$new_path"
12154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12155    unix_path=`$CYGPATH -u "$windows_path"`
12156    new_path="$unix_path"
12157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12159    new_path="$unix_path"
12160  fi
12161
12162  if test "x$path" != "x$new_path"; then
12163    BOOT_JDK="$new_path"
12164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12166  fi
12167
12168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12170
12171  else
12172    # We're on a posix platform. Hooray! :)
12173    path="$BOOT_JDK"
12174
12175    if test ! -f "$path" && test ! -d "$path"; then
12176      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12177    fi
12178
12179    has_space=`$ECHO "$path" | $GREP " "`
12180    if test "x$has_space" != x; then
12181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12182$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12183      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12184    fi
12185  fi
12186
12187              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12188$as_echo_n "checking for Boot JDK... " >&6; }
12189              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12190$as_echo "$BOOT_JDK" >&6; }
12191              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12192$as_echo_n "checking Boot JDK version... " >&6; }
12193              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12194              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12195$as_echo "$BOOT_JDK_VERSION" >&6; }
12196            fi # end check jdk version
12197          fi # end check rt.jar
12198        fi # end check javac
12199      fi # end check java
12200    fi # end check boot jdk found
12201  fi
12202
12203
12204# Test: Is there a JDK installed in default, well-known locations?
12205
12206  if test "x$BOOT_JDK_FOUND" = xno; then
12207    # Now execute the test
12208
12209  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12210
12211  if test "x$BOOT_JDK_FOUND" = xno; then
12212    # Now execute the test
12213
12214  if test "x$ProgramW6432" != x; then
12215    VIRTUAL_DIR="$ProgramW6432/Java"
12216
12217  windows_path="$VIRTUAL_DIR"
12218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12219    unix_path=`$CYGPATH -u "$windows_path"`
12220    VIRTUAL_DIR="$unix_path"
12221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12223    VIRTUAL_DIR="$unix_path"
12224  fi
12225
12226
12227  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12228  BOOT_JDK_SUFFIX=""
12229  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12230  if test "x$ALL_JDKS_FOUND" != x; then
12231    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12232
12233  if test "x$BOOT_JDK_FOUND" = xno; then
12234    # Now execute the test
12235
12236        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12237        if test -d "$BOOT_JDK"; then
12238          BOOT_JDK_FOUND=maybe
12239          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12240$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12241        fi
12242
12243
12244    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12245    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12246      # Do we have a bin/java?
12247      if test ! -x "$BOOT_JDK/bin/java"; then
12248        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12250        BOOT_JDK_FOUND=no
12251      else
12252        # Do we have a bin/javac?
12253        if test ! -x "$BOOT_JDK/bin/javac"; then
12254          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12256          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12257$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12258          BOOT_JDK_FOUND=no
12259        else
12260          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12261          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12262            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12264            BOOT_JDK_FOUND=no
12265          else
12266            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12267            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12268
12269            # Extra M4 quote needed to protect [] in grep expression.
12270            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12271            if test "x$FOUND_VERSION_78" = x; then
12272              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12274              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12275$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12276              BOOT_JDK_FOUND=no
12277            else
12278              # We're done! :-)
12279              BOOT_JDK_FOUND=yes
12280
12281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12282
12283  # Input might be given as Windows format, start by converting to
12284  # unix format.
12285  path="$BOOT_JDK"
12286  new_path=`$CYGPATH -u "$path"`
12287
12288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12291  # "foo.exe" is OK but "foo" is an error.
12292  #
12293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12294  # It is also a way to make sure we got the proper file name for the real test later on.
12295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12296  if test "x$test_shortpath" = x; then
12297    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12299    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12300  fi
12301
12302  # Call helper function which possibly converts this using DOS-style short mode.
12303  # If so, the updated path is stored in $new_path.
12304
12305  input_path="$new_path"
12306  # Check if we need to convert this using DOS-style short mode. If the path
12307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12308  # take no chances and rewrite it.
12309  # Note: m4 eats our [], so we need to use [ and ] instead.
12310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12311  if test "x$has_forbidden_chars" != x; then
12312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12316      # Going to short mode and back again did indeed matter. Since short mode is
12317      # case insensitive, let's make it lowercase to improve readability.
12318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12319      # Now convert it back to Unix-stile (cygpath)
12320      input_path=`$CYGPATH -u "$shortmode_path"`
12321      new_path="$input_path"
12322    fi
12323  fi
12324
12325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12326  if test "x$test_cygdrive_prefix" = x; then
12327    # As a simple fix, exclude /usr/bin since it's not a real path.
12328    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12330      # a path prefixed by /cygdrive for fixpath to work.
12331      new_path="$CYGWIN_ROOT_PATH$input_path"
12332    fi
12333  fi
12334
12335
12336  if test "x$path" != "x$new_path"; then
12337    BOOT_JDK="$new_path"
12338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12339$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12340  fi
12341
12342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12343
12344  path="$BOOT_JDK"
12345  has_colon=`$ECHO $path | $GREP ^.:`
12346  new_path="$path"
12347  if test "x$has_colon" = x; then
12348    # Not in mixed or Windows style, start by that.
12349    new_path=`cmd //c echo $path`
12350  fi
12351
12352
12353  input_path="$new_path"
12354  # Check if we need to convert this using DOS-style short mode. If the path
12355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12356  # take no chances and rewrite it.
12357  # Note: m4 eats our [], so we need to use [ and ] instead.
12358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12359  if test "x$has_forbidden_chars" != x; then
12360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12362  fi
12363
12364
12365  windows_path="$new_path"
12366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12367    unix_path=`$CYGPATH -u "$windows_path"`
12368    new_path="$unix_path"
12369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12371    new_path="$unix_path"
12372  fi
12373
12374  if test "x$path" != "x$new_path"; then
12375    BOOT_JDK="$new_path"
12376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12377$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12378  fi
12379
12380  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12381  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12382
12383  else
12384    # We're on a posix platform. Hooray! :)
12385    path="$BOOT_JDK"
12386
12387    if test ! -f "$path" && test ! -d "$path"; then
12388      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12389    fi
12390
12391    has_space=`$ECHO "$path" | $GREP " "`
12392    if test "x$has_space" != x; then
12393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12394$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12395      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12396    fi
12397  fi
12398
12399              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12400$as_echo_n "checking for Boot JDK... " >&6; }
12401              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12402$as_echo "$BOOT_JDK" >&6; }
12403              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12404$as_echo_n "checking Boot JDK version... " >&6; }
12405              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12406              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12407$as_echo "$BOOT_JDK_VERSION" >&6; }
12408            fi # end check jdk version
12409          fi # end check rt.jar
12410        fi # end check javac
12411      fi # end check java
12412    fi # end check boot jdk found
12413  fi
12414
12415    done
12416  fi
12417
12418  fi
12419
12420
12421    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12422    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12423      # Do we have a bin/java?
12424      if test ! -x "$BOOT_JDK/bin/java"; then
12425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12427        BOOT_JDK_FOUND=no
12428      else
12429        # Do we have a bin/javac?
12430        if test ! -x "$BOOT_JDK/bin/javac"; then
12431          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12433          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12434$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12435          BOOT_JDK_FOUND=no
12436        else
12437          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12438          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12439            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12441            BOOT_JDK_FOUND=no
12442          else
12443            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12445
12446            # Extra M4 quote needed to protect [] in grep expression.
12447            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12448            if test "x$FOUND_VERSION_78" = x; then
12449              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12451              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12452$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12453              BOOT_JDK_FOUND=no
12454            else
12455              # We're done! :-)
12456              BOOT_JDK_FOUND=yes
12457
12458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12459
12460  # Input might be given as Windows format, start by converting to
12461  # unix format.
12462  path="$BOOT_JDK"
12463  new_path=`$CYGPATH -u "$path"`
12464
12465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12468  # "foo.exe" is OK but "foo" is an error.
12469  #
12470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12471  # It is also a way to make sure we got the proper file name for the real test later on.
12472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12473  if test "x$test_shortpath" = x; then
12474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12476    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12477  fi
12478
12479  # Call helper function which possibly converts this using DOS-style short mode.
12480  # If so, the updated path is stored in $new_path.
12481
12482  input_path="$new_path"
12483  # Check if we need to convert this using DOS-style short mode. If the path
12484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12485  # take no chances and rewrite it.
12486  # Note: m4 eats our [], so we need to use [ and ] instead.
12487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12488  if test "x$has_forbidden_chars" != x; then
12489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12493      # Going to short mode and back again did indeed matter. Since short mode is
12494      # case insensitive, let's make it lowercase to improve readability.
12495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12496      # Now convert it back to Unix-stile (cygpath)
12497      input_path=`$CYGPATH -u "$shortmode_path"`
12498      new_path="$input_path"
12499    fi
12500  fi
12501
12502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12503  if test "x$test_cygdrive_prefix" = x; then
12504    # As a simple fix, exclude /usr/bin since it's not a real path.
12505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12507      # a path prefixed by /cygdrive for fixpath to work.
12508      new_path="$CYGWIN_ROOT_PATH$input_path"
12509    fi
12510  fi
12511
12512
12513  if test "x$path" != "x$new_path"; then
12514    BOOT_JDK="$new_path"
12515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12517  fi
12518
12519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12520
12521  path="$BOOT_JDK"
12522  has_colon=`$ECHO $path | $GREP ^.:`
12523  new_path="$path"
12524  if test "x$has_colon" = x; then
12525    # Not in mixed or Windows style, start by that.
12526    new_path=`cmd //c echo $path`
12527  fi
12528
12529
12530  input_path="$new_path"
12531  # Check if we need to convert this using DOS-style short mode. If the path
12532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12533  # take no chances and rewrite it.
12534  # Note: m4 eats our [], so we need to use [ and ] instead.
12535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12536  if test "x$has_forbidden_chars" != x; then
12537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12539  fi
12540
12541
12542  windows_path="$new_path"
12543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12544    unix_path=`$CYGPATH -u "$windows_path"`
12545    new_path="$unix_path"
12546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12548    new_path="$unix_path"
12549  fi
12550
12551  if test "x$path" != "x$new_path"; then
12552    BOOT_JDK="$new_path"
12553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12554$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12555  fi
12556
12557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12559
12560  else
12561    # We're on a posix platform. Hooray! :)
12562    path="$BOOT_JDK"
12563
12564    if test ! -f "$path" && test ! -d "$path"; then
12565      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12566    fi
12567
12568    has_space=`$ECHO "$path" | $GREP " "`
12569    if test "x$has_space" != x; then
12570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12572      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12573    fi
12574  fi
12575
12576              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12577$as_echo_n "checking for Boot JDK... " >&6; }
12578              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12579$as_echo "$BOOT_JDK" >&6; }
12580              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12581$as_echo_n "checking Boot JDK version... " >&6; }
12582              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12583              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12584$as_echo "$BOOT_JDK_VERSION" >&6; }
12585            fi # end check jdk version
12586          fi # end check rt.jar
12587        fi # end check javac
12588      fi # end check java
12589    fi # end check boot jdk found
12590  fi
12591
12592
12593  if test "x$BOOT_JDK_FOUND" = xno; then
12594    # Now execute the test
12595
12596  if test "x$PROGRAMW6432" != x; then
12597    VIRTUAL_DIR="$PROGRAMW6432/Java"
12598
12599  windows_path="$VIRTUAL_DIR"
12600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12601    unix_path=`$CYGPATH -u "$windows_path"`
12602    VIRTUAL_DIR="$unix_path"
12603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12605    VIRTUAL_DIR="$unix_path"
12606  fi
12607
12608
12609  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12610  BOOT_JDK_SUFFIX=""
12611  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12612  if test "x$ALL_JDKS_FOUND" != x; then
12613    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12614
12615  if test "x$BOOT_JDK_FOUND" = xno; then
12616    # Now execute the test
12617
12618        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12619        if test -d "$BOOT_JDK"; then
12620          BOOT_JDK_FOUND=maybe
12621          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12622$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12623        fi
12624
12625
12626    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12627    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12628      # Do we have a bin/java?
12629      if test ! -x "$BOOT_JDK/bin/java"; then
12630        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12632        BOOT_JDK_FOUND=no
12633      else
12634        # Do we have a bin/javac?
12635        if test ! -x "$BOOT_JDK/bin/javac"; then
12636          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12638          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12639$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12640          BOOT_JDK_FOUND=no
12641        else
12642          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12643          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12644            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12646            BOOT_JDK_FOUND=no
12647          else
12648            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12649            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12650
12651            # Extra M4 quote needed to protect [] in grep expression.
12652            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12653            if test "x$FOUND_VERSION_78" = x; then
12654              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12656              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12657$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12658              BOOT_JDK_FOUND=no
12659            else
12660              # We're done! :-)
12661              BOOT_JDK_FOUND=yes
12662
12663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12664
12665  # Input might be given as Windows format, start by converting to
12666  # unix format.
12667  path="$BOOT_JDK"
12668  new_path=`$CYGPATH -u "$path"`
12669
12670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12673  # "foo.exe" is OK but "foo" is an error.
12674  #
12675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12676  # It is also a way to make sure we got the proper file name for the real test later on.
12677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12678  if test "x$test_shortpath" = x; then
12679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12681    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12682  fi
12683
12684  # Call helper function which possibly converts this using DOS-style short mode.
12685  # If so, the updated path is stored in $new_path.
12686
12687  input_path="$new_path"
12688  # Check if we need to convert this using DOS-style short mode. If the path
12689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12690  # take no chances and rewrite it.
12691  # Note: m4 eats our [], so we need to use [ and ] instead.
12692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12693  if test "x$has_forbidden_chars" != x; then
12694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12698      # Going to short mode and back again did indeed matter. Since short mode is
12699      # case insensitive, let's make it lowercase to improve readability.
12700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12701      # Now convert it back to Unix-stile (cygpath)
12702      input_path=`$CYGPATH -u "$shortmode_path"`
12703      new_path="$input_path"
12704    fi
12705  fi
12706
12707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12708  if test "x$test_cygdrive_prefix" = x; then
12709    # As a simple fix, exclude /usr/bin since it's not a real path.
12710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12712      # a path prefixed by /cygdrive for fixpath to work.
12713      new_path="$CYGWIN_ROOT_PATH$input_path"
12714    fi
12715  fi
12716
12717
12718  if test "x$path" != "x$new_path"; then
12719    BOOT_JDK="$new_path"
12720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12722  fi
12723
12724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12725
12726  path="$BOOT_JDK"
12727  has_colon=`$ECHO $path | $GREP ^.:`
12728  new_path="$path"
12729  if test "x$has_colon" = x; then
12730    # Not in mixed or Windows style, start by that.
12731    new_path=`cmd //c echo $path`
12732  fi
12733
12734
12735  input_path="$new_path"
12736  # Check if we need to convert this using DOS-style short mode. If the path
12737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12738  # take no chances and rewrite it.
12739  # Note: m4 eats our [], so we need to use [ and ] instead.
12740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12741  if test "x$has_forbidden_chars" != x; then
12742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12744  fi
12745
12746
12747  windows_path="$new_path"
12748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12749    unix_path=`$CYGPATH -u "$windows_path"`
12750    new_path="$unix_path"
12751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12753    new_path="$unix_path"
12754  fi
12755
12756  if test "x$path" != "x$new_path"; then
12757    BOOT_JDK="$new_path"
12758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12759$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12760  fi
12761
12762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12764
12765  else
12766    # We're on a posix platform. Hooray! :)
12767    path="$BOOT_JDK"
12768
12769    if test ! -f "$path" && test ! -d "$path"; then
12770      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12771    fi
12772
12773    has_space=`$ECHO "$path" | $GREP " "`
12774    if test "x$has_space" != x; then
12775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12776$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12777      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12778    fi
12779  fi
12780
12781              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12782$as_echo_n "checking for Boot JDK... " >&6; }
12783              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12784$as_echo "$BOOT_JDK" >&6; }
12785              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12786$as_echo_n "checking Boot JDK version... " >&6; }
12787              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12788              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12789$as_echo "$BOOT_JDK_VERSION" >&6; }
12790            fi # end check jdk version
12791          fi # end check rt.jar
12792        fi # end check javac
12793      fi # end check java
12794    fi # end check boot jdk found
12795  fi
12796
12797    done
12798  fi
12799
12800  fi
12801
12802
12803    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12804    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12805      # Do we have a bin/java?
12806      if test ! -x "$BOOT_JDK/bin/java"; then
12807        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12809        BOOT_JDK_FOUND=no
12810      else
12811        # Do we have a bin/javac?
12812        if test ! -x "$BOOT_JDK/bin/javac"; then
12813          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12815          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12816$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12817          BOOT_JDK_FOUND=no
12818        else
12819          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12820          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12821            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12823            BOOT_JDK_FOUND=no
12824          else
12825            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12826            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12827
12828            # Extra M4 quote needed to protect [] in grep expression.
12829            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12830            if test "x$FOUND_VERSION_78" = x; then
12831              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12833              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12834$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12835              BOOT_JDK_FOUND=no
12836            else
12837              # We're done! :-)
12838              BOOT_JDK_FOUND=yes
12839
12840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12841
12842  # Input might be given as Windows format, start by converting to
12843  # unix format.
12844  path="$BOOT_JDK"
12845  new_path=`$CYGPATH -u "$path"`
12846
12847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12850  # "foo.exe" is OK but "foo" is an error.
12851  #
12852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12853  # It is also a way to make sure we got the proper file name for the real test later on.
12854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12855  if test "x$test_shortpath" = x; then
12856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12858    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12859  fi
12860
12861  # Call helper function which possibly converts this using DOS-style short mode.
12862  # If so, the updated path is stored in $new_path.
12863
12864  input_path="$new_path"
12865  # Check if we need to convert this using DOS-style short mode. If the path
12866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12867  # take no chances and rewrite it.
12868  # Note: m4 eats our [], so we need to use [ and ] instead.
12869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12870  if test "x$has_forbidden_chars" != x; then
12871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12875      # Going to short mode and back again did indeed matter. Since short mode is
12876      # case insensitive, let's make it lowercase to improve readability.
12877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12878      # Now convert it back to Unix-stile (cygpath)
12879      input_path=`$CYGPATH -u "$shortmode_path"`
12880      new_path="$input_path"
12881    fi
12882  fi
12883
12884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12885  if test "x$test_cygdrive_prefix" = x; then
12886    # As a simple fix, exclude /usr/bin since it's not a real path.
12887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12889      # a path prefixed by /cygdrive for fixpath to work.
12890      new_path="$CYGWIN_ROOT_PATH$input_path"
12891    fi
12892  fi
12893
12894
12895  if test "x$path" != "x$new_path"; then
12896    BOOT_JDK="$new_path"
12897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12899  fi
12900
12901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12902
12903  path="$BOOT_JDK"
12904  has_colon=`$ECHO $path | $GREP ^.:`
12905  new_path="$path"
12906  if test "x$has_colon" = x; then
12907    # Not in mixed or Windows style, start by that.
12908    new_path=`cmd //c echo $path`
12909  fi
12910
12911
12912  input_path="$new_path"
12913  # Check if we need to convert this using DOS-style short mode. If the path
12914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12915  # take no chances and rewrite it.
12916  # Note: m4 eats our [], so we need to use [ and ] instead.
12917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12918  if test "x$has_forbidden_chars" != x; then
12919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12921  fi
12922
12923
12924  windows_path="$new_path"
12925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12926    unix_path=`$CYGPATH -u "$windows_path"`
12927    new_path="$unix_path"
12928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12930    new_path="$unix_path"
12931  fi
12932
12933  if test "x$path" != "x$new_path"; then
12934    BOOT_JDK="$new_path"
12935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12937  fi
12938
12939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12941
12942  else
12943    # We're on a posix platform. Hooray! :)
12944    path="$BOOT_JDK"
12945
12946    if test ! -f "$path" && test ! -d "$path"; then
12947      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12948    fi
12949
12950    has_space=`$ECHO "$path" | $GREP " "`
12951    if test "x$has_space" != x; then
12952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12954      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12955    fi
12956  fi
12957
12958              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12959$as_echo_n "checking for Boot JDK... " >&6; }
12960              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12961$as_echo "$BOOT_JDK" >&6; }
12962              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12963$as_echo_n "checking Boot JDK version... " >&6; }
12964              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12965              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12966$as_echo "$BOOT_JDK_VERSION" >&6; }
12967            fi # end check jdk version
12968          fi # end check rt.jar
12969        fi # end check javac
12970      fi # end check java
12971    fi # end check boot jdk found
12972  fi
12973
12974
12975  if test "x$BOOT_JDK_FOUND" = xno; then
12976    # Now execute the test
12977
12978  if test "x$PROGRAMFILES" != x; then
12979    VIRTUAL_DIR="$PROGRAMFILES/Java"
12980
12981  windows_path="$VIRTUAL_DIR"
12982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12983    unix_path=`$CYGPATH -u "$windows_path"`
12984    VIRTUAL_DIR="$unix_path"
12985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12987    VIRTUAL_DIR="$unix_path"
12988  fi
12989
12990
12991  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12992  BOOT_JDK_SUFFIX=""
12993  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12994  if test "x$ALL_JDKS_FOUND" != x; then
12995    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12996
12997  if test "x$BOOT_JDK_FOUND" = xno; then
12998    # Now execute the test
12999
13000        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13001        if test -d "$BOOT_JDK"; then
13002          BOOT_JDK_FOUND=maybe
13003          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13004$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13005        fi
13006
13007
13008    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13009    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13010      # Do we have a bin/java?
13011      if test ! -x "$BOOT_JDK/bin/java"; then
13012        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13014        BOOT_JDK_FOUND=no
13015      else
13016        # Do we have a bin/javac?
13017        if test ! -x "$BOOT_JDK/bin/javac"; then
13018          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13020          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13021$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13022          BOOT_JDK_FOUND=no
13023        else
13024          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13025          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13026            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13028            BOOT_JDK_FOUND=no
13029          else
13030            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13031            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13032
13033            # Extra M4 quote needed to protect [] in grep expression.
13034            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13035            if test "x$FOUND_VERSION_78" = x; then
13036              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13038              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13039$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13040              BOOT_JDK_FOUND=no
13041            else
13042              # We're done! :-)
13043              BOOT_JDK_FOUND=yes
13044
13045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13046
13047  # Input might be given as Windows format, start by converting to
13048  # unix format.
13049  path="$BOOT_JDK"
13050  new_path=`$CYGPATH -u "$path"`
13051
13052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13055  # "foo.exe" is OK but "foo" is an error.
13056  #
13057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13058  # It is also a way to make sure we got the proper file name for the real test later on.
13059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13060  if test "x$test_shortpath" = x; then
13061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13063    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13064  fi
13065
13066  # Call helper function which possibly converts this using DOS-style short mode.
13067  # If so, the updated path is stored in $new_path.
13068
13069  input_path="$new_path"
13070  # Check if we need to convert this using DOS-style short mode. If the path
13071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13072  # take no chances and rewrite it.
13073  # Note: m4 eats our [], so we need to use [ and ] instead.
13074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13075  if test "x$has_forbidden_chars" != x; then
13076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13080      # Going to short mode and back again did indeed matter. Since short mode is
13081      # case insensitive, let's make it lowercase to improve readability.
13082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13083      # Now convert it back to Unix-stile (cygpath)
13084      input_path=`$CYGPATH -u "$shortmode_path"`
13085      new_path="$input_path"
13086    fi
13087  fi
13088
13089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13090  if test "x$test_cygdrive_prefix" = x; then
13091    # As a simple fix, exclude /usr/bin since it's not a real path.
13092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13094      # a path prefixed by /cygdrive for fixpath to work.
13095      new_path="$CYGWIN_ROOT_PATH$input_path"
13096    fi
13097  fi
13098
13099
13100  if test "x$path" != "x$new_path"; then
13101    BOOT_JDK="$new_path"
13102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13104  fi
13105
13106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13107
13108  path="$BOOT_JDK"
13109  has_colon=`$ECHO $path | $GREP ^.:`
13110  new_path="$path"
13111  if test "x$has_colon" = x; then
13112    # Not in mixed or Windows style, start by that.
13113    new_path=`cmd //c echo $path`
13114  fi
13115
13116
13117  input_path="$new_path"
13118  # Check if we need to convert this using DOS-style short mode. If the path
13119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13120  # take no chances and rewrite it.
13121  # Note: m4 eats our [], so we need to use [ and ] instead.
13122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13123  if test "x$has_forbidden_chars" != x; then
13124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13126  fi
13127
13128
13129  windows_path="$new_path"
13130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13131    unix_path=`$CYGPATH -u "$windows_path"`
13132    new_path="$unix_path"
13133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13135    new_path="$unix_path"
13136  fi
13137
13138  if test "x$path" != "x$new_path"; then
13139    BOOT_JDK="$new_path"
13140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13142  fi
13143
13144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13146
13147  else
13148    # We're on a posix platform. Hooray! :)
13149    path="$BOOT_JDK"
13150
13151    if test ! -f "$path" && test ! -d "$path"; then
13152      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13153    fi
13154
13155    has_space=`$ECHO "$path" | $GREP " "`
13156    if test "x$has_space" != x; then
13157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13159      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13160    fi
13161  fi
13162
13163              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13164$as_echo_n "checking for Boot JDK... " >&6; }
13165              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13166$as_echo "$BOOT_JDK" >&6; }
13167              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13168$as_echo_n "checking Boot JDK version... " >&6; }
13169              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13170              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13171$as_echo "$BOOT_JDK_VERSION" >&6; }
13172            fi # end check jdk version
13173          fi # end check rt.jar
13174        fi # end check javac
13175      fi # end check java
13176    fi # end check boot jdk found
13177  fi
13178
13179    done
13180  fi
13181
13182  fi
13183
13184
13185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13187      # Do we have a bin/java?
13188      if test ! -x "$BOOT_JDK/bin/java"; then
13189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13191        BOOT_JDK_FOUND=no
13192      else
13193        # Do we have a bin/javac?
13194        if test ! -x "$BOOT_JDK/bin/javac"; then
13195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13199          BOOT_JDK_FOUND=no
13200        else
13201          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13202          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13205            BOOT_JDK_FOUND=no
13206          else
13207            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13208            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13209
13210            # Extra M4 quote needed to protect [] in grep expression.
13211            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13212            if test "x$FOUND_VERSION_78" = x; then
13213              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13215              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13216$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13217              BOOT_JDK_FOUND=no
13218            else
13219              # We're done! :-)
13220              BOOT_JDK_FOUND=yes
13221
13222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13223
13224  # Input might be given as Windows format, start by converting to
13225  # unix format.
13226  path="$BOOT_JDK"
13227  new_path=`$CYGPATH -u "$path"`
13228
13229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13232  # "foo.exe" is OK but "foo" is an error.
13233  #
13234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13235  # It is also a way to make sure we got the proper file name for the real test later on.
13236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13237  if test "x$test_shortpath" = x; then
13238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13240    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13241  fi
13242
13243  # Call helper function which possibly converts this using DOS-style short mode.
13244  # If so, the updated path is stored in $new_path.
13245
13246  input_path="$new_path"
13247  # Check if we need to convert this using DOS-style short mode. If the path
13248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13249  # take no chances and rewrite it.
13250  # Note: m4 eats our [], so we need to use [ and ] instead.
13251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13252  if test "x$has_forbidden_chars" != x; then
13253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13257      # Going to short mode and back again did indeed matter. Since short mode is
13258      # case insensitive, let's make it lowercase to improve readability.
13259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13260      # Now convert it back to Unix-stile (cygpath)
13261      input_path=`$CYGPATH -u "$shortmode_path"`
13262      new_path="$input_path"
13263    fi
13264  fi
13265
13266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13267  if test "x$test_cygdrive_prefix" = x; then
13268    # As a simple fix, exclude /usr/bin since it's not a real path.
13269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13271      # a path prefixed by /cygdrive for fixpath to work.
13272      new_path="$CYGWIN_ROOT_PATH$input_path"
13273    fi
13274  fi
13275
13276
13277  if test "x$path" != "x$new_path"; then
13278    BOOT_JDK="$new_path"
13279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13281  fi
13282
13283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13284
13285  path="$BOOT_JDK"
13286  has_colon=`$ECHO $path | $GREP ^.:`
13287  new_path="$path"
13288  if test "x$has_colon" = x; then
13289    # Not in mixed or Windows style, start by that.
13290    new_path=`cmd //c echo $path`
13291  fi
13292
13293
13294  input_path="$new_path"
13295  # Check if we need to convert this using DOS-style short mode. If the path
13296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13297  # take no chances and rewrite it.
13298  # Note: m4 eats our [], so we need to use [ and ] instead.
13299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13300  if test "x$has_forbidden_chars" != x; then
13301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13303  fi
13304
13305
13306  windows_path="$new_path"
13307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13308    unix_path=`$CYGPATH -u "$windows_path"`
13309    new_path="$unix_path"
13310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13312    new_path="$unix_path"
13313  fi
13314
13315  if test "x$path" != "x$new_path"; then
13316    BOOT_JDK="$new_path"
13317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13319  fi
13320
13321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13323
13324  else
13325    # We're on a posix platform. Hooray! :)
13326    path="$BOOT_JDK"
13327
13328    if test ! -f "$path" && test ! -d "$path"; then
13329      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13330    fi
13331
13332    has_space=`$ECHO "$path" | $GREP " "`
13333    if test "x$has_space" != x; then
13334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13336      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13337    fi
13338  fi
13339
13340              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13341$as_echo_n "checking for Boot JDK... " >&6; }
13342              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13343$as_echo "$BOOT_JDK" >&6; }
13344              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13345$as_echo_n "checking Boot JDK version... " >&6; }
13346              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13347              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13348$as_echo "$BOOT_JDK_VERSION" >&6; }
13349            fi # end check jdk version
13350          fi # end check rt.jar
13351        fi # end check javac
13352      fi # end check java
13353    fi # end check boot jdk found
13354  fi
13355
13356
13357  if test "x$BOOT_JDK_FOUND" = xno; then
13358    # Now execute the test
13359
13360  if test "x$ProgramFiles" != x; then
13361    VIRTUAL_DIR="$ProgramFiles/Java"
13362
13363  windows_path="$VIRTUAL_DIR"
13364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13365    unix_path=`$CYGPATH -u "$windows_path"`
13366    VIRTUAL_DIR="$unix_path"
13367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13369    VIRTUAL_DIR="$unix_path"
13370  fi
13371
13372
13373  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13374  BOOT_JDK_SUFFIX=""
13375  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13376  if test "x$ALL_JDKS_FOUND" != x; then
13377    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13378
13379  if test "x$BOOT_JDK_FOUND" = xno; then
13380    # Now execute the test
13381
13382        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13383        if test -d "$BOOT_JDK"; then
13384          BOOT_JDK_FOUND=maybe
13385          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13386$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13387        fi
13388
13389
13390    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13391    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13392      # Do we have a bin/java?
13393      if test ! -x "$BOOT_JDK/bin/java"; then
13394        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13396        BOOT_JDK_FOUND=no
13397      else
13398        # Do we have a bin/javac?
13399        if test ! -x "$BOOT_JDK/bin/javac"; then
13400          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13402          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13403$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13404          BOOT_JDK_FOUND=no
13405        else
13406          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13407          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13408            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13410            BOOT_JDK_FOUND=no
13411          else
13412            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13413            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13414
13415            # Extra M4 quote needed to protect [] in grep expression.
13416            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13417            if test "x$FOUND_VERSION_78" = x; then
13418              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13419$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13420              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13421$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13422              BOOT_JDK_FOUND=no
13423            else
13424              # We're done! :-)
13425              BOOT_JDK_FOUND=yes
13426
13427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13428
13429  # Input might be given as Windows format, start by converting to
13430  # unix format.
13431  path="$BOOT_JDK"
13432  new_path=`$CYGPATH -u "$path"`
13433
13434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13437  # "foo.exe" is OK but "foo" is an error.
13438  #
13439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13440  # It is also a way to make sure we got the proper file name for the real test later on.
13441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13442  if test "x$test_shortpath" = x; then
13443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13444$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13445    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13446  fi
13447
13448  # Call helper function which possibly converts this using DOS-style short mode.
13449  # If so, the updated path is stored in $new_path.
13450
13451  input_path="$new_path"
13452  # Check if we need to convert this using DOS-style short mode. If the path
13453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13454  # take no chances and rewrite it.
13455  # Note: m4 eats our [], so we need to use [ and ] instead.
13456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13457  if test "x$has_forbidden_chars" != x; then
13458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13462      # Going to short mode and back again did indeed matter. Since short mode is
13463      # case insensitive, let's make it lowercase to improve readability.
13464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13465      # Now convert it back to Unix-stile (cygpath)
13466      input_path=`$CYGPATH -u "$shortmode_path"`
13467      new_path="$input_path"
13468    fi
13469  fi
13470
13471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13472  if test "x$test_cygdrive_prefix" = x; then
13473    # As a simple fix, exclude /usr/bin since it's not a real path.
13474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13476      # a path prefixed by /cygdrive for fixpath to work.
13477      new_path="$CYGWIN_ROOT_PATH$input_path"
13478    fi
13479  fi
13480
13481
13482  if test "x$path" != "x$new_path"; then
13483    BOOT_JDK="$new_path"
13484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13485$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13486  fi
13487
13488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13489
13490  path="$BOOT_JDK"
13491  has_colon=`$ECHO $path | $GREP ^.:`
13492  new_path="$path"
13493  if test "x$has_colon" = x; then
13494    # Not in mixed or Windows style, start by that.
13495    new_path=`cmd //c echo $path`
13496  fi
13497
13498
13499  input_path="$new_path"
13500  # Check if we need to convert this using DOS-style short mode. If the path
13501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13502  # take no chances and rewrite it.
13503  # Note: m4 eats our [], so we need to use [ and ] instead.
13504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13505  if test "x$has_forbidden_chars" != x; then
13506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13508  fi
13509
13510
13511  windows_path="$new_path"
13512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13513    unix_path=`$CYGPATH -u "$windows_path"`
13514    new_path="$unix_path"
13515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13517    new_path="$unix_path"
13518  fi
13519
13520  if test "x$path" != "x$new_path"; then
13521    BOOT_JDK="$new_path"
13522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13523$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13524  fi
13525
13526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13528
13529  else
13530    # We're on a posix platform. Hooray! :)
13531    path="$BOOT_JDK"
13532
13533    if test ! -f "$path" && test ! -d "$path"; then
13534      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13535    fi
13536
13537    has_space=`$ECHO "$path" | $GREP " "`
13538    if test "x$has_space" != x; then
13539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13541      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13542    fi
13543  fi
13544
13545              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13546$as_echo_n "checking for Boot JDK... " >&6; }
13547              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13548$as_echo "$BOOT_JDK" >&6; }
13549              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13550$as_echo_n "checking Boot JDK version... " >&6; }
13551              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13552              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13553$as_echo "$BOOT_JDK_VERSION" >&6; }
13554            fi # end check jdk version
13555          fi # end check rt.jar
13556        fi # end check javac
13557      fi # end check java
13558    fi # end check boot jdk found
13559  fi
13560
13561    done
13562  fi
13563
13564  fi
13565
13566
13567    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13568    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13569      # Do we have a bin/java?
13570      if test ! -x "$BOOT_JDK/bin/java"; then
13571        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13573        BOOT_JDK_FOUND=no
13574      else
13575        # Do we have a bin/javac?
13576        if test ! -x "$BOOT_JDK/bin/javac"; then
13577          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13579          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13580$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13581          BOOT_JDK_FOUND=no
13582        else
13583          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13584          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13585            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13587            BOOT_JDK_FOUND=no
13588          else
13589            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13590            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13591
13592            # Extra M4 quote needed to protect [] in grep expression.
13593            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13594            if test "x$FOUND_VERSION_78" = x; then
13595              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13597              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13598$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13599              BOOT_JDK_FOUND=no
13600            else
13601              # We're done! :-)
13602              BOOT_JDK_FOUND=yes
13603
13604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13605
13606  # Input might be given as Windows format, start by converting to
13607  # unix format.
13608  path="$BOOT_JDK"
13609  new_path=`$CYGPATH -u "$path"`
13610
13611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13614  # "foo.exe" is OK but "foo" is an error.
13615  #
13616  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13617  # It is also a way to make sure we got the proper file name for the real test later on.
13618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13619  if test "x$test_shortpath" = x; then
13620    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13621$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13622    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13623  fi
13624
13625  # Call helper function which possibly converts this using DOS-style short mode.
13626  # If so, the updated path is stored in $new_path.
13627
13628  input_path="$new_path"
13629  # Check if we need to convert this using DOS-style short mode. If the path
13630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13631  # take no chances and rewrite it.
13632  # Note: m4 eats our [], so we need to use [ and ] instead.
13633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13634  if test "x$has_forbidden_chars" != x; then
13635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13639      # Going to short mode and back again did indeed matter. Since short mode is
13640      # case insensitive, let's make it lowercase to improve readability.
13641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13642      # Now convert it back to Unix-stile (cygpath)
13643      input_path=`$CYGPATH -u "$shortmode_path"`
13644      new_path="$input_path"
13645    fi
13646  fi
13647
13648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13649  if test "x$test_cygdrive_prefix" = x; then
13650    # As a simple fix, exclude /usr/bin since it's not a real path.
13651    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13653      # a path prefixed by /cygdrive for fixpath to work.
13654      new_path="$CYGWIN_ROOT_PATH$input_path"
13655    fi
13656  fi
13657
13658
13659  if test "x$path" != "x$new_path"; then
13660    BOOT_JDK="$new_path"
13661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13662$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13663  fi
13664
13665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13666
13667  path="$BOOT_JDK"
13668  has_colon=`$ECHO $path | $GREP ^.:`
13669  new_path="$path"
13670  if test "x$has_colon" = x; then
13671    # Not in mixed or Windows style, start by that.
13672    new_path=`cmd //c echo $path`
13673  fi
13674
13675
13676  input_path="$new_path"
13677  # Check if we need to convert this using DOS-style short mode. If the path
13678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13679  # take no chances and rewrite it.
13680  # Note: m4 eats our [], so we need to use [ and ] instead.
13681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13682  if test "x$has_forbidden_chars" != x; then
13683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13685  fi
13686
13687
13688  windows_path="$new_path"
13689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13690    unix_path=`$CYGPATH -u "$windows_path"`
13691    new_path="$unix_path"
13692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13694    new_path="$unix_path"
13695  fi
13696
13697  if test "x$path" != "x$new_path"; then
13698    BOOT_JDK="$new_path"
13699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13700$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13701  fi
13702
13703  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13704  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13705
13706  else
13707    # We're on a posix platform. Hooray! :)
13708    path="$BOOT_JDK"
13709
13710    if test ! -f "$path" && test ! -d "$path"; then
13711      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13712    fi
13713
13714    has_space=`$ECHO "$path" | $GREP " "`
13715    if test "x$has_space" != x; then
13716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13718      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13719    fi
13720  fi
13721
13722              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13723$as_echo_n "checking for Boot JDK... " >&6; }
13724              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13725$as_echo "$BOOT_JDK" >&6; }
13726              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13727$as_echo_n "checking Boot JDK version... " >&6; }
13728              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13729              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13730$as_echo "$BOOT_JDK_VERSION" >&6; }
13731            fi # end check jdk version
13732          fi # end check rt.jar
13733        fi # end check javac
13734      fi # end check java
13735    fi # end check boot jdk found
13736  fi
13737
13738
13739  if test "x$BOOT_JDK_FOUND" = xno; then
13740    # Now execute the test
13741
13742  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13743  BOOT_JDK_SUFFIX=""
13744  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13745  if test "x$ALL_JDKS_FOUND" != x; then
13746    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13747
13748  if test "x$BOOT_JDK_FOUND" = xno; then
13749    # Now execute the test
13750
13751        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13752        if test -d "$BOOT_JDK"; then
13753          BOOT_JDK_FOUND=maybe
13754          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13755$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13756        fi
13757
13758
13759    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13760    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13761      # Do we have a bin/java?
13762      if test ! -x "$BOOT_JDK/bin/java"; then
13763        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13765        BOOT_JDK_FOUND=no
13766      else
13767        # Do we have a bin/javac?
13768        if test ! -x "$BOOT_JDK/bin/javac"; then
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13772$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13773          BOOT_JDK_FOUND=no
13774        else
13775          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13776          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13779            BOOT_JDK_FOUND=no
13780          else
13781            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13782            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13783
13784            # Extra M4 quote needed to protect [] in grep expression.
13785            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13786            if test "x$FOUND_VERSION_78" = x; then
13787              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13789              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13790$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13791              BOOT_JDK_FOUND=no
13792            else
13793              # We're done! :-)
13794              BOOT_JDK_FOUND=yes
13795
13796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13797
13798  # Input might be given as Windows format, start by converting to
13799  # unix format.
13800  path="$BOOT_JDK"
13801  new_path=`$CYGPATH -u "$path"`
13802
13803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13806  # "foo.exe" is OK but "foo" is an error.
13807  #
13808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13809  # It is also a way to make sure we got the proper file name for the real test later on.
13810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13811  if test "x$test_shortpath" = x; then
13812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13813$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13814    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13815  fi
13816
13817  # Call helper function which possibly converts this using DOS-style short mode.
13818  # If so, the updated path is stored in $new_path.
13819
13820  input_path="$new_path"
13821  # Check if we need to convert this using DOS-style short mode. If the path
13822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13823  # take no chances and rewrite it.
13824  # Note: m4 eats our [], so we need to use [ and ] instead.
13825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13826  if test "x$has_forbidden_chars" != x; then
13827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13831      # Going to short mode and back again did indeed matter. Since short mode is
13832      # case insensitive, let's make it lowercase to improve readability.
13833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13834      # Now convert it back to Unix-stile (cygpath)
13835      input_path=`$CYGPATH -u "$shortmode_path"`
13836      new_path="$input_path"
13837    fi
13838  fi
13839
13840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13841  if test "x$test_cygdrive_prefix" = x; then
13842    # As a simple fix, exclude /usr/bin since it's not a real path.
13843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13845      # a path prefixed by /cygdrive for fixpath to work.
13846      new_path="$CYGWIN_ROOT_PATH$input_path"
13847    fi
13848  fi
13849
13850
13851  if test "x$path" != "x$new_path"; then
13852    BOOT_JDK="$new_path"
13853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13855  fi
13856
13857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13858
13859  path="$BOOT_JDK"
13860  has_colon=`$ECHO $path | $GREP ^.:`
13861  new_path="$path"
13862  if test "x$has_colon" = x; then
13863    # Not in mixed or Windows style, start by that.
13864    new_path=`cmd //c echo $path`
13865  fi
13866
13867
13868  input_path="$new_path"
13869  # Check if we need to convert this using DOS-style short mode. If the path
13870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13871  # take no chances and rewrite it.
13872  # Note: m4 eats our [], so we need to use [ and ] instead.
13873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13874  if test "x$has_forbidden_chars" != x; then
13875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13877  fi
13878
13879
13880  windows_path="$new_path"
13881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13882    unix_path=`$CYGPATH -u "$windows_path"`
13883    new_path="$unix_path"
13884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13886    new_path="$unix_path"
13887  fi
13888
13889  if test "x$path" != "x$new_path"; then
13890    BOOT_JDK="$new_path"
13891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13893  fi
13894
13895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13897
13898  else
13899    # We're on a posix platform. Hooray! :)
13900    path="$BOOT_JDK"
13901
13902    if test ! -f "$path" && test ! -d "$path"; then
13903      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13904    fi
13905
13906    has_space=`$ECHO "$path" | $GREP " "`
13907    if test "x$has_space" != x; then
13908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13910      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13911    fi
13912  fi
13913
13914              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13915$as_echo_n "checking for Boot JDK... " >&6; }
13916              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13917$as_echo "$BOOT_JDK" >&6; }
13918              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13919$as_echo_n "checking Boot JDK version... " >&6; }
13920              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13921              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13922$as_echo "$BOOT_JDK_VERSION" >&6; }
13923            fi # end check jdk version
13924          fi # end check rt.jar
13925        fi # end check javac
13926      fi # end check java
13927    fi # end check boot jdk found
13928  fi
13929
13930    done
13931  fi
13932
13933
13934    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13935    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13936      # Do we have a bin/java?
13937      if test ! -x "$BOOT_JDK/bin/java"; then
13938        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13940        BOOT_JDK_FOUND=no
13941      else
13942        # Do we have a bin/javac?
13943        if test ! -x "$BOOT_JDK/bin/javac"; then
13944          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13946          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13947$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13948          BOOT_JDK_FOUND=no
13949        else
13950          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13951          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13952            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13954            BOOT_JDK_FOUND=no
13955          else
13956            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13957            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13958
13959            # Extra M4 quote needed to protect [] in grep expression.
13960            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13961            if test "x$FOUND_VERSION_78" = x; then
13962              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13964              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13965$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13966              BOOT_JDK_FOUND=no
13967            else
13968              # We're done! :-)
13969              BOOT_JDK_FOUND=yes
13970
13971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13972
13973  # Input might be given as Windows format, start by converting to
13974  # unix format.
13975  path="$BOOT_JDK"
13976  new_path=`$CYGPATH -u "$path"`
13977
13978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13981  # "foo.exe" is OK but "foo" is an error.
13982  #
13983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13984  # It is also a way to make sure we got the proper file name for the real test later on.
13985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13986  if test "x$test_shortpath" = x; then
13987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13988$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13989    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13990  fi
13991
13992  # Call helper function which possibly converts this using DOS-style short mode.
13993  # If so, the updated path is stored in $new_path.
13994
13995  input_path="$new_path"
13996  # Check if we need to convert this using DOS-style short mode. If the path
13997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13998  # take no chances and rewrite it.
13999  # Note: m4 eats our [], so we need to use [ and ] instead.
14000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14001  if test "x$has_forbidden_chars" != x; then
14002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14006      # Going to short mode and back again did indeed matter. Since short mode is
14007      # case insensitive, let's make it lowercase to improve readability.
14008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14009      # Now convert it back to Unix-stile (cygpath)
14010      input_path=`$CYGPATH -u "$shortmode_path"`
14011      new_path="$input_path"
14012    fi
14013  fi
14014
14015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14016  if test "x$test_cygdrive_prefix" = x; then
14017    # As a simple fix, exclude /usr/bin since it's not a real path.
14018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14020      # a path prefixed by /cygdrive for fixpath to work.
14021      new_path="$CYGWIN_ROOT_PATH$input_path"
14022    fi
14023  fi
14024
14025
14026  if test "x$path" != "x$new_path"; then
14027    BOOT_JDK="$new_path"
14028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14029$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14030  fi
14031
14032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14033
14034  path="$BOOT_JDK"
14035  has_colon=`$ECHO $path | $GREP ^.:`
14036  new_path="$path"
14037  if test "x$has_colon" = x; then
14038    # Not in mixed or Windows style, start by that.
14039    new_path=`cmd //c echo $path`
14040  fi
14041
14042
14043  input_path="$new_path"
14044  # Check if we need to convert this using DOS-style short mode. If the path
14045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14046  # take no chances and rewrite it.
14047  # Note: m4 eats our [], so we need to use [ and ] instead.
14048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14049  if test "x$has_forbidden_chars" != x; then
14050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14052  fi
14053
14054
14055  windows_path="$new_path"
14056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14057    unix_path=`$CYGPATH -u "$windows_path"`
14058    new_path="$unix_path"
14059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14061    new_path="$unix_path"
14062  fi
14063
14064  if test "x$path" != "x$new_path"; then
14065    BOOT_JDK="$new_path"
14066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14068  fi
14069
14070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14072
14073  else
14074    # We're on a posix platform. Hooray! :)
14075    path="$BOOT_JDK"
14076
14077    if test ! -f "$path" && test ! -d "$path"; then
14078      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14079    fi
14080
14081    has_space=`$ECHO "$path" | $GREP " "`
14082    if test "x$has_space" != x; then
14083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14085      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14086    fi
14087  fi
14088
14089              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14090$as_echo_n "checking for Boot JDK... " >&6; }
14091              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14092$as_echo "$BOOT_JDK" >&6; }
14093              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14094$as_echo_n "checking Boot JDK version... " >&6; }
14095              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14096              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14097$as_echo "$BOOT_JDK_VERSION" >&6; }
14098            fi # end check jdk version
14099          fi # end check rt.jar
14100        fi # end check javac
14101      fi # end check java
14102    fi # end check boot jdk found
14103  fi
14104
14105  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14106
14107  if test "x$BOOT_JDK_FOUND" = xno; then
14108    # Now execute the test
14109
14110  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14111  BOOT_JDK_SUFFIX="/Contents/Home"
14112  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14113  if test "x$ALL_JDKS_FOUND" != x; then
14114    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14115
14116  if test "x$BOOT_JDK_FOUND" = xno; then
14117    # Now execute the test
14118
14119        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14120        if test -d "$BOOT_JDK"; then
14121          BOOT_JDK_FOUND=maybe
14122          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14123$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14124        fi
14125
14126
14127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14129      # Do we have a bin/java?
14130      if test ! -x "$BOOT_JDK/bin/java"; then
14131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14133        BOOT_JDK_FOUND=no
14134      else
14135        # Do we have a bin/javac?
14136        if test ! -x "$BOOT_JDK/bin/javac"; then
14137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14141          BOOT_JDK_FOUND=no
14142        else
14143          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14144          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14147            BOOT_JDK_FOUND=no
14148          else
14149            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14151
14152            # Extra M4 quote needed to protect [] in grep expression.
14153            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14154            if test "x$FOUND_VERSION_78" = x; then
14155              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14157              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14158$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14159              BOOT_JDK_FOUND=no
14160            else
14161              # We're done! :-)
14162              BOOT_JDK_FOUND=yes
14163
14164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14165
14166  # Input might be given as Windows format, start by converting to
14167  # unix format.
14168  path="$BOOT_JDK"
14169  new_path=`$CYGPATH -u "$path"`
14170
14171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14174  # "foo.exe" is OK but "foo" is an error.
14175  #
14176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14177  # It is also a way to make sure we got the proper file name for the real test later on.
14178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14179  if test "x$test_shortpath" = x; then
14180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14183  fi
14184
14185  # Call helper function which possibly converts this using DOS-style short mode.
14186  # If so, the updated path is stored in $new_path.
14187
14188  input_path="$new_path"
14189  # Check if we need to convert this using DOS-style short mode. If the path
14190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14191  # take no chances and rewrite it.
14192  # Note: m4 eats our [], so we need to use [ and ] instead.
14193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14194  if test "x$has_forbidden_chars" != x; then
14195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14199      # Going to short mode and back again did indeed matter. Since short mode is
14200      # case insensitive, let's make it lowercase to improve readability.
14201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14202      # Now convert it back to Unix-stile (cygpath)
14203      input_path=`$CYGPATH -u "$shortmode_path"`
14204      new_path="$input_path"
14205    fi
14206  fi
14207
14208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14209  if test "x$test_cygdrive_prefix" = x; then
14210    # As a simple fix, exclude /usr/bin since it's not a real path.
14211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14213      # a path prefixed by /cygdrive for fixpath to work.
14214      new_path="$CYGWIN_ROOT_PATH$input_path"
14215    fi
14216  fi
14217
14218
14219  if test "x$path" != "x$new_path"; then
14220    BOOT_JDK="$new_path"
14221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14223  fi
14224
14225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14226
14227  path="$BOOT_JDK"
14228  has_colon=`$ECHO $path | $GREP ^.:`
14229  new_path="$path"
14230  if test "x$has_colon" = x; then
14231    # Not in mixed or Windows style, start by that.
14232    new_path=`cmd //c echo $path`
14233  fi
14234
14235
14236  input_path="$new_path"
14237  # Check if we need to convert this using DOS-style short mode. If the path
14238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14239  # take no chances and rewrite it.
14240  # Note: m4 eats our [], so we need to use [ and ] instead.
14241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14242  if test "x$has_forbidden_chars" != x; then
14243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14245  fi
14246
14247
14248  windows_path="$new_path"
14249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14250    unix_path=`$CYGPATH -u "$windows_path"`
14251    new_path="$unix_path"
14252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14254    new_path="$unix_path"
14255  fi
14256
14257  if test "x$path" != "x$new_path"; then
14258    BOOT_JDK="$new_path"
14259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14261  fi
14262
14263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14265
14266  else
14267    # We're on a posix platform. Hooray! :)
14268    path="$BOOT_JDK"
14269
14270    if test ! -f "$path" && test ! -d "$path"; then
14271      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14272    fi
14273
14274    has_space=`$ECHO "$path" | $GREP " "`
14275    if test "x$has_space" != x; then
14276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14278      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14279    fi
14280  fi
14281
14282              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14283$as_echo_n "checking for Boot JDK... " >&6; }
14284              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14285$as_echo "$BOOT_JDK" >&6; }
14286              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14287$as_echo_n "checking Boot JDK version... " >&6; }
14288              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14289              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14290$as_echo "$BOOT_JDK_VERSION" >&6; }
14291            fi # end check jdk version
14292          fi # end check rt.jar
14293        fi # end check javac
14294      fi # end check java
14295    fi # end check boot jdk found
14296  fi
14297
14298    done
14299  fi
14300
14301
14302    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14303    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14304      # Do we have a bin/java?
14305      if test ! -x "$BOOT_JDK/bin/java"; then
14306        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14308        BOOT_JDK_FOUND=no
14309      else
14310        # Do we have a bin/javac?
14311        if test ! -x "$BOOT_JDK/bin/javac"; then
14312          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14314          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14315$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14316          BOOT_JDK_FOUND=no
14317        else
14318          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14319          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14320            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14322            BOOT_JDK_FOUND=no
14323          else
14324            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14326
14327            # Extra M4 quote needed to protect [] in grep expression.
14328            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14329            if test "x$FOUND_VERSION_78" = x; then
14330              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14332              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14333$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14334              BOOT_JDK_FOUND=no
14335            else
14336              # We're done! :-)
14337              BOOT_JDK_FOUND=yes
14338
14339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14340
14341  # Input might be given as Windows format, start by converting to
14342  # unix format.
14343  path="$BOOT_JDK"
14344  new_path=`$CYGPATH -u "$path"`
14345
14346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14349  # "foo.exe" is OK but "foo" is an error.
14350  #
14351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14352  # It is also a way to make sure we got the proper file name for the real test later on.
14353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14354  if test "x$test_shortpath" = x; then
14355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14358  fi
14359
14360  # Call helper function which possibly converts this using DOS-style short mode.
14361  # If so, the updated path is stored in $new_path.
14362
14363  input_path="$new_path"
14364  # Check if we need to convert this using DOS-style short mode. If the path
14365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14366  # take no chances and rewrite it.
14367  # Note: m4 eats our [], so we need to use [ and ] instead.
14368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14369  if test "x$has_forbidden_chars" != x; then
14370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14374      # Going to short mode and back again did indeed matter. Since short mode is
14375      # case insensitive, let's make it lowercase to improve readability.
14376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14377      # Now convert it back to Unix-stile (cygpath)
14378      input_path=`$CYGPATH -u "$shortmode_path"`
14379      new_path="$input_path"
14380    fi
14381  fi
14382
14383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14384  if test "x$test_cygdrive_prefix" = x; then
14385    # As a simple fix, exclude /usr/bin since it's not a real path.
14386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14388      # a path prefixed by /cygdrive for fixpath to work.
14389      new_path="$CYGWIN_ROOT_PATH$input_path"
14390    fi
14391  fi
14392
14393
14394  if test "x$path" != "x$new_path"; then
14395    BOOT_JDK="$new_path"
14396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14398  fi
14399
14400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14401
14402  path="$BOOT_JDK"
14403  has_colon=`$ECHO $path | $GREP ^.:`
14404  new_path="$path"
14405  if test "x$has_colon" = x; then
14406    # Not in mixed or Windows style, start by that.
14407    new_path=`cmd //c echo $path`
14408  fi
14409
14410
14411  input_path="$new_path"
14412  # Check if we need to convert this using DOS-style short mode. If the path
14413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14414  # take no chances and rewrite it.
14415  # Note: m4 eats our [], so we need to use [ and ] instead.
14416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14417  if test "x$has_forbidden_chars" != x; then
14418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14420  fi
14421
14422
14423  windows_path="$new_path"
14424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14425    unix_path=`$CYGPATH -u "$windows_path"`
14426    new_path="$unix_path"
14427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14429    new_path="$unix_path"
14430  fi
14431
14432  if test "x$path" != "x$new_path"; then
14433    BOOT_JDK="$new_path"
14434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14436  fi
14437
14438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14440
14441  else
14442    # We're on a posix platform. Hooray! :)
14443    path="$BOOT_JDK"
14444
14445    if test ! -f "$path" && test ! -d "$path"; then
14446      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14447    fi
14448
14449    has_space=`$ECHO "$path" | $GREP " "`
14450    if test "x$has_space" != x; then
14451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14453      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14454    fi
14455  fi
14456
14457              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14458$as_echo_n "checking for Boot JDK... " >&6; }
14459              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14460$as_echo "$BOOT_JDK" >&6; }
14461              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14462$as_echo_n "checking Boot JDK version... " >&6; }
14463              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14464              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14465$as_echo "$BOOT_JDK_VERSION" >&6; }
14466            fi # end check jdk version
14467          fi # end check rt.jar
14468        fi # end check javac
14469      fi # end check java
14470    fi # end check boot jdk found
14471  fi
14472
14473
14474  if test "x$BOOT_JDK_FOUND" = xno; then
14475    # Now execute the test
14476
14477  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14478  BOOT_JDK_SUFFIX="/Contents/Home"
14479  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14480  if test "x$ALL_JDKS_FOUND" != x; then
14481    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14482
14483  if test "x$BOOT_JDK_FOUND" = xno; then
14484    # Now execute the test
14485
14486        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14487        if test -d "$BOOT_JDK"; then
14488          BOOT_JDK_FOUND=maybe
14489          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14490$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14491        fi
14492
14493
14494    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14495    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14496      # Do we have a bin/java?
14497      if test ! -x "$BOOT_JDK/bin/java"; then
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14500        BOOT_JDK_FOUND=no
14501      else
14502        # Do we have a bin/javac?
14503        if test ! -x "$BOOT_JDK/bin/javac"; then
14504          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14506          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14507$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14508          BOOT_JDK_FOUND=no
14509        else
14510          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14511          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14512            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14514            BOOT_JDK_FOUND=no
14515          else
14516            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14517            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14518
14519            # Extra M4 quote needed to protect [] in grep expression.
14520            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14521            if test "x$FOUND_VERSION_78" = x; then
14522              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14524              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14525$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14526              BOOT_JDK_FOUND=no
14527            else
14528              # We're done! :-)
14529              BOOT_JDK_FOUND=yes
14530
14531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14532
14533  # Input might be given as Windows format, start by converting to
14534  # unix format.
14535  path="$BOOT_JDK"
14536  new_path=`$CYGPATH -u "$path"`
14537
14538  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14539  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14540  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14541  # "foo.exe" is OK but "foo" is an error.
14542  #
14543  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14544  # It is also a way to make sure we got the proper file name for the real test later on.
14545  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14546  if test "x$test_shortpath" = x; then
14547    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14549    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14550  fi
14551
14552  # Call helper function which possibly converts this using DOS-style short mode.
14553  # If so, the updated path is stored in $new_path.
14554
14555  input_path="$new_path"
14556  # Check if we need to convert this using DOS-style short mode. If the path
14557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14558  # take no chances and rewrite it.
14559  # Note: m4 eats our [], so we need to use [ and ] instead.
14560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14561  if test "x$has_forbidden_chars" != x; then
14562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14566      # Going to short mode and back again did indeed matter. Since short mode is
14567      # case insensitive, let's make it lowercase to improve readability.
14568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14569      # Now convert it back to Unix-stile (cygpath)
14570      input_path=`$CYGPATH -u "$shortmode_path"`
14571      new_path="$input_path"
14572    fi
14573  fi
14574
14575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14576  if test "x$test_cygdrive_prefix" = x; then
14577    # As a simple fix, exclude /usr/bin since it's not a real path.
14578    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14580      # a path prefixed by /cygdrive for fixpath to work.
14581      new_path="$CYGWIN_ROOT_PATH$input_path"
14582    fi
14583  fi
14584
14585
14586  if test "x$path" != "x$new_path"; then
14587    BOOT_JDK="$new_path"
14588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14589$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14590  fi
14591
14592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14593
14594  path="$BOOT_JDK"
14595  has_colon=`$ECHO $path | $GREP ^.:`
14596  new_path="$path"
14597  if test "x$has_colon" = x; then
14598    # Not in mixed or Windows style, start by that.
14599    new_path=`cmd //c echo $path`
14600  fi
14601
14602
14603  input_path="$new_path"
14604  # Check if we need to convert this using DOS-style short mode. If the path
14605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14606  # take no chances and rewrite it.
14607  # Note: m4 eats our [], so we need to use [ and ] instead.
14608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14609  if test "x$has_forbidden_chars" != x; then
14610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14612  fi
14613
14614
14615  windows_path="$new_path"
14616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14617    unix_path=`$CYGPATH -u "$windows_path"`
14618    new_path="$unix_path"
14619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14621    new_path="$unix_path"
14622  fi
14623
14624  if test "x$path" != "x$new_path"; then
14625    BOOT_JDK="$new_path"
14626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14627$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14628  fi
14629
14630  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14631  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14632
14633  else
14634    # We're on a posix platform. Hooray! :)
14635    path="$BOOT_JDK"
14636
14637    if test ! -f "$path" && test ! -d "$path"; then
14638      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14639    fi
14640
14641    has_space=`$ECHO "$path" | $GREP " "`
14642    if test "x$has_space" != x; then
14643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14645      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14646    fi
14647  fi
14648
14649              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14650$as_echo_n "checking for Boot JDK... " >&6; }
14651              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14652$as_echo "$BOOT_JDK" >&6; }
14653              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14654$as_echo_n "checking Boot JDK version... " >&6; }
14655              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14656              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14657$as_echo "$BOOT_JDK_VERSION" >&6; }
14658            fi # end check jdk version
14659          fi # end check rt.jar
14660        fi # end check javac
14661      fi # end check java
14662    fi # end check boot jdk found
14663  fi
14664
14665    done
14666  fi
14667
14668
14669    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14670    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14671      # Do we have a bin/java?
14672      if test ! -x "$BOOT_JDK/bin/java"; then
14673        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14675        BOOT_JDK_FOUND=no
14676      else
14677        # Do we have a bin/javac?
14678        if test ! -x "$BOOT_JDK/bin/javac"; then
14679          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14681          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14682$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14683          BOOT_JDK_FOUND=no
14684        else
14685          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14686          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14687            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14689            BOOT_JDK_FOUND=no
14690          else
14691            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14693
14694            # Extra M4 quote needed to protect [] in grep expression.
14695            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14696            if test "x$FOUND_VERSION_78" = x; then
14697              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14699              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14700$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14701              BOOT_JDK_FOUND=no
14702            else
14703              # We're done! :-)
14704              BOOT_JDK_FOUND=yes
14705
14706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14707
14708  # Input might be given as Windows format, start by converting to
14709  # unix format.
14710  path="$BOOT_JDK"
14711  new_path=`$CYGPATH -u "$path"`
14712
14713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14716  # "foo.exe" is OK but "foo" is an error.
14717  #
14718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14719  # It is also a way to make sure we got the proper file name for the real test later on.
14720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14721  if test "x$test_shortpath" = x; then
14722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14724    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14725  fi
14726
14727  # Call helper function which possibly converts this using DOS-style short mode.
14728  # If so, the updated path is stored in $new_path.
14729
14730  input_path="$new_path"
14731  # Check if we need to convert this using DOS-style short mode. If the path
14732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14733  # take no chances and rewrite it.
14734  # Note: m4 eats our [], so we need to use [ and ] instead.
14735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14736  if test "x$has_forbidden_chars" != x; then
14737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14741      # Going to short mode and back again did indeed matter. Since short mode is
14742      # case insensitive, let's make it lowercase to improve readability.
14743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14744      # Now convert it back to Unix-stile (cygpath)
14745      input_path=`$CYGPATH -u "$shortmode_path"`
14746      new_path="$input_path"
14747    fi
14748  fi
14749
14750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14751  if test "x$test_cygdrive_prefix" = x; then
14752    # As a simple fix, exclude /usr/bin since it's not a real path.
14753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14755      # a path prefixed by /cygdrive for fixpath to work.
14756      new_path="$CYGWIN_ROOT_PATH$input_path"
14757    fi
14758  fi
14759
14760
14761  if test "x$path" != "x$new_path"; then
14762    BOOT_JDK="$new_path"
14763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14764$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14765  fi
14766
14767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14768
14769  path="$BOOT_JDK"
14770  has_colon=`$ECHO $path | $GREP ^.:`
14771  new_path="$path"
14772  if test "x$has_colon" = x; then
14773    # Not in mixed or Windows style, start by that.
14774    new_path=`cmd //c echo $path`
14775  fi
14776
14777
14778  input_path="$new_path"
14779  # Check if we need to convert this using DOS-style short mode. If the path
14780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14781  # take no chances and rewrite it.
14782  # Note: m4 eats our [], so we need to use [ and ] instead.
14783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14784  if test "x$has_forbidden_chars" != x; then
14785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14787  fi
14788
14789
14790  windows_path="$new_path"
14791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14792    unix_path=`$CYGPATH -u "$windows_path"`
14793    new_path="$unix_path"
14794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14796    new_path="$unix_path"
14797  fi
14798
14799  if test "x$path" != "x$new_path"; then
14800    BOOT_JDK="$new_path"
14801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14803  fi
14804
14805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14807
14808  else
14809    # We're on a posix platform. Hooray! :)
14810    path="$BOOT_JDK"
14811
14812    if test ! -f "$path" && test ! -d "$path"; then
14813      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14814    fi
14815
14816    has_space=`$ECHO "$path" | $GREP " "`
14817    if test "x$has_space" != x; then
14818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14820      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14821    fi
14822  fi
14823
14824              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14825$as_echo_n "checking for Boot JDK... " >&6; }
14826              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14827$as_echo "$BOOT_JDK" >&6; }
14828              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14829$as_echo_n "checking Boot JDK version... " >&6; }
14830              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14831              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14832$as_echo "$BOOT_JDK_VERSION" >&6; }
14833            fi # end check jdk version
14834          fi # end check rt.jar
14835        fi # end check javac
14836      fi # end check java
14837    fi # end check boot jdk found
14838  fi
14839
14840  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14841
14842  if test "x$BOOT_JDK_FOUND" = xno; then
14843    # Now execute the test
14844
14845  BOOT_JDK_PREFIX="/usr/lib/jvm"
14846  BOOT_JDK_SUFFIX=""
14847  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14848  if test "x$ALL_JDKS_FOUND" != x; then
14849    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14850
14851  if test "x$BOOT_JDK_FOUND" = xno; then
14852    # Now execute the test
14853
14854        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14855        if test -d "$BOOT_JDK"; then
14856          BOOT_JDK_FOUND=maybe
14857          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14858$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14859        fi
14860
14861
14862    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14863    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14864      # Do we have a bin/java?
14865      if test ! -x "$BOOT_JDK/bin/java"; then
14866        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14868        BOOT_JDK_FOUND=no
14869      else
14870        # Do we have a bin/javac?
14871        if test ! -x "$BOOT_JDK/bin/javac"; then
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14874          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14875$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14876          BOOT_JDK_FOUND=no
14877        else
14878          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14879          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14880            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14882            BOOT_JDK_FOUND=no
14883          else
14884            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14885            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14886
14887            # Extra M4 quote needed to protect [] in grep expression.
14888            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14889            if test "x$FOUND_VERSION_78" = x; then
14890              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14892              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14893$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14894              BOOT_JDK_FOUND=no
14895            else
14896              # We're done! :-)
14897              BOOT_JDK_FOUND=yes
14898
14899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14900
14901  # Input might be given as Windows format, start by converting to
14902  # unix format.
14903  path="$BOOT_JDK"
14904  new_path=`$CYGPATH -u "$path"`
14905
14906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14909  # "foo.exe" is OK but "foo" is an error.
14910  #
14911  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14912  # It is also a way to make sure we got the proper file name for the real test later on.
14913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14914  if test "x$test_shortpath" = x; then
14915    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14917    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14918  fi
14919
14920  # Call helper function which possibly converts this using DOS-style short mode.
14921  # If so, the updated path is stored in $new_path.
14922
14923  input_path="$new_path"
14924  # Check if we need to convert this using DOS-style short mode. If the path
14925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14926  # take no chances and rewrite it.
14927  # Note: m4 eats our [], so we need to use [ and ] instead.
14928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14929  if test "x$has_forbidden_chars" != x; then
14930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14934      # Going to short mode and back again did indeed matter. Since short mode is
14935      # case insensitive, let's make it lowercase to improve readability.
14936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14937      # Now convert it back to Unix-stile (cygpath)
14938      input_path=`$CYGPATH -u "$shortmode_path"`
14939      new_path="$input_path"
14940    fi
14941  fi
14942
14943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14944  if test "x$test_cygdrive_prefix" = x; then
14945    # As a simple fix, exclude /usr/bin since it's not a real path.
14946    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14948      # a path prefixed by /cygdrive for fixpath to work.
14949      new_path="$CYGWIN_ROOT_PATH$input_path"
14950    fi
14951  fi
14952
14953
14954  if test "x$path" != "x$new_path"; then
14955    BOOT_JDK="$new_path"
14956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14957$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14958  fi
14959
14960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14961
14962  path="$BOOT_JDK"
14963  has_colon=`$ECHO $path | $GREP ^.:`
14964  new_path="$path"
14965  if test "x$has_colon" = x; then
14966    # Not in mixed or Windows style, start by that.
14967    new_path=`cmd //c echo $path`
14968  fi
14969
14970
14971  input_path="$new_path"
14972  # Check if we need to convert this using DOS-style short mode. If the path
14973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14974  # take no chances and rewrite it.
14975  # Note: m4 eats our [], so we need to use [ and ] instead.
14976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14977  if test "x$has_forbidden_chars" != x; then
14978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14980  fi
14981
14982
14983  windows_path="$new_path"
14984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14985    unix_path=`$CYGPATH -u "$windows_path"`
14986    new_path="$unix_path"
14987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14989    new_path="$unix_path"
14990  fi
14991
14992  if test "x$path" != "x$new_path"; then
14993    BOOT_JDK="$new_path"
14994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14995$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14996  fi
14997
14998  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14999  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15000
15001  else
15002    # We're on a posix platform. Hooray! :)
15003    path="$BOOT_JDK"
15004
15005    if test ! -f "$path" && test ! -d "$path"; then
15006      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15007    fi
15008
15009    has_space=`$ECHO "$path" | $GREP " "`
15010    if test "x$has_space" != x; then
15011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15012$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15013      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15014    fi
15015  fi
15016
15017              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15018$as_echo_n "checking for Boot JDK... " >&6; }
15019              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15020$as_echo "$BOOT_JDK" >&6; }
15021              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15022$as_echo_n "checking Boot JDK version... " >&6; }
15023              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15024              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15025$as_echo "$BOOT_JDK_VERSION" >&6; }
15026            fi # end check jdk version
15027          fi # end check rt.jar
15028        fi # end check javac
15029      fi # end check java
15030    fi # end check boot jdk found
15031  fi
15032
15033    done
15034  fi
15035
15036
15037    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15038    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15039      # Do we have a bin/java?
15040      if test ! -x "$BOOT_JDK/bin/java"; then
15041        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15043        BOOT_JDK_FOUND=no
15044      else
15045        # Do we have a bin/javac?
15046        if test ! -x "$BOOT_JDK/bin/javac"; then
15047          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15049          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15050$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15051          BOOT_JDK_FOUND=no
15052        else
15053          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15054          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15055            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15057            BOOT_JDK_FOUND=no
15058          else
15059            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15060            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15061
15062            # Extra M4 quote needed to protect [] in grep expression.
15063            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15064            if test "x$FOUND_VERSION_78" = x; then
15065              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15067              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15068$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15069              BOOT_JDK_FOUND=no
15070            else
15071              # We're done! :-)
15072              BOOT_JDK_FOUND=yes
15073
15074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15075
15076  # Input might be given as Windows format, start by converting to
15077  # unix format.
15078  path="$BOOT_JDK"
15079  new_path=`$CYGPATH -u "$path"`
15080
15081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15084  # "foo.exe" is OK but "foo" is an error.
15085  #
15086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15087  # It is also a way to make sure we got the proper file name for the real test later on.
15088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15089  if test "x$test_shortpath" = x; then
15090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15092    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15093  fi
15094
15095  # Call helper function which possibly converts this using DOS-style short mode.
15096  # If so, the updated path is stored in $new_path.
15097
15098  input_path="$new_path"
15099  # Check if we need to convert this using DOS-style short mode. If the path
15100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15101  # take no chances and rewrite it.
15102  # Note: m4 eats our [], so we need to use [ and ] instead.
15103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15104  if test "x$has_forbidden_chars" != x; then
15105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15109      # Going to short mode and back again did indeed matter. Since short mode is
15110      # case insensitive, let's make it lowercase to improve readability.
15111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15112      # Now convert it back to Unix-stile (cygpath)
15113      input_path=`$CYGPATH -u "$shortmode_path"`
15114      new_path="$input_path"
15115    fi
15116  fi
15117
15118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15119  if test "x$test_cygdrive_prefix" = x; then
15120    # As a simple fix, exclude /usr/bin since it's not a real path.
15121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15123      # a path prefixed by /cygdrive for fixpath to work.
15124      new_path="$CYGWIN_ROOT_PATH$input_path"
15125    fi
15126  fi
15127
15128
15129  if test "x$path" != "x$new_path"; then
15130    BOOT_JDK="$new_path"
15131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15133  fi
15134
15135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15136
15137  path="$BOOT_JDK"
15138  has_colon=`$ECHO $path | $GREP ^.:`
15139  new_path="$path"
15140  if test "x$has_colon" = x; then
15141    # Not in mixed or Windows style, start by that.
15142    new_path=`cmd //c echo $path`
15143  fi
15144
15145
15146  input_path="$new_path"
15147  # Check if we need to convert this using DOS-style short mode. If the path
15148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15149  # take no chances and rewrite it.
15150  # Note: m4 eats our [], so we need to use [ and ] instead.
15151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15152  if test "x$has_forbidden_chars" != x; then
15153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15155  fi
15156
15157
15158  windows_path="$new_path"
15159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15160    unix_path=`$CYGPATH -u "$windows_path"`
15161    new_path="$unix_path"
15162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15164    new_path="$unix_path"
15165  fi
15166
15167  if test "x$path" != "x$new_path"; then
15168    BOOT_JDK="$new_path"
15169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15170$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15171  fi
15172
15173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15175
15176  else
15177    # We're on a posix platform. Hooray! :)
15178    path="$BOOT_JDK"
15179
15180    if test ! -f "$path" && test ! -d "$path"; then
15181      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15182    fi
15183
15184    has_space=`$ECHO "$path" | $GREP " "`
15185    if test "x$has_space" != x; then
15186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15188      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15189    fi
15190  fi
15191
15192              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15193$as_echo_n "checking for Boot JDK... " >&6; }
15194              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15195$as_echo "$BOOT_JDK" >&6; }
15196              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15197$as_echo_n "checking Boot JDK version... " >&6; }
15198              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15199              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15200$as_echo "$BOOT_JDK_VERSION" >&6; }
15201            fi # end check jdk version
15202          fi # end check rt.jar
15203        fi # end check javac
15204      fi # end check java
15205    fi # end check boot jdk found
15206  fi
15207
15208  fi
15209
15210
15211    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15212    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15213      # Do we have a bin/java?
15214      if test ! -x "$BOOT_JDK/bin/java"; then
15215        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15217        BOOT_JDK_FOUND=no
15218      else
15219        # Do we have a bin/javac?
15220        if test ! -x "$BOOT_JDK/bin/javac"; then
15221          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15223          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15224$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15225          BOOT_JDK_FOUND=no
15226        else
15227          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15228          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15229            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15231            BOOT_JDK_FOUND=no
15232          else
15233            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15235
15236            # Extra M4 quote needed to protect [] in grep expression.
15237            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15238            if test "x$FOUND_VERSION_78" = x; then
15239              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15241              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15242$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15243              BOOT_JDK_FOUND=no
15244            else
15245              # We're done! :-)
15246              BOOT_JDK_FOUND=yes
15247
15248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15249
15250  # Input might be given as Windows format, start by converting to
15251  # unix format.
15252  path="$BOOT_JDK"
15253  new_path=`$CYGPATH -u "$path"`
15254
15255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15258  # "foo.exe" is OK but "foo" is an error.
15259  #
15260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15261  # It is also a way to make sure we got the proper file name for the real test later on.
15262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15263  if test "x$test_shortpath" = x; then
15264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15266    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15267  fi
15268
15269  # Call helper function which possibly converts this using DOS-style short mode.
15270  # If so, the updated path is stored in $new_path.
15271
15272  input_path="$new_path"
15273  # Check if we need to convert this using DOS-style short mode. If the path
15274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15275  # take no chances and rewrite it.
15276  # Note: m4 eats our [], so we need to use [ and ] instead.
15277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15278  if test "x$has_forbidden_chars" != x; then
15279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15283      # Going to short mode and back again did indeed matter. Since short mode is
15284      # case insensitive, let's make it lowercase to improve readability.
15285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15286      # Now convert it back to Unix-stile (cygpath)
15287      input_path=`$CYGPATH -u "$shortmode_path"`
15288      new_path="$input_path"
15289    fi
15290  fi
15291
15292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15293  if test "x$test_cygdrive_prefix" = x; then
15294    # As a simple fix, exclude /usr/bin since it's not a real path.
15295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15297      # a path prefixed by /cygdrive for fixpath to work.
15298      new_path="$CYGWIN_ROOT_PATH$input_path"
15299    fi
15300  fi
15301
15302
15303  if test "x$path" != "x$new_path"; then
15304    BOOT_JDK="$new_path"
15305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15307  fi
15308
15309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15310
15311  path="$BOOT_JDK"
15312  has_colon=`$ECHO $path | $GREP ^.:`
15313  new_path="$path"
15314  if test "x$has_colon" = x; then
15315    # Not in mixed or Windows style, start by that.
15316    new_path=`cmd //c echo $path`
15317  fi
15318
15319
15320  input_path="$new_path"
15321  # Check if we need to convert this using DOS-style short mode. If the path
15322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15323  # take no chances and rewrite it.
15324  # Note: m4 eats our [], so we need to use [ and ] instead.
15325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15326  if test "x$has_forbidden_chars" != x; then
15327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15329  fi
15330
15331
15332  windows_path="$new_path"
15333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15334    unix_path=`$CYGPATH -u "$windows_path"`
15335    new_path="$unix_path"
15336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15338    new_path="$unix_path"
15339  fi
15340
15341  if test "x$path" != "x$new_path"; then
15342    BOOT_JDK="$new_path"
15343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15344$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15345  fi
15346
15347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15349
15350  else
15351    # We're on a posix platform. Hooray! :)
15352    path="$BOOT_JDK"
15353
15354    if test ! -f "$path" && test ! -d "$path"; then
15355      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15356    fi
15357
15358    has_space=`$ECHO "$path" | $GREP " "`
15359    if test "x$has_space" != x; then
15360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15361$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15362      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15363    fi
15364  fi
15365
15366              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15367$as_echo_n "checking for Boot JDK... " >&6; }
15368              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15369$as_echo "$BOOT_JDK" >&6; }
15370              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15371$as_echo_n "checking Boot JDK version... " >&6; }
15372              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15373              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15374$as_echo "$BOOT_JDK_VERSION" >&6; }
15375            fi # end check jdk version
15376          fi # end check rt.jar
15377        fi # end check javac
15378      fi # end check java
15379    fi # end check boot jdk found
15380  fi
15381
15382
15383# If we haven't found anything yet, we've truly lost. Give up.
15384if test "x$BOOT_JDK_FOUND" = xno; then
15385
15386    # Print a helpful message on how to acquire the necessary build dependency.
15387    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15388    MISSING_DEPENDENCY=openjdk
15389    PKGHANDLER_COMMAND=
15390
15391    case $PKGHANDLER in
15392	apt-get)
15393                apt_help     $MISSING_DEPENDENCY ;;
15394    yum)
15395                yum_help     $MISSING_DEPENDENCY ;;
15396	port)
15397                port_help    $MISSING_DEPENDENCY ;;
15398	pkgutil)
15399                pkgutil_help $MISSING_DEPENDENCY ;;
15400	pkgadd)
15401                pkgadd_help  $MISSING_DEPENDENCY ;;
15402    * )
15403      break ;;
15404    esac
15405
15406    if test "x$PKGHANDLER_COMMAND" != x; then
15407        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15408    fi
15409
15410  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15411$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15412  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15413$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15414  as_fn_error $? "Cannot continue" "$LINENO" 5
15415fi
15416
15417# Setup proper paths for what we found
15418BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15419if test ! -f "$BOOT_RTJAR"; then
15420    # On MacOSX it is called classes.jar
15421    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15422    if test -f "$BOOT_RTJAR"; then
15423      # Remove the ..
15424      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15425    fi
15426fi
15427BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15428BOOT_JDK="$BOOT_JDK"
15429
15430
15431
15432
15433# Setup tools from the Boot JDK.
15434
15435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15436$as_echo_n "checking for java in Boot JDK... " >&6; }
15437  JAVA=$BOOT_JDK/bin/java
15438  if test ! -x $JAVA; then
15439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15440$as_echo "not found" >&6; }
15441      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15442$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15443      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15444  fi
15445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15446$as_echo "ok" >&6; }
15447
15448
15449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15450$as_echo_n "checking for javac in Boot JDK... " >&6; }
15451  JAVAC=$BOOT_JDK/bin/javac
15452  if test ! -x $JAVAC; then
15453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15454$as_echo "not found" >&6; }
15455      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15456$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15457      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15458  fi
15459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15460$as_echo "ok" >&6; }
15461
15462
15463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15464$as_echo_n "checking for javah in Boot JDK... " >&6; }
15465  JAVAH=$BOOT_JDK/bin/javah
15466  if test ! -x $JAVAH; then
15467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15468$as_echo "not found" >&6; }
15469      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15470$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15471      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15472  fi
15473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15474$as_echo "ok" >&6; }
15475
15476
15477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15478$as_echo_n "checking for javap in Boot JDK... " >&6; }
15479  JAVAP=$BOOT_JDK/bin/javap
15480  if test ! -x $JAVAP; then
15481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15482$as_echo "not found" >&6; }
15483      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15484$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15485      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15486  fi
15487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15488$as_echo "ok" >&6; }
15489
15490
15491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15492$as_echo_n "checking for jar in Boot JDK... " >&6; }
15493  JAR=$BOOT_JDK/bin/jar
15494  if test ! -x $JAR; then
15495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15496$as_echo "not found" >&6; }
15497      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15498$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15499      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15500  fi
15501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15502$as_echo "ok" >&6; }
15503
15504
15505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15506$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15507  RMIC=$BOOT_JDK/bin/rmic
15508  if test ! -x $RMIC; then
15509      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15510$as_echo "not found" >&6; }
15511      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15512$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15513      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15514  fi
15515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15516$as_echo "ok" >&6; }
15517
15518
15519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15520$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15521  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15522  if test ! -x $NATIVE2ASCII; then
15523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15524$as_echo "not found" >&6; }
15525      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15526$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15527      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15528  fi
15529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15530$as_echo "ok" >&6; }
15531
15532
15533# Finally, set some other options...
15534
15535# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15536BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15537
15538
15539
15540
15541##############################################################################
15542#
15543# Specify options for anything that is run with the Boot JDK.
15544#
15545
15546# Check whether --with-boot-jdk-jvmargs was given.
15547if test "${with_boot_jdk_jvmargs+set}" = set; then :
15548  withval=$with_boot_jdk_jvmargs;
15549fi
15550
15551
15552if test "x$with_boot_jdk_jvmargs" = x; then
15553    # Not all JVM:s accept the same arguments on the command line.
15554    # OpenJDK specific increase in thread stack for JDK build,
15555    # well more specifically, when running javac.
15556    if test "x$BUILD_NUM_BITS" = x32; then
15557       STACK_SIZE=768
15558    else
15559       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15560       # since 64-bit pointers are pushed on the stach. Apparently, we need
15561       # to increase the stack space when javacing the JDK....
15562       STACK_SIZE=1536
15563    fi
15564
15565    # Minimum amount of heap memory.
15566
15567    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15568    # If so, then append -Xms64M to boot_jdk_jvmargs
15569    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15570    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15571    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15572        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15573    fi
15574
15575    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15576        # Why does macosx need more heap? Its the huge JDK batch.
15577
15578    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15579    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15580    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15581    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15582    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15583        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15584    fi
15585
15586    else
15587
15588    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15589    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15590    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15591    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15592    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15593        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15594    fi
15595
15596    fi
15597    # When is adding -client something that speeds up the JVM?
15598    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15599
15600    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15601    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15602    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15603    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15604    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15605        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15606    fi
15607
15608
15609    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15610    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15611    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15612    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15613    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15614        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15615    fi
15616
15617
15618    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15619    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15620    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15621    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15622    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15623        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15624    fi
15625
15626    # Disable special log output when a debug build is used as Boot JDK...
15627
15628    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15629    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15630    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15631    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15632    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15633        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15634    fi
15635
15636fi
15637
15638BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15639
15640
15641
15642###############################################################################
15643#
15644# Configure the sources to use. We can add or override individual directories.
15645#
15646###############################################################################
15647
15648
15649
15650# Where are the sources. Any of these can be overridden
15651# using --with-override-corba and the likes.
15652LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15653CORBA_TOPDIR="$SRC_ROOT/corba"
15654JAXP_TOPDIR="$SRC_ROOT/jaxp"
15655JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15656HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15657JDK_TOPDIR="$SRC_ROOT/jdk"
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667###############################################################################
15668#
15669# Pickup additional source for a component from outside of the source root
15670# or override source for a component.
15671#
15672
15673# Check whether --with-add-source-root was given.
15674if test "${with_add_source_root+set}" = set; then :
15675  withval=$with_add_source_root;
15676fi
15677
15678
15679
15680# Check whether --with-override-source-root was given.
15681if test "${with_override_source_root+set}" = set; then :
15682  withval=$with_override_source_root;
15683fi
15684
15685
15686
15687# Check whether --with-adds-and-overrides was given.
15688if test "${with_adds_and_overrides+set}" = set; then :
15689  withval=$with_adds_and_overrides;
15690fi
15691
15692
15693if test "x$with_adds_and_overrides" != x; then
15694    with_add_source_root="$with_adds_and_overrides/adds"
15695    with_override_source_root="$with_adds_and_overrides/overrides"
15696fi
15697
15698if test "x$with_add_source_root" != x; then
15699    if ! test -d $with_add_source_root; then
15700       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15701    fi
15702    CURDIR="$PWD"
15703    cd "$with_add_source_root"
15704    ADD_SRC_ROOT="`pwd`"
15705    cd "$CURDIR"
15706    # Verify that the addon source root does not have any root makefiles.
15707    # If it does, then it is usually an error, prevent this.
15708    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15709       test -f $with_add_source_root/langtools/make/Makefile; then
15710        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
15711    fi
15712    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15713       test -f $with_add_source_root/corba/make/Makefile; then
15714        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
15715    fi
15716    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15717       test -f $with_add_source_root/jaxp/make/Makefile; then
15718        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
15719    fi
15720    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15721       test -f $with_add_source_root/jaxws/make/Makefile; then
15722        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
15723    fi
15724    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15725       test -f $with_add_source_root/hotspot/make/Makefile; then
15726        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
15727    fi
15728    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15729       test -f $with_add_source_root/jdk/make/Makefile; then
15730        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
15731    fi
15732fi
15733
15734
15735if test "x$with_override_source_root" != x; then
15736    if ! test -d $with_override_source_root; then
15737       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15738    fi
15739    CURDIR="$PWD"
15740    cd "$with_override_source_root"
15741    OVERRIDE_SRC_ROOT="`pwd`"
15742    cd "$CURDIR"
15743    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15744       test -f $with_override_source_root/langtools/make/Makefile; then
15745        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
15746    fi
15747    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15748       test -f $with_override_source_root/corba/make/Makefile; then
15749        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
15750    fi
15751    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15752       test -f $with_override_source_root/jaxp/make/Makefile; then
15753        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
15754    fi
15755    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15756       test -f $with_override_source_root/jaxws/make/Makefile; then
15757        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
15758    fi
15759    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15760       test -f $with_override_source_root/hotspot/make/Makefile; then
15761        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
15762    fi
15763    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15764       test -f $with_override_source_root/jdk/make/Makefile; then
15765        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
15766    fi
15767fi
15768
15769
15770###############################################################################
15771#
15772# Override a repo completely, this is used for example when you have 3 small
15773# development sandboxes of the langtools sources and want to avoid having 3 full
15774# OpenJDK sources checked out on disk.
15775#
15776# Assuming that the 3 langtools sandboxes are located here:
15777# /home/fredrik/sandbox1/langtools
15778# /home/fredrik/sandbox2/langtools
15779# /home/fredrik/sandbox3/langtools
15780#
15781# From the source root you create build subdirs manually:
15782#     mkdir -p build1 build2 build3
15783# in each build directory run:
15784#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15785#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15786#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15787#
15788
15789
15790# Check whether --with-override-langtools was given.
15791if test "${with_override_langtools+set}" = set; then :
15792  withval=$with_override_langtools;
15793fi
15794
15795
15796
15797# Check whether --with-override-corba was given.
15798if test "${with_override_corba+set}" = set; then :
15799  withval=$with_override_corba;
15800fi
15801
15802
15803
15804# Check whether --with-override-jaxp was given.
15805if test "${with_override_jaxp+set}" = set; then :
15806  withval=$with_override_jaxp;
15807fi
15808
15809
15810
15811# Check whether --with-override-jaxws was given.
15812if test "${with_override_jaxws+set}" = set; then :
15813  withval=$with_override_jaxws;
15814fi
15815
15816
15817
15818# Check whether --with-override-hotspot was given.
15819if test "${with_override_hotspot+set}" = set; then :
15820  withval=$with_override_hotspot;
15821fi
15822
15823
15824
15825# Check whether --with-override-jdk was given.
15826if test "${with_override_jdk+set}" = set; then :
15827  withval=$with_override_jdk;
15828fi
15829
15830
15831if test "x$with_override_langtools" != x; then
15832    CURDIR="$PWD"
15833    cd "$with_override_langtools"
15834    LANGTOOLS_TOPDIR="`pwd`"
15835    cd "$CURDIR"
15836    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15837        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15838    fi
15839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15840$as_echo_n "checking if langtools should be overridden... " >&6; }
15841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15842$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15843fi
15844if test "x$with_override_corba" != x; then
15845    CURDIR="$PWD"
15846    cd "$with_override_corba"
15847    CORBA_TOPDIR="`pwd`"
15848    cd "$CURDIR"
15849    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15850        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15851    fi
15852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15853$as_echo_n "checking if corba should be overridden... " >&6; }
15854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15855$as_echo "yes with $CORBA_TOPDIR" >&6; }
15856fi
15857if test "x$with_override_jaxp" != x; then
15858    CURDIR="$PWD"
15859    cd "$with_override_jaxp"
15860    JAXP_TOPDIR="`pwd`"
15861    cd "$CURDIR"
15862    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15863        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15864    fi
15865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15866$as_echo_n "checking if jaxp should be overridden... " >&6; }
15867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15868$as_echo "yes with $JAXP_TOPDIR" >&6; }
15869fi
15870if test "x$with_override_jaxws" != x; then
15871    CURDIR="$PWD"
15872    cd "$with_override_jaxws"
15873    JAXWS_TOPDIR="`pwd`"
15874    cd "$CURDIR"
15875    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15876        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15877    fi
15878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15879$as_echo_n "checking if jaxws should be overridden... " >&6; }
15880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15881$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15882fi
15883if test "x$with_override_hotspot" != x; then
15884    CURDIR="$PWD"
15885    cd "$with_override_hotspot"
15886    HOTSPOT_TOPDIR="`pwd`"
15887    cd "$CURDIR"
15888    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15889       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15890        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15891    fi
15892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15893$as_echo_n "checking if hotspot should be overridden... " >&6; }
15894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15895$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15896fi
15897if test "x$with_override_jdk" != x; then
15898    CURDIR="$PWD"
15899    cd "$with_override_jdk"
15900    JDK_TOPDIR="`pwd`"
15901    cd "$CURDIR"
15902    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15903        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15904    fi
15905    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15906$as_echo_n "checking if JDK should be overridden... " >&6; }
15907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15908$as_echo "yes with $JDK_TOPDIR" >&6; }
15909fi
15910
15911
15912
15913BUILD_OUTPUT="$OUTPUT_ROOT"
15914
15915
15916HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15917BUILD_HOTSPOT=true
15918
15919
15920
15921# Check whether --with-import-hotspot was given.
15922if test "${with_import_hotspot+set}" = set; then :
15923  withval=$with_import_hotspot;
15924fi
15925
15926if test "x$with_import_hotspot" != x; then
15927    CURDIR="$PWD"
15928    cd "$with_import_hotspot"
15929    HOTSPOT_DIST="`pwd`"
15930    cd "$CURDIR"
15931    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15932        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15933    fi
15934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15935$as_echo_n "checking if hotspot should be imported... " >&6; }
15936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15937$as_echo "yes from $HOTSPOT_DIST" >&6; }
15938    BUILD_HOTSPOT=false
15939fi
15940
15941JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15942
15943
15944###############################################################################
15945#
15946# Setup the toolchain (compilers etc), i.e. the tools that need to be
15947# cross-compilation aware.
15948#
15949###############################################################################
15950
15951
15952###############################################################################
15953#
15954# Configure the development tool paths and potential sysroot.
15955#
15956ac_ext=cpp
15957ac_cpp='$CXXCPP $CPPFLAGS'
15958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15961
15962
15963# The option used to specify the target .o,.a or .so file.
15964# When compiling, how to specify the to be created object file.
15965CC_OUT_OPTION='-o$(SPACE)'
15966# When linking, how to specify the to be created executable.
15967EXE_OUT_OPTION='-o$(SPACE)'
15968# When linking, how to specify the to be created dynamically linkable library.
15969LD_OUT_OPTION='-o$(SPACE)'
15970# When archiving, how to specify the to be create static archive for object files.
15971AR_OUT_OPTION='rcs$(SPACE)'
15972
15973
15974
15975
15976
15977# Locate the actual tools
15978
15979if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15980
15981  # Store path to cygwin link.exe to help excluding it when searching for
15982  # VS linker. This must be done before changing the PATH when looking for VS.
15983  # Extract the first word of "link", so it can be a program name with args.
15984set dummy link; ac_word=$2
15985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15986$as_echo_n "checking for $ac_word... " >&6; }
15987if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15988  $as_echo_n "(cached) " >&6
15989else
15990  case $CYGWIN_LINK in
15991  [\\/]* | ?:[\\/]*)
15992  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15993  ;;
15994  *)
15995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15996for as_dir in $PATH
15997do
15998  IFS=$as_save_IFS
15999  test -z "$as_dir" && as_dir=.
16000    for ac_exec_ext in '' $ac_executable_extensions; do
16001  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16002    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16004    break 2
16005  fi
16006done
16007  done
16008IFS=$as_save_IFS
16009
16010  ;;
16011esac
16012fi
16013CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16014if test -n "$CYGWIN_LINK"; then
16015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16016$as_echo "$CYGWIN_LINK" >&6; }
16017else
16018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16019$as_echo "no" >&6; }
16020fi
16021
16022
16023  if test "x$CYGWIN_LINK" != x; then
16024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16025$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16026    "$CYGWIN_LINK" --version > /dev/null
16027    if test $? -eq 0 ; then
16028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16029$as_echo "yes" >&6; }
16030    else
16031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16032$as_echo "no" >&6; }
16033      # This might be the VS linker. Don't exclude it later on.
16034      CYGWIN_LINK=""
16035    fi
16036  fi
16037
16038  # First-hand choice is to locate and run the vsvars bat file.
16039
16040  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16041    VCVARSFILE="vc/bin/vcvars32.bat"
16042  else
16043    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16044  fi
16045
16046  VS_ENV_CMD=""
16047  VS_ENV_ARGS=""
16048  if test "x$with_toolsdir" != x; then
16049
16050  if test "x$VS_ENV_CMD" = x; then
16051    VS100BASE="$with_toolsdir/../.."
16052    METHOD="--with-tools-dir"
16053
16054  windows_path="$VS100BASE"
16055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16056    unix_path=`$CYGPATH -u "$windows_path"`
16057    VS100BASE="$unix_path"
16058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16060    VS100BASE="$unix_path"
16061  fi
16062
16063    if test -d "$VS100BASE"; then
16064      if test -f "$VS100BASE/$VCVARSFILE"; then
16065        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16066$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16067        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16068      else
16069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16070$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16071        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16072$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16073      fi
16074    fi
16075  fi
16076
16077  fi
16078
16079  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16080    # Having specified an argument which is incorrect will produce an instant failure;
16081    # we should not go on looking
16082    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16083$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16084    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16085$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16086    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16087  fi
16088
16089  if test "x$ProgramW6432" != x; then
16090
16091  if test "x$VS_ENV_CMD" = x; then
16092    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16093    METHOD="well-known name"
16094
16095  windows_path="$WIN_SDK_BASE"
16096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16097    unix_path=`$CYGPATH -u "$windows_path"`
16098    WIN_SDK_BASE="$unix_path"
16099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16101    WIN_SDK_BASE="$unix_path"
16102  fi
16103
16104    if test -d "$WIN_SDK_BASE"; then
16105      # There have been cases of partial or broken SDK installations. A missing
16106      # lib dir is not going to work.
16107      if test ! -d "$WIN_SDK_BASE/../lib"; then
16108        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16109$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16110        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16111$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16112      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16114$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16115        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16116        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16117          VS_ENV_ARGS="/x86"
16118        else
16119          VS_ENV_ARGS="/x64"
16120        fi
16121      else
16122        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16123$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16124        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16125$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16126      fi
16127    fi
16128  fi
16129
16130  fi
16131  if test "x$PROGRAMW6432" != x; then
16132
16133  if test "x$VS_ENV_CMD" = x; then
16134    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16135    METHOD="well-known name"
16136
16137  windows_path="$WIN_SDK_BASE"
16138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16139    unix_path=`$CYGPATH -u "$windows_path"`
16140    WIN_SDK_BASE="$unix_path"
16141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16143    WIN_SDK_BASE="$unix_path"
16144  fi
16145
16146    if test -d "$WIN_SDK_BASE"; then
16147      # There have been cases of partial or broken SDK installations. A missing
16148      # lib dir is not going to work.
16149      if test ! -d "$WIN_SDK_BASE/../lib"; then
16150        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16151$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16152        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16153$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16154      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16155        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16156$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16157        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16158        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16159          VS_ENV_ARGS="/x86"
16160        else
16161          VS_ENV_ARGS="/x64"
16162        fi
16163      else
16164        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16165$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16166        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16167$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16168      fi
16169    fi
16170  fi
16171
16172  fi
16173  if test "x$PROGRAMFILES" != x; then
16174
16175  if test "x$VS_ENV_CMD" = x; then
16176    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16177    METHOD="well-known name"
16178
16179  windows_path="$WIN_SDK_BASE"
16180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16181    unix_path=`$CYGPATH -u "$windows_path"`
16182    WIN_SDK_BASE="$unix_path"
16183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16185    WIN_SDK_BASE="$unix_path"
16186  fi
16187
16188    if test -d "$WIN_SDK_BASE"; then
16189      # There have been cases of partial or broken SDK installations. A missing
16190      # lib dir is not going to work.
16191      if test ! -d "$WIN_SDK_BASE/../lib"; then
16192        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16193$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16194        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16195$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16196      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16197        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16198$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16199        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16200        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16201          VS_ENV_ARGS="/x86"
16202        else
16203          VS_ENV_ARGS="/x64"
16204        fi
16205      else
16206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16208        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16209$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16210      fi
16211    fi
16212  fi
16213
16214  fi
16215
16216  if test "x$VS_ENV_CMD" = x; then
16217    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16218    METHOD="well-known name"
16219
16220  windows_path="$WIN_SDK_BASE"
16221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16222    unix_path=`$CYGPATH -u "$windows_path"`
16223    WIN_SDK_BASE="$unix_path"
16224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16226    WIN_SDK_BASE="$unix_path"
16227  fi
16228
16229    if test -d "$WIN_SDK_BASE"; then
16230      # There have been cases of partial or broken SDK installations. A missing
16231      # lib dir is not going to work.
16232      if test ! -d "$WIN_SDK_BASE/../lib"; then
16233        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16234$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16235        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16236$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16237      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16238        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16239$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16240        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16241        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16242          VS_ENV_ARGS="/x86"
16243        else
16244          VS_ENV_ARGS="/x64"
16245        fi
16246      else
16247        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16248$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16249        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16250$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16251      fi
16252    fi
16253  fi
16254
16255
16256  if test "x$VS_ENV_CMD" = x; then
16257    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16258    METHOD="well-known name"
16259
16260  windows_path="$WIN_SDK_BASE"
16261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16262    unix_path=`$CYGPATH -u "$windows_path"`
16263    WIN_SDK_BASE="$unix_path"
16264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16266    WIN_SDK_BASE="$unix_path"
16267  fi
16268
16269    if test -d "$WIN_SDK_BASE"; then
16270      # There have been cases of partial or broken SDK installations. A missing
16271      # lib dir is not going to work.
16272      if test ! -d "$WIN_SDK_BASE/../lib"; then
16273        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16274$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16275        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16276$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16277      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16278        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16279$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16280        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16281        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16282          VS_ENV_ARGS="/x86"
16283        else
16284          VS_ENV_ARGS="/x64"
16285        fi
16286      else
16287        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16288$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16289        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16290$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16291      fi
16292    fi
16293  fi
16294
16295
16296  if test "x$VS100COMNTOOLS" != x; then
16297
16298  if test "x$VS_ENV_CMD" = x; then
16299    VS100BASE="$VS100COMNTOOLS/../.."
16300    METHOD="VS100COMNTOOLS variable"
16301
16302  windows_path="$VS100BASE"
16303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16304    unix_path=`$CYGPATH -u "$windows_path"`
16305    VS100BASE="$unix_path"
16306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16308    VS100BASE="$unix_path"
16309  fi
16310
16311    if test -d "$VS100BASE"; then
16312      if test -f "$VS100BASE/$VCVARSFILE"; then
16313        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16314$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16315        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16316      else
16317        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16318$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16319        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16320$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16321      fi
16322    fi
16323  fi
16324
16325  fi
16326  if test "x$PROGRAMFILES" != x; then
16327
16328  if test "x$VS_ENV_CMD" = x; then
16329    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16330    METHOD="well-known name"
16331
16332  windows_path="$VS100BASE"
16333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16334    unix_path=`$CYGPATH -u "$windows_path"`
16335    VS100BASE="$unix_path"
16336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16338    VS100BASE="$unix_path"
16339  fi
16340
16341    if test -d "$VS100BASE"; then
16342      if test -f "$VS100BASE/$VCVARSFILE"; then
16343        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16344$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16345        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16346      else
16347        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16348$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16349        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16350$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16351      fi
16352    fi
16353  fi
16354
16355  fi
16356
16357  if test "x$VS_ENV_CMD" = x; then
16358    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16359    METHOD="well-known name"
16360
16361  windows_path="$VS100BASE"
16362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16363    unix_path=`$CYGPATH -u "$windows_path"`
16364    VS100BASE="$unix_path"
16365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16367    VS100BASE="$unix_path"
16368  fi
16369
16370    if test -d "$VS100BASE"; then
16371      if test -f "$VS100BASE/$VCVARSFILE"; then
16372        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16373$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16374        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16375      else
16376        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16377$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16378        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16379$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16380      fi
16381    fi
16382  fi
16383
16384
16385  if test "x$VS_ENV_CMD" = x; then
16386    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16387    METHOD="well-known name"
16388
16389  windows_path="$VS100BASE"
16390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16391    unix_path=`$CYGPATH -u "$windows_path"`
16392    VS100BASE="$unix_path"
16393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16395    VS100BASE="$unix_path"
16396  fi
16397
16398    if test -d "$VS100BASE"; then
16399      if test -f "$VS100BASE/$VCVARSFILE"; then
16400        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16401$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16402        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16403      else
16404        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16405$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16406        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16407$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16408      fi
16409    fi
16410  fi
16411
16412
16413  if test "x$VS_ENV_CMD" != x; then
16414    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16415
16416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16417
16418  # First separate the path from the arguments. This will split at the first
16419  # space.
16420  complete="$VS_ENV_CMD"
16421  path="${complete%% *}"
16422  tmp="$complete EOL"
16423  arguments="${tmp#* }"
16424
16425  # Input might be given as Windows format, start by converting to
16426  # unix format.
16427  new_path=`$CYGPATH -u "$path"`
16428
16429  # Now try to locate executable using which
16430  new_path=`$WHICH "$new_path" 2> /dev/null`
16431  # bat and cmd files are not always considered executable in cygwin causing which
16432  # to not find them
16433  if test "x$new_path" = x \
16434           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16435           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16436    new_path=`$CYGPATH -u "$path"`
16437  fi
16438  if test "x$new_path" = x; then
16439    # Oops. Which didn't find the executable.
16440    # The splitting of arguments from the executable at a space might have been incorrect,
16441    # since paths with space are more likely in Windows. Give it another try with the whole
16442    # argument.
16443    path="$complete"
16444    arguments="EOL"
16445    new_path=`$CYGPATH -u "$path"`
16446    new_path=`$WHICH "$new_path" 2> /dev/null`
16447    # bat and cmd files are not always considered executable in cygwin causing which
16448    # to not find them
16449    if test "x$new_path" = x \
16450             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16451             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16452      new_path=`$CYGPATH -u "$path"`
16453    fi
16454    if test "x$new_path" = x; then
16455      # It's still not found. Now this is an unrecoverable error.
16456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16457$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16458      has_space=`$ECHO "$complete" | $GREP " "`
16459      if test "x$has_space" != x; then
16460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16462      fi
16463      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16464    fi
16465  fi
16466
16467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16470  # "foo.exe" is OK but "foo" is an error.
16471  #
16472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16473  # It is also a way to make sure we got the proper file name for the real test later on.
16474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16475  if test "x$test_shortpath" = x; then
16476    # Short path failed, file does not exist as specified.
16477    # Try adding .exe or .cmd
16478    if test -f "${new_path}.exe"; then
16479       input_to_shortpath="${new_path}.exe"
16480    elif test -f "${new_path}.cmd"; then
16481       input_to_shortpath="${new_path}.cmd"
16482    else
16483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16484$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16485      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16486$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16487      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16488    fi
16489  else
16490    input_to_shortpath="$new_path"
16491  fi
16492
16493  # Call helper function which possibly converts this using DOS-style short mode.
16494  # If so, the updated path is stored in $new_path.
16495  new_path="$input_to_shortpath"
16496
16497  input_path="$input_to_shortpath"
16498  # Check if we need to convert this using DOS-style short mode. If the path
16499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16500  # take no chances and rewrite it.
16501  # Note: m4 eats our [], so we need to use [ and ] instead.
16502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16503  if test "x$has_forbidden_chars" != x; then
16504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16508      # Going to short mode and back again did indeed matter. Since short mode is
16509      # case insensitive, let's make it lowercase to improve readability.
16510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16511      # Now convert it back to Unix-stile (cygpath)
16512      input_path=`$CYGPATH -u "$shortmode_path"`
16513      new_path="$input_path"
16514    fi
16515  fi
16516
16517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16518  if test "x$test_cygdrive_prefix" = x; then
16519    # As a simple fix, exclude /usr/bin since it's not a real path.
16520    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16522      # a path prefixed by /cygdrive for fixpath to work.
16523      new_path="$CYGWIN_ROOT_PATH$input_path"
16524    fi
16525  fi
16526
16527  # remove trailing .exe if any
16528  new_path="${new_path/%.exe/}"
16529
16530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16531
16532  # First separate the path from the arguments. This will split at the first
16533  # space.
16534  complete="$VS_ENV_CMD"
16535  path="${complete%% *}"
16536  tmp="$complete EOL"
16537  arguments="${tmp#* }"
16538
16539  # Input might be given as Windows format, start by converting to
16540  # unix format.
16541  new_path="$path"
16542
16543  windows_path="$new_path"
16544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16545    unix_path=`$CYGPATH -u "$windows_path"`
16546    new_path="$unix_path"
16547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16549    new_path="$unix_path"
16550  fi
16551
16552
16553  # Now try to locate executable using which
16554  new_path=`$WHICH "$new_path" 2> /dev/null`
16555
16556  if test "x$new_path" = x; then
16557    # Oops. Which didn't find the executable.
16558    # The splitting of arguments from the executable at a space might have been incorrect,
16559    # since paths with space are more likely in Windows. Give it another try with the whole
16560    # argument.
16561    path="$complete"
16562    arguments="EOL"
16563    new_path="$path"
16564
16565  windows_path="$new_path"
16566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16567    unix_path=`$CYGPATH -u "$windows_path"`
16568    new_path="$unix_path"
16569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16571    new_path="$unix_path"
16572  fi
16573
16574
16575    new_path=`$WHICH "$new_path" 2> /dev/null`
16576
16577    if test "x$new_path" = x; then
16578      # It's still not found. Now this is an unrecoverable error.
16579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16580$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16581      has_space=`$ECHO "$complete" | $GREP " "`
16582      if test "x$has_space" != x; then
16583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16585      fi
16586      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16587    fi
16588  fi
16589
16590  # Now new_path has a complete unix path to the binary
16591  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16592    # Keep paths in /bin as-is, but remove trailing .exe if any
16593    new_path="${new_path/%.exe/}"
16594    # Do not save /bin paths to all_fixpath_prefixes!
16595  else
16596    # Not in mixed or Windows style, start by that.
16597    new_path=`cmd //c echo $new_path`
16598
16599  input_path="$new_path"
16600  # Check if we need to convert this using DOS-style short mode. If the path
16601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16602  # take no chances and rewrite it.
16603  # Note: m4 eats our [], so we need to use [ and ] instead.
16604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16605  if test "x$has_forbidden_chars" != x; then
16606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16608  fi
16609
16610    # Output is in $new_path
16611
16612  windows_path="$new_path"
16613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16614    unix_path=`$CYGPATH -u "$windows_path"`
16615    new_path="$unix_path"
16616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16618    new_path="$unix_path"
16619  fi
16620
16621    # remove trailing .exe if any
16622    new_path="${new_path/%.exe/}"
16623
16624    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16625    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16626  fi
16627
16628  else
16629    # We're on a posix platform. Hooray! :)
16630    # First separate the path from the arguments. This will split at the first
16631    # space.
16632    complete="$VS_ENV_CMD"
16633    path="${complete%% *}"
16634    tmp="$complete EOL"
16635    arguments="${tmp#* }"
16636
16637    # Cannot rely on the command "which" here since it doesn't always work.
16638    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16639    if test -z "$is_absolute_path"; then
16640      # Path to executable is not absolute. Find it.
16641      IFS_save="$IFS"
16642      IFS=:
16643      for p in $PATH; do
16644        if test -f "$p/$path" && test -x "$p/$path"; then
16645          new_path="$p/$path"
16646          break
16647        fi
16648      done
16649      IFS="$IFS_save"
16650    else
16651      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16652$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16653      new_path="$path"
16654    fi
16655
16656    if test "x$new_path" = x; then
16657        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16658$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16659        has_space=`$ECHO "$complete" | $GREP " "`
16660        if test "x$has_space" != x; then
16661          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16662$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16663        fi
16664        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16665      fi
16666  fi
16667
16668      # Now join together the path and the arguments once again
16669      if test "x$arguments" != xEOL; then
16670        new_complete="$new_path ${arguments% *}"
16671      else
16672        new_complete="$new_path"
16673      fi
16674
16675  if test "x$complete" != "x$new_complete"; then
16676      VS_ENV_CMD="$new_complete"
16677      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16678$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16679    fi
16680
16681
16682    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16683    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16684$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16685    cd $OUTPUT_ROOT
16686    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16687    # to autoconf standards.
16688
16689    #----
16690
16691    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16692    # but calculate the difference in Cygwin environment before/after running it and then
16693    # apply the diff.
16694
16695    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16696      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16697      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16698      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16699    else
16700      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16701      _dosbash=`cmd //c echo \`which bash\``
16702    fi
16703
16704    # generate the set of exported vars before/after the vs10 setup
16705    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16706    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16707    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16708    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16709
16710    # Now execute the newly created bat file.
16711    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16712    cmd /c localdevenvtmp.bat | cat
16713
16714    # apply the diff (less some non-vs10 vars named by "!")
16715    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16716    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16717    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16718
16719    # cleanup
16720    $RM localdevenvtmp*
16721    #----
16722    cd $CURDIR
16723    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16725$as_echo "no" >&6; }
16726      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16727$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16728      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16729$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16730      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16731$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16732      as_fn_error $? "Cannot continue" "$LINENO" 5
16733    fi
16734
16735    # Now set all paths and other env variables. This will allow the rest of
16736    # the configure script to find and run the compiler in the proper way.
16737    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16738$as_echo "$as_me: Setting extracted environment variables" >&6;}
16739    . $OUTPUT_ROOT/localdevenv.sh
16740  else
16741    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16742    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16743$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16744  fi
16745
16746  # At this point, we should have corrent variables in the environment, or we can't continue.
16747  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16748$as_echo_n "checking for Visual Studio variables... " >&6; }
16749
16750  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16751    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16753$as_echo "present but broken" >&6; }
16754      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16755    else
16756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16757$as_echo "ok" >&6; }
16758      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16759      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16760      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16761      VS_PATH="$PATH"
16762
16763
16764
16765    fi
16766  else
16767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16768$as_echo "not found" >&6; }
16769
16770    if test "x$VS_ENV_CMD" = x; then
16771      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16772$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16773      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16774$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16775    else
16776      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16777$as_echo "$as_me: Running the extraction script failed." >&6;}
16778    fi
16779    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16780$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16781    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16782$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16783    as_fn_error $? "Cannot continue" "$LINENO" 5
16784  fi
16785
16786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16787$as_echo_n "checking for msvcr100.dll... " >&6; }
16788
16789# Check whether --with-msvcr-dll was given.
16790if test "${with_msvcr_dll+set}" = set; then :
16791  withval=$with_msvcr_dll;
16792fi
16793
16794  if test "x$with_msvcr_dll" != x; then
16795    MSVCR_DLL="$with_msvcr_dll"
16796  else
16797    if test "x$VCINSTALLDIR" != x; then
16798      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16799        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16800      else
16801        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16802        if test "x$MSVCR_DLL" = x; then
16803          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16804        fi
16805      fi
16806      if test "x$MSVCR_DLL" != x; then
16807        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16808$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16809      else
16810        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16811$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16812      fi
16813    fi
16814    if test "x$MSVCR_DLL" = x; then
16815      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16816        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16817$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16818        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16819      fi
16820    fi
16821  fi
16822  if test "x$MSVCR_DLL" = x; then
16823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16824$as_echo "no" >&6; }
16825    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16826  fi
16827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16828$as_echo "$MSVCR_DLL" >&6; }
16829
16830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16831
16832  # Input might be given as Windows format, start by converting to
16833  # unix format.
16834  path="$MSVCR_DLL"
16835  new_path=`$CYGPATH -u "$path"`
16836
16837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16840  # "foo.exe" is OK but "foo" is an error.
16841  #
16842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16843  # It is also a way to make sure we got the proper file name for the real test later on.
16844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16845  if test "x$test_shortpath" = x; then
16846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16847$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16848    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16849  fi
16850
16851  # Call helper function which possibly converts this using DOS-style short mode.
16852  # If so, the updated path is stored in $new_path.
16853
16854  input_path="$new_path"
16855  # Check if we need to convert this using DOS-style short mode. If the path
16856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16857  # take no chances and rewrite it.
16858  # Note: m4 eats our [], so we need to use [ and ] instead.
16859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16860  if test "x$has_forbidden_chars" != x; then
16861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16865      # Going to short mode and back again did indeed matter. Since short mode is
16866      # case insensitive, let's make it lowercase to improve readability.
16867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16868      # Now convert it back to Unix-stile (cygpath)
16869      input_path=`$CYGPATH -u "$shortmode_path"`
16870      new_path="$input_path"
16871    fi
16872  fi
16873
16874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16875  if test "x$test_cygdrive_prefix" = x; then
16876    # As a simple fix, exclude /usr/bin since it's not a real path.
16877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16879      # a path prefixed by /cygdrive for fixpath to work.
16880      new_path="$CYGWIN_ROOT_PATH$input_path"
16881    fi
16882  fi
16883
16884
16885  if test "x$path" != "x$new_path"; then
16886    MSVCR_DLL="$new_path"
16887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16888$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16889  fi
16890
16891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16892
16893  path="$MSVCR_DLL"
16894  has_colon=`$ECHO $path | $GREP ^.:`
16895  new_path="$path"
16896  if test "x$has_colon" = x; then
16897    # Not in mixed or Windows style, start by that.
16898    new_path=`cmd //c echo $path`
16899  fi
16900
16901
16902  input_path="$new_path"
16903  # Check if we need to convert this using DOS-style short mode. If the path
16904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16905  # take no chances and rewrite it.
16906  # Note: m4 eats our [], so we need to use [ and ] instead.
16907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16908  if test "x$has_forbidden_chars" != x; then
16909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16911  fi
16912
16913
16914  windows_path="$new_path"
16915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16916    unix_path=`$CYGPATH -u "$windows_path"`
16917    new_path="$unix_path"
16918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16920    new_path="$unix_path"
16921  fi
16922
16923  if test "x$path" != "x$new_path"; then
16924    MSVCR_DLL="$new_path"
16925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16926$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16927  fi
16928
16929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16931
16932  else
16933    # We're on a posix platform. Hooray! :)
16934    path="$MSVCR_DLL"
16935
16936    if test ! -f "$path" && test ! -d "$path"; then
16937      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16938    fi
16939
16940    has_space=`$ECHO "$path" | $GREP " "`
16941    if test "x$has_space" != x; then
16942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16943$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16944      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16945    fi
16946  fi
16947
16948
16949fi
16950
16951
16952
16953# If --build AND --host is set, then the configure script will find any
16954# cross compilation tools in the PATH. Cross compilation tools
16955# follows the cross compilation standard where they are prefixed with ${host}.
16956# For example the binary i686-sun-solaris2.10-gcc
16957# will cross compile for i686-sun-solaris2.10
16958# If neither of build and host is not set, then build=host and the
16959# default compiler found in the path will be used.
16960# Setting only --host, does not seem to be really supported.
16961# Please set both --build and --host if you want to cross compile.
16962
16963if test "x$COMPILE_TYPE" = "xcross"; then
16964    # Now we to find a C/C++ compiler that can build executables for the build
16965    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16966    # once. Also, we need to do this before adding a tools dir to the path,
16967    # otherwise we might pick up cross-compilers which don't use standard naming.
16968    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16969    # to wait until they are properly discovered.
16970    for ac_prog in cl cc gcc
16971do
16972  # Extract the first word of "$ac_prog", so it can be a program name with args.
16973set dummy $ac_prog; ac_word=$2
16974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16975$as_echo_n "checking for $ac_word... " >&6; }
16976if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16977  $as_echo_n "(cached) " >&6
16978else
16979  case $BUILD_CC in
16980  [\\/]* | ?:[\\/]*)
16981  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16982  ;;
16983  *)
16984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16985for as_dir in $PATH
16986do
16987  IFS=$as_save_IFS
16988  test -z "$as_dir" && as_dir=.
16989    for ac_exec_ext in '' $ac_executable_extensions; do
16990  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16991    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16993    break 2
16994  fi
16995done
16996  done
16997IFS=$as_save_IFS
16998
16999  ;;
17000esac
17001fi
17002BUILD_CC=$ac_cv_path_BUILD_CC
17003if test -n "$BUILD_CC"; then
17004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17005$as_echo "$BUILD_CC" >&6; }
17006else
17007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17008$as_echo "no" >&6; }
17009fi
17010
17011
17012  test -n "$BUILD_CC" && break
17013done
17014
17015
17016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17017
17018  # First separate the path from the arguments. This will split at the first
17019  # space.
17020  complete="$BUILD_CC"
17021  path="${complete%% *}"
17022  tmp="$complete EOL"
17023  arguments="${tmp#* }"
17024
17025  # Input might be given as Windows format, start by converting to
17026  # unix format.
17027  new_path=`$CYGPATH -u "$path"`
17028
17029  # Now try to locate executable using which
17030  new_path=`$WHICH "$new_path" 2> /dev/null`
17031  # bat and cmd files are not always considered executable in cygwin causing which
17032  # to not find them
17033  if test "x$new_path" = x \
17034           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17035           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17036    new_path=`$CYGPATH -u "$path"`
17037  fi
17038  if test "x$new_path" = x; then
17039    # Oops. Which didn't find the executable.
17040    # The splitting of arguments from the executable at a space might have been incorrect,
17041    # since paths with space are more likely in Windows. Give it another try with the whole
17042    # argument.
17043    path="$complete"
17044    arguments="EOL"
17045    new_path=`$CYGPATH -u "$path"`
17046    new_path=`$WHICH "$new_path" 2> /dev/null`
17047    # bat and cmd files are not always considered executable in cygwin causing which
17048    # to not find them
17049    if test "x$new_path" = x \
17050             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17051             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17052      new_path=`$CYGPATH -u "$path"`
17053    fi
17054    if test "x$new_path" = x; then
17055      # It's still not found. Now this is an unrecoverable error.
17056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17057$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17058      has_space=`$ECHO "$complete" | $GREP " "`
17059      if test "x$has_space" != x; then
17060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17062      fi
17063      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17064    fi
17065  fi
17066
17067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17070  # "foo.exe" is OK but "foo" is an error.
17071  #
17072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17073  # It is also a way to make sure we got the proper file name for the real test later on.
17074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17075  if test "x$test_shortpath" = x; then
17076    # Short path failed, file does not exist as specified.
17077    # Try adding .exe or .cmd
17078    if test -f "${new_path}.exe"; then
17079       input_to_shortpath="${new_path}.exe"
17080    elif test -f "${new_path}.cmd"; then
17081       input_to_shortpath="${new_path}.cmd"
17082    else
17083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17084$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17087      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17088    fi
17089  else
17090    input_to_shortpath="$new_path"
17091  fi
17092
17093  # Call helper function which possibly converts this using DOS-style short mode.
17094  # If so, the updated path is stored in $new_path.
17095  new_path="$input_to_shortpath"
17096
17097  input_path="$input_to_shortpath"
17098  # Check if we need to convert this using DOS-style short mode. If the path
17099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17100  # take no chances and rewrite it.
17101  # Note: m4 eats our [], so we need to use [ and ] instead.
17102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17103  if test "x$has_forbidden_chars" != x; then
17104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17108      # Going to short mode and back again did indeed matter. Since short mode is
17109      # case insensitive, let's make it lowercase to improve readability.
17110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17111      # Now convert it back to Unix-stile (cygpath)
17112      input_path=`$CYGPATH -u "$shortmode_path"`
17113      new_path="$input_path"
17114    fi
17115  fi
17116
17117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17118  if test "x$test_cygdrive_prefix" = x; then
17119    # As a simple fix, exclude /usr/bin since it's not a real path.
17120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17122      # a path prefixed by /cygdrive for fixpath to work.
17123      new_path="$CYGWIN_ROOT_PATH$input_path"
17124    fi
17125  fi
17126
17127  # remove trailing .exe if any
17128  new_path="${new_path/%.exe/}"
17129
17130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17131
17132  # First separate the path from the arguments. This will split at the first
17133  # space.
17134  complete="$BUILD_CC"
17135  path="${complete%% *}"
17136  tmp="$complete EOL"
17137  arguments="${tmp#* }"
17138
17139  # Input might be given as Windows format, start by converting to
17140  # unix format.
17141  new_path="$path"
17142
17143  windows_path="$new_path"
17144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17145    unix_path=`$CYGPATH -u "$windows_path"`
17146    new_path="$unix_path"
17147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17149    new_path="$unix_path"
17150  fi
17151
17152
17153  # Now try to locate executable using which
17154  new_path=`$WHICH "$new_path" 2> /dev/null`
17155
17156  if test "x$new_path" = x; then
17157    # Oops. Which didn't find the executable.
17158    # The splitting of arguments from the executable at a space might have been incorrect,
17159    # since paths with space are more likely in Windows. Give it another try with the whole
17160    # argument.
17161    path="$complete"
17162    arguments="EOL"
17163    new_path="$path"
17164
17165  windows_path="$new_path"
17166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17167    unix_path=`$CYGPATH -u "$windows_path"`
17168    new_path="$unix_path"
17169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17171    new_path="$unix_path"
17172  fi
17173
17174
17175    new_path=`$WHICH "$new_path" 2> /dev/null`
17176
17177    if test "x$new_path" = x; then
17178      # It's still not found. Now this is an unrecoverable error.
17179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17180$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17181      has_space=`$ECHO "$complete" | $GREP " "`
17182      if test "x$has_space" != x; then
17183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17185      fi
17186      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17187    fi
17188  fi
17189
17190  # Now new_path has a complete unix path to the binary
17191  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17192    # Keep paths in /bin as-is, but remove trailing .exe if any
17193    new_path="${new_path/%.exe/}"
17194    # Do not save /bin paths to all_fixpath_prefixes!
17195  else
17196    # Not in mixed or Windows style, start by that.
17197    new_path=`cmd //c echo $new_path`
17198
17199  input_path="$new_path"
17200  # Check if we need to convert this using DOS-style short mode. If the path
17201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17202  # take no chances and rewrite it.
17203  # Note: m4 eats our [], so we need to use [ and ] instead.
17204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17205  if test "x$has_forbidden_chars" != x; then
17206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17208  fi
17209
17210    # Output is in $new_path
17211
17212  windows_path="$new_path"
17213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17214    unix_path=`$CYGPATH -u "$windows_path"`
17215    new_path="$unix_path"
17216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17218    new_path="$unix_path"
17219  fi
17220
17221    # remove trailing .exe if any
17222    new_path="${new_path/%.exe/}"
17223
17224    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17225    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17226  fi
17227
17228  else
17229    # We're on a posix platform. Hooray! :)
17230    # First separate the path from the arguments. This will split at the first
17231    # space.
17232    complete="$BUILD_CC"
17233    path="${complete%% *}"
17234    tmp="$complete EOL"
17235    arguments="${tmp#* }"
17236
17237    # Cannot rely on the command "which" here since it doesn't always work.
17238    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17239    if test -z "$is_absolute_path"; then
17240      # Path to executable is not absolute. Find it.
17241      IFS_save="$IFS"
17242      IFS=:
17243      for p in $PATH; do
17244        if test -f "$p/$path" && test -x "$p/$path"; then
17245          new_path="$p/$path"
17246          break
17247        fi
17248      done
17249      IFS="$IFS_save"
17250    else
17251      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17252$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17253      new_path="$path"
17254    fi
17255
17256    if test "x$new_path" = x; then
17257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17258$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17259        has_space=`$ECHO "$complete" | $GREP " "`
17260        if test "x$has_space" != x; then
17261          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17262$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17263        fi
17264        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17265      fi
17266  fi
17267
17268      # Now join together the path and the arguments once again
17269      if test "x$arguments" != xEOL; then
17270        new_complete="$new_path ${arguments% *}"
17271      else
17272        new_complete="$new_path"
17273      fi
17274
17275  if test "x$complete" != "x$new_complete"; then
17276      BUILD_CC="$new_complete"
17277      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17278$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17279    fi
17280
17281    for ac_prog in cl CC g++
17282do
17283  # Extract the first word of "$ac_prog", so it can be a program name with args.
17284set dummy $ac_prog; ac_word=$2
17285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17286$as_echo_n "checking for $ac_word... " >&6; }
17287if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17288  $as_echo_n "(cached) " >&6
17289else
17290  case $BUILD_CXX in
17291  [\\/]* | ?:[\\/]*)
17292  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17293  ;;
17294  *)
17295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17296for as_dir in $PATH
17297do
17298  IFS=$as_save_IFS
17299  test -z "$as_dir" && as_dir=.
17300    for ac_exec_ext in '' $ac_executable_extensions; do
17301  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17302    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17304    break 2
17305  fi
17306done
17307  done
17308IFS=$as_save_IFS
17309
17310  ;;
17311esac
17312fi
17313BUILD_CXX=$ac_cv_path_BUILD_CXX
17314if test -n "$BUILD_CXX"; then
17315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17316$as_echo "$BUILD_CXX" >&6; }
17317else
17318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17319$as_echo "no" >&6; }
17320fi
17321
17322
17323  test -n "$BUILD_CXX" && break
17324done
17325
17326
17327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17328
17329  # First separate the path from the arguments. This will split at the first
17330  # space.
17331  complete="$BUILD_CXX"
17332  path="${complete%% *}"
17333  tmp="$complete EOL"
17334  arguments="${tmp#* }"
17335
17336  # Input might be given as Windows format, start by converting to
17337  # unix format.
17338  new_path=`$CYGPATH -u "$path"`
17339
17340  # Now try to locate executable using which
17341  new_path=`$WHICH "$new_path" 2> /dev/null`
17342  # bat and cmd files are not always considered executable in cygwin causing which
17343  # to not find them
17344  if test "x$new_path" = x \
17345           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17346           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17347    new_path=`$CYGPATH -u "$path"`
17348  fi
17349  if test "x$new_path" = x; then
17350    # Oops. Which didn't find the executable.
17351    # The splitting of arguments from the executable at a space might have been incorrect,
17352    # since paths with space are more likely in Windows. Give it another try with the whole
17353    # argument.
17354    path="$complete"
17355    arguments="EOL"
17356    new_path=`$CYGPATH -u "$path"`
17357    new_path=`$WHICH "$new_path" 2> /dev/null`
17358    # bat and cmd files are not always considered executable in cygwin causing which
17359    # to not find them
17360    if test "x$new_path" = x \
17361             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17362             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17363      new_path=`$CYGPATH -u "$path"`
17364    fi
17365    if test "x$new_path" = x; then
17366      # It's still not found. Now this is an unrecoverable error.
17367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17368$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17369      has_space=`$ECHO "$complete" | $GREP " "`
17370      if test "x$has_space" != x; then
17371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17373      fi
17374      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17375    fi
17376  fi
17377
17378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17381  # "foo.exe" is OK but "foo" is an error.
17382  #
17383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17384  # It is also a way to make sure we got the proper file name for the real test later on.
17385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17386  if test "x$test_shortpath" = x; then
17387    # Short path failed, file does not exist as specified.
17388    # Try adding .exe or .cmd
17389    if test -f "${new_path}.exe"; then
17390       input_to_shortpath="${new_path}.exe"
17391    elif test -f "${new_path}.cmd"; then
17392       input_to_shortpath="${new_path}.cmd"
17393    else
17394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17395$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17396      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17398      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17399    fi
17400  else
17401    input_to_shortpath="$new_path"
17402  fi
17403
17404  # Call helper function which possibly converts this using DOS-style short mode.
17405  # If so, the updated path is stored in $new_path.
17406  new_path="$input_to_shortpath"
17407
17408  input_path="$input_to_shortpath"
17409  # Check if we need to convert this using DOS-style short mode. If the path
17410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17411  # take no chances and rewrite it.
17412  # Note: m4 eats our [], so we need to use [ and ] instead.
17413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17414  if test "x$has_forbidden_chars" != x; then
17415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17419      # Going to short mode and back again did indeed matter. Since short mode is
17420      # case insensitive, let's make it lowercase to improve readability.
17421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17422      # Now convert it back to Unix-stile (cygpath)
17423      input_path=`$CYGPATH -u "$shortmode_path"`
17424      new_path="$input_path"
17425    fi
17426  fi
17427
17428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17429  if test "x$test_cygdrive_prefix" = x; then
17430    # As a simple fix, exclude /usr/bin since it's not a real path.
17431    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17433      # a path prefixed by /cygdrive for fixpath to work.
17434      new_path="$CYGWIN_ROOT_PATH$input_path"
17435    fi
17436  fi
17437
17438  # remove trailing .exe if any
17439  new_path="${new_path/%.exe/}"
17440
17441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17442
17443  # First separate the path from the arguments. This will split at the first
17444  # space.
17445  complete="$BUILD_CXX"
17446  path="${complete%% *}"
17447  tmp="$complete EOL"
17448  arguments="${tmp#* }"
17449
17450  # Input might be given as Windows format, start by converting to
17451  # unix format.
17452  new_path="$path"
17453
17454  windows_path="$new_path"
17455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17456    unix_path=`$CYGPATH -u "$windows_path"`
17457    new_path="$unix_path"
17458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17460    new_path="$unix_path"
17461  fi
17462
17463
17464  # Now try to locate executable using which
17465  new_path=`$WHICH "$new_path" 2> /dev/null`
17466
17467  if test "x$new_path" = x; then
17468    # Oops. Which didn't find the executable.
17469    # The splitting of arguments from the executable at a space might have been incorrect,
17470    # since paths with space are more likely in Windows. Give it another try with the whole
17471    # argument.
17472    path="$complete"
17473    arguments="EOL"
17474    new_path="$path"
17475
17476  windows_path="$new_path"
17477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17478    unix_path=`$CYGPATH -u "$windows_path"`
17479    new_path="$unix_path"
17480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17482    new_path="$unix_path"
17483  fi
17484
17485
17486    new_path=`$WHICH "$new_path" 2> /dev/null`
17487
17488    if test "x$new_path" = x; then
17489      # It's still not found. Now this is an unrecoverable error.
17490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17491$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17492      has_space=`$ECHO "$complete" | $GREP " "`
17493      if test "x$has_space" != x; then
17494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17496      fi
17497      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17498    fi
17499  fi
17500
17501  # Now new_path has a complete unix path to the binary
17502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17503    # Keep paths in /bin as-is, but remove trailing .exe if any
17504    new_path="${new_path/%.exe/}"
17505    # Do not save /bin paths to all_fixpath_prefixes!
17506  else
17507    # Not in mixed or Windows style, start by that.
17508    new_path=`cmd //c echo $new_path`
17509
17510  input_path="$new_path"
17511  # Check if we need to convert this using DOS-style short mode. If the path
17512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17513  # take no chances and rewrite it.
17514  # Note: m4 eats our [], so we need to use [ and ] instead.
17515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17516  if test "x$has_forbidden_chars" != x; then
17517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17519  fi
17520
17521    # Output is in $new_path
17522
17523  windows_path="$new_path"
17524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17525    unix_path=`$CYGPATH -u "$windows_path"`
17526    new_path="$unix_path"
17527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17529    new_path="$unix_path"
17530  fi
17531
17532    # remove trailing .exe if any
17533    new_path="${new_path/%.exe/}"
17534
17535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17537  fi
17538
17539  else
17540    # We're on a posix platform. Hooray! :)
17541    # First separate the path from the arguments. This will split at the first
17542    # space.
17543    complete="$BUILD_CXX"
17544    path="${complete%% *}"
17545    tmp="$complete EOL"
17546    arguments="${tmp#* }"
17547
17548    # Cannot rely on the command "which" here since it doesn't always work.
17549    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17550    if test -z "$is_absolute_path"; then
17551      # Path to executable is not absolute. Find it.
17552      IFS_save="$IFS"
17553      IFS=:
17554      for p in $PATH; do
17555        if test -f "$p/$path" && test -x "$p/$path"; then
17556          new_path="$p/$path"
17557          break
17558        fi
17559      done
17560      IFS="$IFS_save"
17561    else
17562      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17563$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17564      new_path="$path"
17565    fi
17566
17567    if test "x$new_path" = x; then
17568        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17569$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17570        has_space=`$ECHO "$complete" | $GREP " "`
17571        if test "x$has_space" != x; then
17572          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17574        fi
17575        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17576      fi
17577  fi
17578
17579      # Now join together the path and the arguments once again
17580      if test "x$arguments" != xEOL; then
17581        new_complete="$new_path ${arguments% *}"
17582      else
17583        new_complete="$new_path"
17584      fi
17585
17586  if test "x$complete" != "x$new_complete"; then
17587      BUILD_CXX="$new_complete"
17588      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17589$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17590    fi
17591
17592    # Extract the first word of "ld", so it can be a program name with args.
17593set dummy ld; ac_word=$2
17594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17595$as_echo_n "checking for $ac_word... " >&6; }
17596if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17597  $as_echo_n "(cached) " >&6
17598else
17599  case $BUILD_LD in
17600  [\\/]* | ?:[\\/]*)
17601  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17602  ;;
17603  *)
17604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17605for as_dir in $PATH
17606do
17607  IFS=$as_save_IFS
17608  test -z "$as_dir" && as_dir=.
17609    for ac_exec_ext in '' $ac_executable_extensions; do
17610  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17611    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17613    break 2
17614  fi
17615done
17616  done
17617IFS=$as_save_IFS
17618
17619  ;;
17620esac
17621fi
17622BUILD_LD=$ac_cv_path_BUILD_LD
17623if test -n "$BUILD_LD"; then
17624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17625$as_echo "$BUILD_LD" >&6; }
17626else
17627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17628$as_echo "no" >&6; }
17629fi
17630
17631
17632
17633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17634
17635  # First separate the path from the arguments. This will split at the first
17636  # space.
17637  complete="$BUILD_LD"
17638  path="${complete%% *}"
17639  tmp="$complete EOL"
17640  arguments="${tmp#* }"
17641
17642  # Input might be given as Windows format, start by converting to
17643  # unix format.
17644  new_path=`$CYGPATH -u "$path"`
17645
17646  # Now try to locate executable using which
17647  new_path=`$WHICH "$new_path" 2> /dev/null`
17648  # bat and cmd files are not always considered executable in cygwin causing which
17649  # to not find them
17650  if test "x$new_path" = x \
17651           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17652           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17653    new_path=`$CYGPATH -u "$path"`
17654  fi
17655  if test "x$new_path" = x; then
17656    # Oops. Which didn't find the executable.
17657    # The splitting of arguments from the executable at a space might have been incorrect,
17658    # since paths with space are more likely in Windows. Give it another try with the whole
17659    # argument.
17660    path="$complete"
17661    arguments="EOL"
17662    new_path=`$CYGPATH -u "$path"`
17663    new_path=`$WHICH "$new_path" 2> /dev/null`
17664    # bat and cmd files are not always considered executable in cygwin causing which
17665    # to not find them
17666    if test "x$new_path" = x \
17667             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17668             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17669      new_path=`$CYGPATH -u "$path"`
17670    fi
17671    if test "x$new_path" = x; then
17672      # It's still not found. Now this is an unrecoverable error.
17673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17674$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17675      has_space=`$ECHO "$complete" | $GREP " "`
17676      if test "x$has_space" != x; then
17677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17679      fi
17680      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17681    fi
17682  fi
17683
17684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17687  # "foo.exe" is OK but "foo" is an error.
17688  #
17689  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17690  # It is also a way to make sure we got the proper file name for the real test later on.
17691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17692  if test "x$test_shortpath" = x; then
17693    # Short path failed, file does not exist as specified.
17694    # Try adding .exe or .cmd
17695    if test -f "${new_path}.exe"; then
17696       input_to_shortpath="${new_path}.exe"
17697    elif test -f "${new_path}.cmd"; then
17698       input_to_shortpath="${new_path}.cmd"
17699    else
17700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17701$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17702      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17703$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17704      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17705    fi
17706  else
17707    input_to_shortpath="$new_path"
17708  fi
17709
17710  # Call helper function which possibly converts this using DOS-style short mode.
17711  # If so, the updated path is stored in $new_path.
17712  new_path="$input_to_shortpath"
17713
17714  input_path="$input_to_shortpath"
17715  # Check if we need to convert this using DOS-style short mode. If the path
17716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17717  # take no chances and rewrite it.
17718  # Note: m4 eats our [], so we need to use [ and ] instead.
17719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17720  if test "x$has_forbidden_chars" != x; then
17721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17725      # Going to short mode and back again did indeed matter. Since short mode is
17726      # case insensitive, let's make it lowercase to improve readability.
17727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17728      # Now convert it back to Unix-stile (cygpath)
17729      input_path=`$CYGPATH -u "$shortmode_path"`
17730      new_path="$input_path"
17731    fi
17732  fi
17733
17734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17735  if test "x$test_cygdrive_prefix" = x; then
17736    # As a simple fix, exclude /usr/bin since it's not a real path.
17737    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17739      # a path prefixed by /cygdrive for fixpath to work.
17740      new_path="$CYGWIN_ROOT_PATH$input_path"
17741    fi
17742  fi
17743
17744  # remove trailing .exe if any
17745  new_path="${new_path/%.exe/}"
17746
17747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17748
17749  # First separate the path from the arguments. This will split at the first
17750  # space.
17751  complete="$BUILD_LD"
17752  path="${complete%% *}"
17753  tmp="$complete EOL"
17754  arguments="${tmp#* }"
17755
17756  # Input might be given as Windows format, start by converting to
17757  # unix format.
17758  new_path="$path"
17759
17760  windows_path="$new_path"
17761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17762    unix_path=`$CYGPATH -u "$windows_path"`
17763    new_path="$unix_path"
17764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17766    new_path="$unix_path"
17767  fi
17768
17769
17770  # Now try to locate executable using which
17771  new_path=`$WHICH "$new_path" 2> /dev/null`
17772
17773  if test "x$new_path" = x; then
17774    # Oops. Which didn't find the executable.
17775    # The splitting of arguments from the executable at a space might have been incorrect,
17776    # since paths with space are more likely in Windows. Give it another try with the whole
17777    # argument.
17778    path="$complete"
17779    arguments="EOL"
17780    new_path="$path"
17781
17782  windows_path="$new_path"
17783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17784    unix_path=`$CYGPATH -u "$windows_path"`
17785    new_path="$unix_path"
17786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17788    new_path="$unix_path"
17789  fi
17790
17791
17792    new_path=`$WHICH "$new_path" 2> /dev/null`
17793
17794    if test "x$new_path" = x; then
17795      # It's still not found. Now this is an unrecoverable error.
17796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17797$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17798      has_space=`$ECHO "$complete" | $GREP " "`
17799      if test "x$has_space" != x; then
17800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17802      fi
17803      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17804    fi
17805  fi
17806
17807  # Now new_path has a complete unix path to the binary
17808  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17809    # Keep paths in /bin as-is, but remove trailing .exe if any
17810    new_path="${new_path/%.exe/}"
17811    # Do not save /bin paths to all_fixpath_prefixes!
17812  else
17813    # Not in mixed or Windows style, start by that.
17814    new_path=`cmd //c echo $new_path`
17815
17816  input_path="$new_path"
17817  # Check if we need to convert this using DOS-style short mode. If the path
17818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17819  # take no chances and rewrite it.
17820  # Note: m4 eats our [], so we need to use [ and ] instead.
17821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17822  if test "x$has_forbidden_chars" != x; then
17823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17825  fi
17826
17827    # Output is in $new_path
17828
17829  windows_path="$new_path"
17830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17831    unix_path=`$CYGPATH -u "$windows_path"`
17832    new_path="$unix_path"
17833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17835    new_path="$unix_path"
17836  fi
17837
17838    # remove trailing .exe if any
17839    new_path="${new_path/%.exe/}"
17840
17841    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17842    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17843  fi
17844
17845  else
17846    # We're on a posix platform. Hooray! :)
17847    # First separate the path from the arguments. This will split at the first
17848    # space.
17849    complete="$BUILD_LD"
17850    path="${complete%% *}"
17851    tmp="$complete EOL"
17852    arguments="${tmp#* }"
17853
17854    # Cannot rely on the command "which" here since it doesn't always work.
17855    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17856    if test -z "$is_absolute_path"; then
17857      # Path to executable is not absolute. Find it.
17858      IFS_save="$IFS"
17859      IFS=:
17860      for p in $PATH; do
17861        if test -f "$p/$path" && test -x "$p/$path"; then
17862          new_path="$p/$path"
17863          break
17864        fi
17865      done
17866      IFS="$IFS_save"
17867    else
17868      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17869$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17870      new_path="$path"
17871    fi
17872
17873    if test "x$new_path" = x; then
17874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17875$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17876        has_space=`$ECHO "$complete" | $GREP " "`
17877        if test "x$has_space" != x; then
17878          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17879$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17880        fi
17881        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17882      fi
17883  fi
17884
17885      # Now join together the path and the arguments once again
17886      if test "x$arguments" != xEOL; then
17887        new_complete="$new_path ${arguments% *}"
17888      else
17889        new_complete="$new_path"
17890      fi
17891
17892  if test "x$complete" != "x$new_complete"; then
17893      BUILD_LD="$new_complete"
17894      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17895$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17896    fi
17897
17898fi
17899
17900
17901
17902
17903# If a devkit is found on the builddeps server, then prepend its path to the
17904# PATH variable. If there are cross compilers available in the devkit, these
17905# will be found by AC_PROG_CC et al.
17906DEVKIT=
17907
17908
17909    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17910        # Source the builddeps file again, to make sure it uses the latest variables!
17911        . $builddepsfile
17912        # Look for a target and build machine specific resource!
17913        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17914        if test "x$resource" = x; then
17915            # Ok, lets instead look for a target specific resource
17916            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17917        fi
17918        if test "x$resource" = x; then
17919            # Ok, lets instead look for a build specific resource
17920            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17921        fi
17922        if test "x$resource" = x; then
17923            # Ok, lets instead look for a generic resource
17924            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17925            resource=${builddep_devkit}
17926        fi
17927        if test "x$resource" != x; then
17928            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17929$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17930	    # If the resource in the builddeps.conf file is an existing directory,
17931	    # for example /java/linux/cups
17932	    if test -d ${resource}; then
17933	       depdir=${resource}
17934	    else
17935
17936# devkit is for example mymodule
17937# $resource is for example libs/general/libmymod_1_2_3.zip
17938# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17939# $with_builddeps_dir is for example /localhome/builddeps
17940# depdir is the name of the variable into which we store the depdir, eg MYMOD
17941# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17942# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17943    filename=`basename $resource`
17944    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17945    filebase=${filename%%.*}
17946    extension=${filename#*.}
17947    installdir=$with_builddeps_dir/$filebase
17948    if test ! -f $installdir/$filename.unpacked; then
17949        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17950$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17951        if test ! -d $installdir; then
17952            mkdir -p $installdir
17953        fi
17954        if test ! -d $installdir; then
17955            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17956        fi
17957        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17958        touch $tmpfile
17959        if test ! -f $tmpfile; then
17960            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17961        fi
17962
17963    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17964    # $tmpfile is the local file name for the downloaded file.
17965    VALID_TOOL=no
17966    if test "x$BDEPS_FTP" = xwget; then
17967       VALID_TOOL=yes
17968       wget -O $tmpfile $with_builddeps_server/$resource
17969    fi
17970    if test "x$BDEPS_FTP" = xlftp; then
17971       VALID_TOOL=yes
17972       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17973    fi
17974    if test "x$BDEPS_FTP" = xftp; then
17975        VALID_TOOL=yes
17976        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17977        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17978        FTPUSERPWD=${FTPSERVER%%@*}
17979        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17980            FTPUSER=${userpwd%%:*}
17981            FTPPWD=${userpwd#*@}
17982            FTPSERVER=${FTPSERVER#*@}
17983        else
17984            FTPUSER=ftp
17985            FTPPWD=ftp
17986        fi
17987        # the "pass" command does not work on some
17988        # ftp clients (read ftp.exe) but if it works,
17989        # passive mode is better!
17990        (\
17991            echo "user $FTPUSER $FTPPWD"        ;\
17992            echo "pass"                         ;\
17993            echo "bin"                          ;\
17994            echo "get $FTPPATH $tmpfile"              ;\
17995        ) | ftp -in $FTPSERVER
17996    fi
17997    if test "x$VALID_TOOL" != xyes; then
17998       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17999    fi
18000
18001        mv $tmpfile $installdir/$filename
18002        if test ! -s $installdir/$filename; then
18003            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18004        fi
18005        case "$extension" in
18006            zip)  echo "Unzipping $installdir/$filename..."
18007               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18008            ;;
18009            tar.gz) echo "Untaring $installdir/$filename..."
18010               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18011            ;;
18012            tgz) echo "Untaring $installdir/$filename..."
18013               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18014            ;;
18015            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18016            ;;
18017        esac
18018    fi
18019    if test -f $installdir/$filename.unpacked; then
18020        depdir=$installdir
18021    fi
18022
18023	    fi
18024            # Source the builddeps file again, because in the previous command, the depdir
18025            # was updated to point at the current build dependency install directory.
18026            . $builddepsfile
18027            # Now extract variables from the builddeps.conf files.
18028            theroot=${builddep_devkit_ROOT}
18029            thecflags=${builddep_devkit_CFLAGS}
18030            thelibs=${builddep_devkit_LIBS}
18031            if test "x$depdir" = x; then
18032                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18033            fi
18034            DEVKIT=$depdir
18035            if test "x$theroot" != x; then
18036               DEVKIT="$theroot"
18037            fi
18038            if test "x$thecflags" != x; then
18039               DEVKIT_CFLAGS="$thecflags"
18040            fi
18041            if test "x$thelibs" != x; then
18042               DEVKIT_LIBS="$thelibs"
18043            fi
18044            # Found devkit
18045                     PATH="$DEVKIT/bin:$PATH"
18046                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18047                     if test "x$x_includes" = "xNONE"; then
18048                         x_includes="$SYS_ROOT/usr/include/X11"
18049                     fi
18050                     if test "x$x_libraries" = "xNONE"; then
18051                         x_libraries="$SYS_ROOT/usr/lib"
18052                     fi
18053
18054
18055        fi
18056
18057    fi
18058
18059
18060if test "x$SYS_ROOT" != "x/" ; then
18061    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18062    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18063    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18064    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18065    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18066    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18067fi
18068
18069# Store the CFLAGS etal passed to the configure script.
18070ORG_CFLAGS="$CFLAGS"
18071ORG_CXXFLAGS="$CXXFLAGS"
18072ORG_OBJCFLAGS="$OBJCFLAGS"
18073
18074# autoconf magic only relies on PATH, so update it if tools dir is specified
18075OLD_PATH="$PATH"
18076if test "x$TOOLS_DIR" != x; then
18077  PATH=$TOOLS_DIR:$PATH
18078fi
18079
18080
18081### Locate C compiler (CC)
18082
18083# gcc is almost always present, but on Windows we
18084# prefer cl.exe and on Solaris we prefer CC.
18085# Thus test for them in this order.
18086if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18087  # Do not probe for cc on MacOSX.
18088  COMPILER_CHECK_LIST="cl gcc"
18089else
18090  COMPILER_CHECK_LIST="cl cc gcc"
18091fi
18092
18093
18094  COMPILER_NAME=C
18095
18096  CC=
18097  # If TOOLS_DIR is set, check for all compiler names in there first
18098  # before checking the rest of the PATH.
18099  if test -n "$TOOLS_DIR"; then
18100    PATH_save="$PATH"
18101    PATH="$TOOLS_DIR"
18102    for ac_prog in $COMPILER_CHECK_LIST
18103do
18104  # Extract the first word of "$ac_prog", so it can be a program name with args.
18105set dummy $ac_prog; ac_word=$2
18106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18107$as_echo_n "checking for $ac_word... " >&6; }
18108if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18109  $as_echo_n "(cached) " >&6
18110else
18111  case $TOOLS_DIR_CC in
18112  [\\/]* | ?:[\\/]*)
18113  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18114  ;;
18115  *)
18116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18117for as_dir in $PATH
18118do
18119  IFS=$as_save_IFS
18120  test -z "$as_dir" && as_dir=.
18121    for ac_exec_ext in '' $ac_executable_extensions; do
18122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18123    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18125    break 2
18126  fi
18127done
18128  done
18129IFS=$as_save_IFS
18130
18131  ;;
18132esac
18133fi
18134TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18135if test -n "$TOOLS_DIR_CC"; then
18136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18137$as_echo "$TOOLS_DIR_CC" >&6; }
18138else
18139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18140$as_echo "no" >&6; }
18141fi
18142
18143
18144  test -n "$TOOLS_DIR_CC" && break
18145done
18146
18147    CC=$TOOLS_DIR_CC
18148    PATH="$PATH_save"
18149  fi
18150
18151  # AC_PATH_PROGS can't be run multiple times with the same variable,
18152  # so create a new name for this run.
18153  if test "x$CC" = x; then
18154    for ac_prog in $COMPILER_CHECK_LIST
18155do
18156  # Extract the first word of "$ac_prog", so it can be a program name with args.
18157set dummy $ac_prog; ac_word=$2
18158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18159$as_echo_n "checking for $ac_word... " >&6; }
18160if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18161  $as_echo_n "(cached) " >&6
18162else
18163  case $POTENTIAL_CC in
18164  [\\/]* | ?:[\\/]*)
18165  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18166  ;;
18167  *)
18168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18169for as_dir in $PATH
18170do
18171  IFS=$as_save_IFS
18172  test -z "$as_dir" && as_dir=.
18173    for ac_exec_ext in '' $ac_executable_extensions; do
18174  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18175    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18177    break 2
18178  fi
18179done
18180  done
18181IFS=$as_save_IFS
18182
18183  ;;
18184esac
18185fi
18186POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18187if test -n "$POTENTIAL_CC"; then
18188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18189$as_echo "$POTENTIAL_CC" >&6; }
18190else
18191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18192$as_echo "no" >&6; }
18193fi
18194
18195
18196  test -n "$POTENTIAL_CC" && break
18197done
18198
18199    CC=$POTENTIAL_CC
18200  fi
18201
18202  if test "x$CC" = x; then
18203
18204    # Print a helpful message on how to acquire the necessary build dependency.
18205    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18206    MISSING_DEPENDENCY=devkit
18207    PKGHANDLER_COMMAND=
18208
18209    case $PKGHANDLER in
18210	apt-get)
18211                apt_help     $MISSING_DEPENDENCY ;;
18212    yum)
18213                yum_help     $MISSING_DEPENDENCY ;;
18214	port)
18215                port_help    $MISSING_DEPENDENCY ;;
18216	pkgutil)
18217                pkgutil_help $MISSING_DEPENDENCY ;;
18218	pkgadd)
18219                pkgadd_help  $MISSING_DEPENDENCY ;;
18220    * )
18221      break ;;
18222    esac
18223
18224    if test "x$PKGHANDLER_COMMAND" != x; then
18225        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18226    fi
18227
18228      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18229  fi
18230
18231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18232
18233  # First separate the path from the arguments. This will split at the first
18234  # space.
18235  complete="$CC"
18236  path="${complete%% *}"
18237  tmp="$complete EOL"
18238  arguments="${tmp#* }"
18239
18240  # Input might be given as Windows format, start by converting to
18241  # unix format.
18242  new_path=`$CYGPATH -u "$path"`
18243
18244  # Now try to locate executable using which
18245  new_path=`$WHICH "$new_path" 2> /dev/null`
18246  # bat and cmd files are not always considered executable in cygwin causing which
18247  # to not find them
18248  if test "x$new_path" = x \
18249           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18250           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18251    new_path=`$CYGPATH -u "$path"`
18252  fi
18253  if test "x$new_path" = x; then
18254    # Oops. Which didn't find the executable.
18255    # The splitting of arguments from the executable at a space might have been incorrect,
18256    # since paths with space are more likely in Windows. Give it another try with the whole
18257    # argument.
18258    path="$complete"
18259    arguments="EOL"
18260    new_path=`$CYGPATH -u "$path"`
18261    new_path=`$WHICH "$new_path" 2> /dev/null`
18262    # bat and cmd files are not always considered executable in cygwin causing which
18263    # to not find them
18264    if test "x$new_path" = x \
18265             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18266             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18267      new_path=`$CYGPATH -u "$path"`
18268    fi
18269    if test "x$new_path" = x; then
18270      # It's still not found. Now this is an unrecoverable error.
18271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18272$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18273      has_space=`$ECHO "$complete" | $GREP " "`
18274      if test "x$has_space" != x; then
18275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18277      fi
18278      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18279    fi
18280  fi
18281
18282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18285  # "foo.exe" is OK but "foo" is an error.
18286  #
18287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18288  # It is also a way to make sure we got the proper file name for the real test later on.
18289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18290  if test "x$test_shortpath" = x; then
18291    # Short path failed, file does not exist as specified.
18292    # Try adding .exe or .cmd
18293    if test -f "${new_path}.exe"; then
18294       input_to_shortpath="${new_path}.exe"
18295    elif test -f "${new_path}.cmd"; then
18296       input_to_shortpath="${new_path}.cmd"
18297    else
18298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18299$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18302      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18303    fi
18304  else
18305    input_to_shortpath="$new_path"
18306  fi
18307
18308  # Call helper function which possibly converts this using DOS-style short mode.
18309  # If so, the updated path is stored in $new_path.
18310  new_path="$input_to_shortpath"
18311
18312  input_path="$input_to_shortpath"
18313  # Check if we need to convert this using DOS-style short mode. If the path
18314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18315  # take no chances and rewrite it.
18316  # Note: m4 eats our [], so we need to use [ and ] instead.
18317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18318  if test "x$has_forbidden_chars" != x; then
18319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18323      # Going to short mode and back again did indeed matter. Since short mode is
18324      # case insensitive, let's make it lowercase to improve readability.
18325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18326      # Now convert it back to Unix-stile (cygpath)
18327      input_path=`$CYGPATH -u "$shortmode_path"`
18328      new_path="$input_path"
18329    fi
18330  fi
18331
18332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18333  if test "x$test_cygdrive_prefix" = x; then
18334    # As a simple fix, exclude /usr/bin since it's not a real path.
18335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18337      # a path prefixed by /cygdrive for fixpath to work.
18338      new_path="$CYGWIN_ROOT_PATH$input_path"
18339    fi
18340  fi
18341
18342  # remove trailing .exe if any
18343  new_path="${new_path/%.exe/}"
18344
18345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18346
18347  # First separate the path from the arguments. This will split at the first
18348  # space.
18349  complete="$CC"
18350  path="${complete%% *}"
18351  tmp="$complete EOL"
18352  arguments="${tmp#* }"
18353
18354  # Input might be given as Windows format, start by converting to
18355  # unix format.
18356  new_path="$path"
18357
18358  windows_path="$new_path"
18359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18360    unix_path=`$CYGPATH -u "$windows_path"`
18361    new_path="$unix_path"
18362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18364    new_path="$unix_path"
18365  fi
18366
18367
18368  # Now try to locate executable using which
18369  new_path=`$WHICH "$new_path" 2> /dev/null`
18370
18371  if test "x$new_path" = x; then
18372    # Oops. Which didn't find the executable.
18373    # The splitting of arguments from the executable at a space might have been incorrect,
18374    # since paths with space are more likely in Windows. Give it another try with the whole
18375    # argument.
18376    path="$complete"
18377    arguments="EOL"
18378    new_path="$path"
18379
18380  windows_path="$new_path"
18381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18382    unix_path=`$CYGPATH -u "$windows_path"`
18383    new_path="$unix_path"
18384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18386    new_path="$unix_path"
18387  fi
18388
18389
18390    new_path=`$WHICH "$new_path" 2> /dev/null`
18391
18392    if test "x$new_path" = x; then
18393      # It's still not found. Now this is an unrecoverable error.
18394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18395$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18396      has_space=`$ECHO "$complete" | $GREP " "`
18397      if test "x$has_space" != x; then
18398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18400      fi
18401      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18402    fi
18403  fi
18404
18405  # Now new_path has a complete unix path to the binary
18406  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18407    # Keep paths in /bin as-is, but remove trailing .exe if any
18408    new_path="${new_path/%.exe/}"
18409    # Do not save /bin paths to all_fixpath_prefixes!
18410  else
18411    # Not in mixed or Windows style, start by that.
18412    new_path=`cmd //c echo $new_path`
18413
18414  input_path="$new_path"
18415  # Check if we need to convert this using DOS-style short mode. If the path
18416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18417  # take no chances and rewrite it.
18418  # Note: m4 eats our [], so we need to use [ and ] instead.
18419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18420  if test "x$has_forbidden_chars" != x; then
18421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18423  fi
18424
18425    # Output is in $new_path
18426
18427  windows_path="$new_path"
18428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18429    unix_path=`$CYGPATH -u "$windows_path"`
18430    new_path="$unix_path"
18431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18433    new_path="$unix_path"
18434  fi
18435
18436    # remove trailing .exe if any
18437    new_path="${new_path/%.exe/}"
18438
18439    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18440    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18441  fi
18442
18443  else
18444    # We're on a posix platform. Hooray! :)
18445    # First separate the path from the arguments. This will split at the first
18446    # space.
18447    complete="$CC"
18448    path="${complete%% *}"
18449    tmp="$complete EOL"
18450    arguments="${tmp#* }"
18451
18452    # Cannot rely on the command "which" here since it doesn't always work.
18453    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18454    if test -z "$is_absolute_path"; then
18455      # Path to executable is not absolute. Find it.
18456      IFS_save="$IFS"
18457      IFS=:
18458      for p in $PATH; do
18459        if test -f "$p/$path" && test -x "$p/$path"; then
18460          new_path="$p/$path"
18461          break
18462        fi
18463      done
18464      IFS="$IFS_save"
18465    else
18466      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18467$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18468      new_path="$path"
18469    fi
18470
18471    if test "x$new_path" = x; then
18472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18473$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18474        has_space=`$ECHO "$complete" | $GREP " "`
18475        if test "x$has_space" != x; then
18476          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18477$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18478        fi
18479        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18480      fi
18481  fi
18482
18483      # Now join together the path and the arguments once again
18484      if test "x$arguments" != xEOL; then
18485        new_complete="$new_path ${arguments% *}"
18486      else
18487        new_complete="$new_path"
18488      fi
18489
18490  if test "x$complete" != "x$new_complete"; then
18491      CC="$new_complete"
18492      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18493$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18494    fi
18495
18496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18497$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18498  TEST_COMPILER="$CC"
18499
18500    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18501        # Follow a chain of symbolic links. Use readlink
18502        # where it exists, else fall back to horribly
18503        # complicated shell code.
18504        if test "x$READLINK_TESTED" != yes; then
18505            # On MacOSX there is a readlink tool with a different
18506            # purpose than the GNU readlink tool. Check the found readlink.
18507            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18508            if test "x$ISGNU" = x; then
18509                 # A readlink that we do not know how to use.
18510                 # Are there other non-GNU readlinks out there?
18511                 READLINK_TESTED=yes
18512                 READLINK=
18513            fi
18514        fi
18515
18516        if test "x$READLINK" != x; then
18517            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18518        else
18519            # Save the current directory for restoring afterwards
18520            STARTDIR=$PWD
18521            COUNTER=0
18522            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18523            sym_link_file=`$BASENAME $TEST_COMPILER`
18524            # Use the system pwd and not the shell builtin to resolve directory symlinks
18525            cd $sym_link_dir
18526            cd `$THEPWDCMD`
18527            sym_link_dir=`$THEPWDCMD`
18528            # Resolve file symlinks
18529            while test $COUNTER -lt 20; do
18530                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18531                if test "x$ISLINK" == x; then
18532                    # This is not a symbolic link! We are done!
18533                    break
18534                fi
18535                # Again resolve directory symlinks since the target of the just found
18536                # link could be in a different directory
18537                cd `$DIRNAME $ISLINK`
18538                sym_link_dir=`$THEPWDCMD`
18539                sym_link_file=`$BASENAME $ISLINK`
18540                let COUNTER=COUNTER+1
18541            done
18542            cd $STARTDIR
18543            TEST_COMPILER=$sym_link_dir/$sym_link_file
18544        fi
18545    fi
18546
18547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18548$as_echo "$TEST_COMPILER" >&6; }
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18550$as_echo_n "checking if CC is disguised ccache... " >&6; }
18551
18552  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18553  if test "x$COMPILER_BASENAME" = "xccache"; then
18554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18555$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18556    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18557    # We want to control ccache invocation ourselves, so ignore this cc and try
18558    # searching again.
18559
18560    # Remove the path to the fake ccache cc from the PATH
18561    RETRY_COMPILER_SAVED_PATH="$PATH"
18562    COMPILER_DIRNAME=`$DIRNAME $CC`
18563    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18564
18565    # Try again looking for our compiler
18566    if test -n "$ac_tool_prefix"; then
18567  for ac_prog in $COMPILER_CHECK_LIST
18568  do
18569    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18570set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18572$as_echo_n "checking for $ac_word... " >&6; }
18573if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18574  $as_echo_n "(cached) " >&6
18575else
18576  if test -n "$PROPER_COMPILER_CC"; then
18577  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18578else
18579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18580for as_dir in $PATH
18581do
18582  IFS=$as_save_IFS
18583  test -z "$as_dir" && as_dir=.
18584    for ac_exec_ext in '' $ac_executable_extensions; do
18585  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18586    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18588    break 2
18589  fi
18590done
18591  done
18592IFS=$as_save_IFS
18593
18594fi
18595fi
18596PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18597if test -n "$PROPER_COMPILER_CC"; then
18598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18599$as_echo "$PROPER_COMPILER_CC" >&6; }
18600else
18601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18602$as_echo "no" >&6; }
18603fi
18604
18605
18606    test -n "$PROPER_COMPILER_CC" && break
18607  done
18608fi
18609if test -z "$PROPER_COMPILER_CC"; then
18610  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18611  for ac_prog in $COMPILER_CHECK_LIST
18612do
18613  # Extract the first word of "$ac_prog", so it can be a program name with args.
18614set dummy $ac_prog; ac_word=$2
18615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18616$as_echo_n "checking for $ac_word... " >&6; }
18617if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18618  $as_echo_n "(cached) " >&6
18619else
18620  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18621  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18622else
18623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18624for as_dir in $PATH
18625do
18626  IFS=$as_save_IFS
18627  test -z "$as_dir" && as_dir=.
18628    for ac_exec_ext in '' $ac_executable_extensions; do
18629  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18630    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18632    break 2
18633  fi
18634done
18635  done
18636IFS=$as_save_IFS
18637
18638fi
18639fi
18640ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18641if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18643$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18644else
18645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18646$as_echo "no" >&6; }
18647fi
18648
18649
18650  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18651done
18652
18653  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18654    PROPER_COMPILER_CC=""
18655  else
18656    case $cross_compiling:$ac_tool_warned in
18657yes:)
18658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18660ac_tool_warned=yes ;;
18661esac
18662    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18663  fi
18664fi
18665
18666
18667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18668
18669  # First separate the path from the arguments. This will split at the first
18670  # space.
18671  complete="$PROPER_COMPILER_CC"
18672  path="${complete%% *}"
18673  tmp="$complete EOL"
18674  arguments="${tmp#* }"
18675
18676  # Input might be given as Windows format, start by converting to
18677  # unix format.
18678  new_path=`$CYGPATH -u "$path"`
18679
18680  # Now try to locate executable using which
18681  new_path=`$WHICH "$new_path" 2> /dev/null`
18682  # bat and cmd files are not always considered executable in cygwin causing which
18683  # to not find them
18684  if test "x$new_path" = x \
18685           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18686           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18687    new_path=`$CYGPATH -u "$path"`
18688  fi
18689  if test "x$new_path" = x; then
18690    # Oops. Which didn't find the executable.
18691    # The splitting of arguments from the executable at a space might have been incorrect,
18692    # since paths with space are more likely in Windows. Give it another try with the whole
18693    # argument.
18694    path="$complete"
18695    arguments="EOL"
18696    new_path=`$CYGPATH -u "$path"`
18697    new_path=`$WHICH "$new_path" 2> /dev/null`
18698    # bat and cmd files are not always considered executable in cygwin causing which
18699    # to not find them
18700    if test "x$new_path" = x \
18701             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18702             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18703      new_path=`$CYGPATH -u "$path"`
18704    fi
18705    if test "x$new_path" = x; then
18706      # It's still not found. Now this is an unrecoverable error.
18707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18708$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18709      has_space=`$ECHO "$complete" | $GREP " "`
18710      if test "x$has_space" != x; then
18711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18713      fi
18714      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18715    fi
18716  fi
18717
18718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18721  # "foo.exe" is OK but "foo" is an error.
18722  #
18723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18724  # It is also a way to make sure we got the proper file name for the real test later on.
18725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18726  if test "x$test_shortpath" = x; then
18727    # Short path failed, file does not exist as specified.
18728    # Try adding .exe or .cmd
18729    if test -f "${new_path}.exe"; then
18730       input_to_shortpath="${new_path}.exe"
18731    elif test -f "${new_path}.cmd"; then
18732       input_to_shortpath="${new_path}.cmd"
18733    else
18734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18735$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18736      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18737$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18738      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18739    fi
18740  else
18741    input_to_shortpath="$new_path"
18742  fi
18743
18744  # Call helper function which possibly converts this using DOS-style short mode.
18745  # If so, the updated path is stored in $new_path.
18746  new_path="$input_to_shortpath"
18747
18748  input_path="$input_to_shortpath"
18749  # Check if we need to convert this using DOS-style short mode. If the path
18750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18751  # take no chances and rewrite it.
18752  # Note: m4 eats our [], so we need to use [ and ] instead.
18753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18754  if test "x$has_forbidden_chars" != x; then
18755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18759      # Going to short mode and back again did indeed matter. Since short mode is
18760      # case insensitive, let's make it lowercase to improve readability.
18761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18762      # Now convert it back to Unix-stile (cygpath)
18763      input_path=`$CYGPATH -u "$shortmode_path"`
18764      new_path="$input_path"
18765    fi
18766  fi
18767
18768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18769  if test "x$test_cygdrive_prefix" = x; then
18770    # As a simple fix, exclude /usr/bin since it's not a real path.
18771    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18773      # a path prefixed by /cygdrive for fixpath to work.
18774      new_path="$CYGWIN_ROOT_PATH$input_path"
18775    fi
18776  fi
18777
18778  # remove trailing .exe if any
18779  new_path="${new_path/%.exe/}"
18780
18781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18782
18783  # First separate the path from the arguments. This will split at the first
18784  # space.
18785  complete="$PROPER_COMPILER_CC"
18786  path="${complete%% *}"
18787  tmp="$complete EOL"
18788  arguments="${tmp#* }"
18789
18790  # Input might be given as Windows format, start by converting to
18791  # unix format.
18792  new_path="$path"
18793
18794  windows_path="$new_path"
18795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18796    unix_path=`$CYGPATH -u "$windows_path"`
18797    new_path="$unix_path"
18798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18800    new_path="$unix_path"
18801  fi
18802
18803
18804  # Now try to locate executable using which
18805  new_path=`$WHICH "$new_path" 2> /dev/null`
18806
18807  if test "x$new_path" = x; then
18808    # Oops. Which didn't find the executable.
18809    # The splitting of arguments from the executable at a space might have been incorrect,
18810    # since paths with space are more likely in Windows. Give it another try with the whole
18811    # argument.
18812    path="$complete"
18813    arguments="EOL"
18814    new_path="$path"
18815
18816  windows_path="$new_path"
18817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18818    unix_path=`$CYGPATH -u "$windows_path"`
18819    new_path="$unix_path"
18820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18822    new_path="$unix_path"
18823  fi
18824
18825
18826    new_path=`$WHICH "$new_path" 2> /dev/null`
18827
18828    if test "x$new_path" = x; then
18829      # It's still not found. Now this is an unrecoverable error.
18830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18831$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18832      has_space=`$ECHO "$complete" | $GREP " "`
18833      if test "x$has_space" != x; then
18834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18836      fi
18837      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18838    fi
18839  fi
18840
18841  # Now new_path has a complete unix path to the binary
18842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18843    # Keep paths in /bin as-is, but remove trailing .exe if any
18844    new_path="${new_path/%.exe/}"
18845    # Do not save /bin paths to all_fixpath_prefixes!
18846  else
18847    # Not in mixed or Windows style, start by that.
18848    new_path=`cmd //c echo $new_path`
18849
18850  input_path="$new_path"
18851  # Check if we need to convert this using DOS-style short mode. If the path
18852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18853  # take no chances and rewrite it.
18854  # Note: m4 eats our [], so we need to use [ and ] instead.
18855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18856  if test "x$has_forbidden_chars" != x; then
18857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18859  fi
18860
18861    # Output is in $new_path
18862
18863  windows_path="$new_path"
18864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18865    unix_path=`$CYGPATH -u "$windows_path"`
18866    new_path="$unix_path"
18867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18869    new_path="$unix_path"
18870  fi
18871
18872    # remove trailing .exe if any
18873    new_path="${new_path/%.exe/}"
18874
18875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18877  fi
18878
18879  else
18880    # We're on a posix platform. Hooray! :)
18881    # First separate the path from the arguments. This will split at the first
18882    # space.
18883    complete="$PROPER_COMPILER_CC"
18884    path="${complete%% *}"
18885    tmp="$complete EOL"
18886    arguments="${tmp#* }"
18887
18888    # Cannot rely on the command "which" here since it doesn't always work.
18889    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18890    if test -z "$is_absolute_path"; then
18891      # Path to executable is not absolute. Find it.
18892      IFS_save="$IFS"
18893      IFS=:
18894      for p in $PATH; do
18895        if test -f "$p/$path" && test -x "$p/$path"; then
18896          new_path="$p/$path"
18897          break
18898        fi
18899      done
18900      IFS="$IFS_save"
18901    else
18902      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18903$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18904      new_path="$path"
18905    fi
18906
18907    if test "x$new_path" = x; then
18908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18909$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18910        has_space=`$ECHO "$complete" | $GREP " "`
18911        if test "x$has_space" != x; then
18912          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18913$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18914        fi
18915        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18916      fi
18917  fi
18918
18919      # Now join together the path and the arguments once again
18920      if test "x$arguments" != xEOL; then
18921        new_complete="$new_path ${arguments% *}"
18922      else
18923        new_complete="$new_path"
18924      fi
18925
18926  if test "x$complete" != "x$new_complete"; then
18927      PROPER_COMPILER_CC="$new_complete"
18928      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18929$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18930    fi
18931
18932    PATH="$RETRY_COMPILER_SAVED_PATH"
18933
18934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18935$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18936
18937    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18938        # Follow a chain of symbolic links. Use readlink
18939        # where it exists, else fall back to horribly
18940        # complicated shell code.
18941        if test "x$READLINK_TESTED" != yes; then
18942            # On MacOSX there is a readlink tool with a different
18943            # purpose than the GNU readlink tool. Check the found readlink.
18944            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18945            if test "x$ISGNU" = x; then
18946                 # A readlink that we do not know how to use.
18947                 # Are there other non-GNU readlinks out there?
18948                 READLINK_TESTED=yes
18949                 READLINK=
18950            fi
18951        fi
18952
18953        if test "x$READLINK" != x; then
18954            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18955        else
18956            # Save the current directory for restoring afterwards
18957            STARTDIR=$PWD
18958            COUNTER=0
18959            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18960            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18961            # Use the system pwd and not the shell builtin to resolve directory symlinks
18962            cd $sym_link_dir
18963            cd `$THEPWDCMD`
18964            sym_link_dir=`$THEPWDCMD`
18965            # Resolve file symlinks
18966            while test $COUNTER -lt 20; do
18967                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18968                if test "x$ISLINK" == x; then
18969                    # This is not a symbolic link! We are done!
18970                    break
18971                fi
18972                # Again resolve directory symlinks since the target of the just found
18973                # link could be in a different directory
18974                cd `$DIRNAME $ISLINK`
18975                sym_link_dir=`$THEPWDCMD`
18976                sym_link_file=`$BASENAME $ISLINK`
18977                let COUNTER=COUNTER+1
18978            done
18979            cd $STARTDIR
18980            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18981        fi
18982    fi
18983
18984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18985$as_echo "$PROPER_COMPILER_CC" >&6; }
18986    CC="$PROPER_COMPILER_CC"
18987  else
18988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18989$as_echo "no, keeping CC" >&6; }
18990    CC="$TEST_COMPILER"
18991  fi
18992
18993  COMPILER=$CC
18994  COMPILER_NAME=$COMPILER_NAME
18995
18996  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18997    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18998    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18999    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19000    if test $? -ne 0; then
19001      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19002
19003      { $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
19004$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19005      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19006$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19007      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19008    else
19009      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19010      COMPILER_VENDOR="Sun Studio"
19011    fi
19012  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19013    # First line typically looks something like:
19014    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19015    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19016    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19017    COMPILER_VENDOR="Microsoft CL.EXE"
19018    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19019    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19020      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19021        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19022      fi
19023    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19024      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19025        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19026      fi
19027    fi
19028  else
19029    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19030    # Check that this is likely to be GCC.
19031    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19032    if test $? -ne 0; then
19033      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19034$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19035      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19036$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19037      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19038    fi
19039
19040    # First line typically looks something like:
19041    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19042    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19043    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19044  fi
19045  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19046  CC_VERSION="$COMPILER_VERSION"
19047  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19048  CC_VENDOR="$COMPILER_VENDOR"
19049
19050  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19051$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19052
19053
19054# Now that we have resolved CC ourself, let autoconf have it's go at it
19055ac_ext=c
19056ac_cpp='$CPP $CPPFLAGS'
19057ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19058ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19059ac_compiler_gnu=$ac_cv_c_compiler_gnu
19060if test -n "$ac_tool_prefix"; then
19061  for ac_prog in $CC
19062  do
19063    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19064set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19066$as_echo_n "checking for $ac_word... " >&6; }
19067if test "${ac_cv_prog_CC+set}" = set; then :
19068  $as_echo_n "(cached) " >&6
19069else
19070  if test -n "$CC"; then
19071  ac_cv_prog_CC="$CC" # Let the user override the test.
19072else
19073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19074for as_dir in $PATH
19075do
19076  IFS=$as_save_IFS
19077  test -z "$as_dir" && as_dir=.
19078    for ac_exec_ext in '' $ac_executable_extensions; do
19079  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19080    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19082    break 2
19083  fi
19084done
19085  done
19086IFS=$as_save_IFS
19087
19088fi
19089fi
19090CC=$ac_cv_prog_CC
19091if test -n "$CC"; then
19092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19093$as_echo "$CC" >&6; }
19094else
19095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19096$as_echo "no" >&6; }
19097fi
19098
19099
19100    test -n "$CC" && break
19101  done
19102fi
19103if test -z "$CC"; then
19104  ac_ct_CC=$CC
19105  for ac_prog in $CC
19106do
19107  # Extract the first word of "$ac_prog", so it can be a program name with args.
19108set dummy $ac_prog; ac_word=$2
19109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19110$as_echo_n "checking for $ac_word... " >&6; }
19111if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19112  $as_echo_n "(cached) " >&6
19113else
19114  if test -n "$ac_ct_CC"; then
19115  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19116else
19117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19118for as_dir in $PATH
19119do
19120  IFS=$as_save_IFS
19121  test -z "$as_dir" && as_dir=.
19122    for ac_exec_ext in '' $ac_executable_extensions; do
19123  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19124    ac_cv_prog_ac_ct_CC="$ac_prog"
19125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19126    break 2
19127  fi
19128done
19129  done
19130IFS=$as_save_IFS
19131
19132fi
19133fi
19134ac_ct_CC=$ac_cv_prog_ac_ct_CC
19135if test -n "$ac_ct_CC"; then
19136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19137$as_echo "$ac_ct_CC" >&6; }
19138else
19139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19140$as_echo "no" >&6; }
19141fi
19142
19143
19144  test -n "$ac_ct_CC" && break
19145done
19146
19147  if test "x$ac_ct_CC" = x; then
19148    CC=""
19149  else
19150    case $cross_compiling:$ac_tool_warned in
19151yes:)
19152{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19153$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19154ac_tool_warned=yes ;;
19155esac
19156    CC=$ac_ct_CC
19157  fi
19158fi
19159
19160
19161test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19163as_fn_error $? "no acceptable C compiler found in \$PATH
19164See \`config.log' for more details" "$LINENO" 5 ; }
19165
19166# Provide some information about the compiler.
19167$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19168set X $ac_compile
19169ac_compiler=$2
19170for ac_option in --version -v -V -qversion; do
19171  { { ac_try="$ac_compiler $ac_option >&5"
19172case "(($ac_try" in
19173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19174  *) ac_try_echo=$ac_try;;
19175esac
19176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19177$as_echo "$ac_try_echo"; } >&5
19178  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19179  ac_status=$?
19180  if test -s conftest.err; then
19181    sed '10a\
19182... rest of stderr output deleted ...
19183         10q' conftest.err >conftest.er1
19184    cat conftest.er1 >&5
19185  fi
19186  rm -f conftest.er1 conftest.err
19187  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19188  test $ac_status = 0; }
19189done
19190
19191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19192/* end confdefs.h.  */
19193
19194int
19195main ()
19196{
19197
19198  ;
19199  return 0;
19200}
19201_ACEOF
19202ac_clean_files_save=$ac_clean_files
19203ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19204# Try to create an executable without -o first, disregard a.out.
19205# It will help us diagnose broken compilers, and finding out an intuition
19206# of exeext.
19207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19208$as_echo_n "checking whether the C compiler works... " >&6; }
19209ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19210
19211# The possible output files:
19212ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19213
19214ac_rmfiles=
19215for ac_file in $ac_files
19216do
19217  case $ac_file in
19218    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19219    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19220  esac
19221done
19222rm -f $ac_rmfiles
19223
19224if { { ac_try="$ac_link_default"
19225case "(($ac_try" in
19226  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19227  *) ac_try_echo=$ac_try;;
19228esac
19229eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19230$as_echo "$ac_try_echo"; } >&5
19231  (eval "$ac_link_default") 2>&5
19232  ac_status=$?
19233  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19234  test $ac_status = 0; }; then :
19235  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19236# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19237# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19238# so that the user can short-circuit this test for compilers unknown to
19239# Autoconf.
19240for ac_file in $ac_files ''
19241do
19242  test -f "$ac_file" || continue
19243  case $ac_file in
19244    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19245	;;
19246    [ab].out )
19247	# We found the default executable, but exeext='' is most
19248	# certainly right.
19249	break;;
19250    *.* )
19251	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19252	then :; else
19253	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19254	fi
19255	# We set ac_cv_exeext here because the later test for it is not
19256	# safe: cross compilers may not add the suffix if given an `-o'
19257	# argument, so we may need to know it at that point already.
19258	# Even if this section looks crufty: it has the advantage of
19259	# actually working.
19260	break;;
19261    * )
19262	break;;
19263  esac
19264done
19265test "$ac_cv_exeext" = no && ac_cv_exeext=
19266
19267else
19268  ac_file=''
19269fi
19270if test -z "$ac_file"; then :
19271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19272$as_echo "no" >&6; }
19273$as_echo "$as_me: failed program was:" >&5
19274sed 's/^/| /' conftest.$ac_ext >&5
19275
19276{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19278as_fn_error 77 "C compiler cannot create executables
19279See \`config.log' for more details" "$LINENO" 5 ; }
19280else
19281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19282$as_echo "yes" >&6; }
19283fi
19284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19285$as_echo_n "checking for C compiler default output file name... " >&6; }
19286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19287$as_echo "$ac_file" >&6; }
19288ac_exeext=$ac_cv_exeext
19289
19290rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19291ac_clean_files=$ac_clean_files_save
19292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19293$as_echo_n "checking for suffix of executables... " >&6; }
19294if { { ac_try="$ac_link"
19295case "(($ac_try" in
19296  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19297  *) ac_try_echo=$ac_try;;
19298esac
19299eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19300$as_echo "$ac_try_echo"; } >&5
19301  (eval "$ac_link") 2>&5
19302  ac_status=$?
19303  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19304  test $ac_status = 0; }; then :
19305  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19306# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19307# work properly (i.e., refer to `conftest.exe'), while it won't with
19308# `rm'.
19309for ac_file in conftest.exe conftest conftest.*; do
19310  test -f "$ac_file" || continue
19311  case $ac_file in
19312    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19313    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19314	  break;;
19315    * ) break;;
19316  esac
19317done
19318else
19319  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19321as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19322See \`config.log' for more details" "$LINENO" 5 ; }
19323fi
19324rm -f conftest conftest$ac_cv_exeext
19325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19326$as_echo "$ac_cv_exeext" >&6; }
19327
19328rm -f conftest.$ac_ext
19329EXEEXT=$ac_cv_exeext
19330ac_exeext=$EXEEXT
19331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19332/* end confdefs.h.  */
19333#include <stdio.h>
19334int
19335main ()
19336{
19337FILE *f = fopen ("conftest.out", "w");
19338 return ferror (f) || fclose (f) != 0;
19339
19340  ;
19341  return 0;
19342}
19343_ACEOF
19344ac_clean_files="$ac_clean_files conftest.out"
19345# Check that the compiler produces executables we can run.  If not, either
19346# the compiler is broken, or we cross compile.
19347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19348$as_echo_n "checking whether we are cross compiling... " >&6; }
19349if test "$cross_compiling" != yes; then
19350  { { ac_try="$ac_link"
19351case "(($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_link") 2>&5
19358  ac_status=$?
19359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19360  test $ac_status = 0; }
19361  if { ac_try='./conftest$ac_cv_exeext'
19362  { { case "(($ac_try" in
19363  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19364  *) ac_try_echo=$ac_try;;
19365esac
19366eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19367$as_echo "$ac_try_echo"; } >&5
19368  (eval "$ac_try") 2>&5
19369  ac_status=$?
19370  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19371  test $ac_status = 0; }; }; then
19372    cross_compiling=no
19373  else
19374    if test "$cross_compiling" = maybe; then
19375	cross_compiling=yes
19376    else
19377	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19379as_fn_error $? "cannot run C compiled programs.
19380If you meant to cross compile, use \`--host'.
19381See \`config.log' for more details" "$LINENO" 5 ; }
19382    fi
19383  fi
19384fi
19385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19386$as_echo "$cross_compiling" >&6; }
19387
19388rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19389ac_clean_files=$ac_clean_files_save
19390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19391$as_echo_n "checking for suffix of object files... " >&6; }
19392if test "${ac_cv_objext+set}" = set; then :
19393  $as_echo_n "(cached) " >&6
19394else
19395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19396/* end confdefs.h.  */
19397
19398int
19399main ()
19400{
19401
19402  ;
19403  return 0;
19404}
19405_ACEOF
19406rm -f conftest.o conftest.obj
19407if { { ac_try="$ac_compile"
19408case "(($ac_try" in
19409  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19410  *) ac_try_echo=$ac_try;;
19411esac
19412eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19413$as_echo "$ac_try_echo"; } >&5
19414  (eval "$ac_compile") 2>&5
19415  ac_status=$?
19416  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19417  test $ac_status = 0; }; then :
19418  for ac_file in conftest.o conftest.obj conftest.*; do
19419  test -f "$ac_file" || continue;
19420  case $ac_file in
19421    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19422    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19423       break;;
19424  esac
19425done
19426else
19427  $as_echo "$as_me: failed program was:" >&5
19428sed 's/^/| /' conftest.$ac_ext >&5
19429
19430{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19432as_fn_error $? "cannot compute suffix of object files: cannot compile
19433See \`config.log' for more details" "$LINENO" 5 ; }
19434fi
19435rm -f conftest.$ac_cv_objext conftest.$ac_ext
19436fi
19437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19438$as_echo "$ac_cv_objext" >&6; }
19439OBJEXT=$ac_cv_objext
19440ac_objext=$OBJEXT
19441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19442$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19443if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19444  $as_echo_n "(cached) " >&6
19445else
19446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19447/* end confdefs.h.  */
19448
19449int
19450main ()
19451{
19452#ifndef __GNUC__
19453       choke me
19454#endif
19455
19456  ;
19457  return 0;
19458}
19459_ACEOF
19460if ac_fn_c_try_compile "$LINENO"; then :
19461  ac_compiler_gnu=yes
19462else
19463  ac_compiler_gnu=no
19464fi
19465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19466ac_cv_c_compiler_gnu=$ac_compiler_gnu
19467
19468fi
19469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19470$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19471if test $ac_compiler_gnu = yes; then
19472  GCC=yes
19473else
19474  GCC=
19475fi
19476ac_test_CFLAGS=${CFLAGS+set}
19477ac_save_CFLAGS=$CFLAGS
19478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19479$as_echo_n "checking whether $CC accepts -g... " >&6; }
19480if test "${ac_cv_prog_cc_g+set}" = set; then :
19481  $as_echo_n "(cached) " >&6
19482else
19483  ac_save_c_werror_flag=$ac_c_werror_flag
19484   ac_c_werror_flag=yes
19485   ac_cv_prog_cc_g=no
19486   CFLAGS="-g"
19487   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19488/* end confdefs.h.  */
19489
19490int
19491main ()
19492{
19493
19494  ;
19495  return 0;
19496}
19497_ACEOF
19498if ac_fn_c_try_compile "$LINENO"; then :
19499  ac_cv_prog_cc_g=yes
19500else
19501  CFLAGS=""
19502      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19503/* end confdefs.h.  */
19504
19505int
19506main ()
19507{
19508
19509  ;
19510  return 0;
19511}
19512_ACEOF
19513if ac_fn_c_try_compile "$LINENO"; then :
19514
19515else
19516  ac_c_werror_flag=$ac_save_c_werror_flag
19517	 CFLAGS="-g"
19518	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19519/* end confdefs.h.  */
19520
19521int
19522main ()
19523{
19524
19525  ;
19526  return 0;
19527}
19528_ACEOF
19529if ac_fn_c_try_compile "$LINENO"; then :
19530  ac_cv_prog_cc_g=yes
19531fi
19532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19533fi
19534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19535fi
19536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19537   ac_c_werror_flag=$ac_save_c_werror_flag
19538fi
19539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19540$as_echo "$ac_cv_prog_cc_g" >&6; }
19541if test "$ac_test_CFLAGS" = set; then
19542  CFLAGS=$ac_save_CFLAGS
19543elif test $ac_cv_prog_cc_g = yes; then
19544  if test "$GCC" = yes; then
19545    CFLAGS="-g -O2"
19546  else
19547    CFLAGS="-g"
19548  fi
19549else
19550  if test "$GCC" = yes; then
19551    CFLAGS="-O2"
19552  else
19553    CFLAGS=
19554  fi
19555fi
19556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19557$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19558if test "${ac_cv_prog_cc_c89+set}" = set; then :
19559  $as_echo_n "(cached) " >&6
19560else
19561  ac_cv_prog_cc_c89=no
19562ac_save_CC=$CC
19563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19564/* end confdefs.h.  */
19565#include <stdarg.h>
19566#include <stdio.h>
19567#include <sys/types.h>
19568#include <sys/stat.h>
19569/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19570struct buf { int x; };
19571FILE * (*rcsopen) (struct buf *, struct stat *, int);
19572static char *e (p, i)
19573     char **p;
19574     int i;
19575{
19576  return p[i];
19577}
19578static char *f (char * (*g) (char **, int), char **p, ...)
19579{
19580  char *s;
19581  va_list v;
19582  va_start (v,p);
19583  s = g (p, va_arg (v,int));
19584  va_end (v);
19585  return s;
19586}
19587
19588/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19589   function prototypes and stuff, but not '\xHH' hex character constants.
19590   These don't provoke an error unfortunately, instead are silently treated
19591   as 'x'.  The following induces an error, until -std is added to get
19592   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19593   array size at least.  It's necessary to write '\x00'==0 to get something
19594   that's true only with -std.  */
19595int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19596
19597/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19598   inside strings and character constants.  */
19599#define FOO(x) 'x'
19600int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19601
19602int test (int i, double x);
19603struct s1 {int (*f) (int a);};
19604struct s2 {int (*f) (double a);};
19605int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19606int argc;
19607char **argv;
19608int
19609main ()
19610{
19611return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19612  ;
19613  return 0;
19614}
19615_ACEOF
19616for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19617	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19618do
19619  CC="$ac_save_CC $ac_arg"
19620  if ac_fn_c_try_compile "$LINENO"; then :
19621  ac_cv_prog_cc_c89=$ac_arg
19622fi
19623rm -f core conftest.err conftest.$ac_objext
19624  test "x$ac_cv_prog_cc_c89" != "xno" && break
19625done
19626rm -f conftest.$ac_ext
19627CC=$ac_save_CC
19628
19629fi
19630# AC_CACHE_VAL
19631case "x$ac_cv_prog_cc_c89" in
19632  x)
19633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19634$as_echo "none needed" >&6; } ;;
19635  xno)
19636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19637$as_echo "unsupported" >&6; } ;;
19638  *)
19639    CC="$CC $ac_cv_prog_cc_c89"
19640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19641$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19642esac
19643if test "x$ac_cv_prog_cc_c89" != xno; then :
19644
19645fi
19646
19647ac_ext=cpp
19648ac_cpp='$CXXCPP $CPPFLAGS'
19649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19652
19653
19654### Locate C++ compiler (CXX)
19655
19656if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19657  # Do not probe for CC on MacOSX.
19658  COMPILER_CHECK_LIST="cl g++"
19659else
19660  COMPILER_CHECK_LIST="cl CC g++"
19661fi
19662
19663  COMPILER_NAME=C++
19664
19665  CXX=
19666  # If TOOLS_DIR is set, check for all compiler names in there first
19667  # before checking the rest of the PATH.
19668  if test -n "$TOOLS_DIR"; then
19669    PATH_save="$PATH"
19670    PATH="$TOOLS_DIR"
19671    for ac_prog in $COMPILER_CHECK_LIST
19672do
19673  # Extract the first word of "$ac_prog", so it can be a program name with args.
19674set dummy $ac_prog; ac_word=$2
19675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19676$as_echo_n "checking for $ac_word... " >&6; }
19677if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19678  $as_echo_n "(cached) " >&6
19679else
19680  case $TOOLS_DIR_CXX in
19681  [\\/]* | ?:[\\/]*)
19682  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19683  ;;
19684  *)
19685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19686for as_dir in $PATH
19687do
19688  IFS=$as_save_IFS
19689  test -z "$as_dir" && as_dir=.
19690    for ac_exec_ext in '' $ac_executable_extensions; do
19691  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19692    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19694    break 2
19695  fi
19696done
19697  done
19698IFS=$as_save_IFS
19699
19700  ;;
19701esac
19702fi
19703TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19704if test -n "$TOOLS_DIR_CXX"; then
19705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19706$as_echo "$TOOLS_DIR_CXX" >&6; }
19707else
19708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19709$as_echo "no" >&6; }
19710fi
19711
19712
19713  test -n "$TOOLS_DIR_CXX" && break
19714done
19715
19716    CXX=$TOOLS_DIR_CXX
19717    PATH="$PATH_save"
19718  fi
19719
19720  # AC_PATH_PROGS can't be run multiple times with the same variable,
19721  # so create a new name for this run.
19722  if test "x$CXX" = x; then
19723    for ac_prog in $COMPILER_CHECK_LIST
19724do
19725  # Extract the first word of "$ac_prog", so it can be a program name with args.
19726set dummy $ac_prog; ac_word=$2
19727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19728$as_echo_n "checking for $ac_word... " >&6; }
19729if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19730  $as_echo_n "(cached) " >&6
19731else
19732  case $POTENTIAL_CXX in
19733  [\\/]* | ?:[\\/]*)
19734  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19735  ;;
19736  *)
19737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19738for as_dir in $PATH
19739do
19740  IFS=$as_save_IFS
19741  test -z "$as_dir" && as_dir=.
19742    for ac_exec_ext in '' $ac_executable_extensions; do
19743  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19744    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19746    break 2
19747  fi
19748done
19749  done
19750IFS=$as_save_IFS
19751
19752  ;;
19753esac
19754fi
19755POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19756if test -n "$POTENTIAL_CXX"; then
19757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19758$as_echo "$POTENTIAL_CXX" >&6; }
19759else
19760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19761$as_echo "no" >&6; }
19762fi
19763
19764
19765  test -n "$POTENTIAL_CXX" && break
19766done
19767
19768    CXX=$POTENTIAL_CXX
19769  fi
19770
19771  if test "x$CXX" = x; then
19772
19773    # Print a helpful message on how to acquire the necessary build dependency.
19774    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19775    MISSING_DEPENDENCY=devkit
19776    PKGHANDLER_COMMAND=
19777
19778    case $PKGHANDLER in
19779	apt-get)
19780                apt_help     $MISSING_DEPENDENCY ;;
19781    yum)
19782                yum_help     $MISSING_DEPENDENCY ;;
19783	port)
19784                port_help    $MISSING_DEPENDENCY ;;
19785	pkgutil)
19786                pkgutil_help $MISSING_DEPENDENCY ;;
19787	pkgadd)
19788                pkgadd_help  $MISSING_DEPENDENCY ;;
19789    * )
19790      break ;;
19791    esac
19792
19793    if test "x$PKGHANDLER_COMMAND" != x; then
19794        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19795    fi
19796
19797      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19798  fi
19799
19800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19801
19802  # First separate the path from the arguments. This will split at the first
19803  # space.
19804  complete="$CXX"
19805  path="${complete%% *}"
19806  tmp="$complete EOL"
19807  arguments="${tmp#* }"
19808
19809  # Input might be given as Windows format, start by converting to
19810  # unix format.
19811  new_path=`$CYGPATH -u "$path"`
19812
19813  # Now try to locate executable using which
19814  new_path=`$WHICH "$new_path" 2> /dev/null`
19815  # bat and cmd files are not always considered executable in cygwin causing which
19816  # to not find them
19817  if test "x$new_path" = x \
19818           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19819           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19820    new_path=`$CYGPATH -u "$path"`
19821  fi
19822  if test "x$new_path" = x; then
19823    # Oops. Which didn't find the executable.
19824    # The splitting of arguments from the executable at a space might have been incorrect,
19825    # since paths with space are more likely in Windows. Give it another try with the whole
19826    # argument.
19827    path="$complete"
19828    arguments="EOL"
19829    new_path=`$CYGPATH -u "$path"`
19830    new_path=`$WHICH "$new_path" 2> /dev/null`
19831    # bat and cmd files are not always considered executable in cygwin causing which
19832    # to not find them
19833    if test "x$new_path" = x \
19834             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19835             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19836      new_path=`$CYGPATH -u "$path"`
19837    fi
19838    if test "x$new_path" = x; then
19839      # It's still not found. Now this is an unrecoverable error.
19840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19841$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19842      has_space=`$ECHO "$complete" | $GREP " "`
19843      if test "x$has_space" != x; then
19844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19846      fi
19847      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19848    fi
19849  fi
19850
19851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19854  # "foo.exe" is OK but "foo" is an error.
19855  #
19856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19857  # It is also a way to make sure we got the proper file name for the real test later on.
19858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19859  if test "x$test_shortpath" = x; then
19860    # Short path failed, file does not exist as specified.
19861    # Try adding .exe or .cmd
19862    if test -f "${new_path}.exe"; then
19863       input_to_shortpath="${new_path}.exe"
19864    elif test -f "${new_path}.cmd"; then
19865       input_to_shortpath="${new_path}.cmd"
19866    else
19867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19868$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19871      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19872    fi
19873  else
19874    input_to_shortpath="$new_path"
19875  fi
19876
19877  # Call helper function which possibly converts this using DOS-style short mode.
19878  # If so, the updated path is stored in $new_path.
19879  new_path="$input_to_shortpath"
19880
19881  input_path="$input_to_shortpath"
19882  # Check if we need to convert this using DOS-style short mode. If the path
19883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19884  # take no chances and rewrite it.
19885  # Note: m4 eats our [], so we need to use [ and ] instead.
19886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19887  if test "x$has_forbidden_chars" != x; then
19888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19892      # Going to short mode and back again did indeed matter. Since short mode is
19893      # case insensitive, let's make it lowercase to improve readability.
19894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19895      # Now convert it back to Unix-stile (cygpath)
19896      input_path=`$CYGPATH -u "$shortmode_path"`
19897      new_path="$input_path"
19898    fi
19899  fi
19900
19901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19902  if test "x$test_cygdrive_prefix" = x; then
19903    # As a simple fix, exclude /usr/bin since it's not a real path.
19904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19906      # a path prefixed by /cygdrive for fixpath to work.
19907      new_path="$CYGWIN_ROOT_PATH$input_path"
19908    fi
19909  fi
19910
19911  # remove trailing .exe if any
19912  new_path="${new_path/%.exe/}"
19913
19914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19915
19916  # First separate the path from the arguments. This will split at the first
19917  # space.
19918  complete="$CXX"
19919  path="${complete%% *}"
19920  tmp="$complete EOL"
19921  arguments="${tmp#* }"
19922
19923  # Input might be given as Windows format, start by converting to
19924  # unix format.
19925  new_path="$path"
19926
19927  windows_path="$new_path"
19928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19929    unix_path=`$CYGPATH -u "$windows_path"`
19930    new_path="$unix_path"
19931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19933    new_path="$unix_path"
19934  fi
19935
19936
19937  # Now try to locate executable using which
19938  new_path=`$WHICH "$new_path" 2> /dev/null`
19939
19940  if test "x$new_path" = x; then
19941    # Oops. Which didn't find the executable.
19942    # The splitting of arguments from the executable at a space might have been incorrect,
19943    # since paths with space are more likely in Windows. Give it another try with the whole
19944    # argument.
19945    path="$complete"
19946    arguments="EOL"
19947    new_path="$path"
19948
19949  windows_path="$new_path"
19950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19951    unix_path=`$CYGPATH -u "$windows_path"`
19952    new_path="$unix_path"
19953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19955    new_path="$unix_path"
19956  fi
19957
19958
19959    new_path=`$WHICH "$new_path" 2> /dev/null`
19960
19961    if test "x$new_path" = x; then
19962      # It's still not found. Now this is an unrecoverable error.
19963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19964$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19965      has_space=`$ECHO "$complete" | $GREP " "`
19966      if test "x$has_space" != x; then
19967        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19968$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19969      fi
19970      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19971    fi
19972  fi
19973
19974  # Now new_path has a complete unix path to the binary
19975  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19976    # Keep paths in /bin as-is, but remove trailing .exe if any
19977    new_path="${new_path/%.exe/}"
19978    # Do not save /bin paths to all_fixpath_prefixes!
19979  else
19980    # Not in mixed or Windows style, start by that.
19981    new_path=`cmd //c echo $new_path`
19982
19983  input_path="$new_path"
19984  # Check if we need to convert this using DOS-style short mode. If the path
19985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19986  # take no chances and rewrite it.
19987  # Note: m4 eats our [], so we need to use [ and ] instead.
19988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19989  if test "x$has_forbidden_chars" != x; then
19990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19992  fi
19993
19994    # Output is in $new_path
19995
19996  windows_path="$new_path"
19997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19998    unix_path=`$CYGPATH -u "$windows_path"`
19999    new_path="$unix_path"
20000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20002    new_path="$unix_path"
20003  fi
20004
20005    # remove trailing .exe if any
20006    new_path="${new_path/%.exe/}"
20007
20008    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20009    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20010  fi
20011
20012  else
20013    # We're on a posix platform. Hooray! :)
20014    # First separate the path from the arguments. This will split at the first
20015    # space.
20016    complete="$CXX"
20017    path="${complete%% *}"
20018    tmp="$complete EOL"
20019    arguments="${tmp#* }"
20020
20021    # Cannot rely on the command "which" here since it doesn't always work.
20022    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20023    if test -z "$is_absolute_path"; then
20024      # Path to executable is not absolute. Find it.
20025      IFS_save="$IFS"
20026      IFS=:
20027      for p in $PATH; do
20028        if test -f "$p/$path" && test -x "$p/$path"; then
20029          new_path="$p/$path"
20030          break
20031        fi
20032      done
20033      IFS="$IFS_save"
20034    else
20035      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20036$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20037      new_path="$path"
20038    fi
20039
20040    if test "x$new_path" = x; then
20041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20042$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20043        has_space=`$ECHO "$complete" | $GREP " "`
20044        if test "x$has_space" != x; then
20045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20047        fi
20048        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20049      fi
20050  fi
20051
20052      # Now join together the path and the arguments once again
20053      if test "x$arguments" != xEOL; then
20054        new_complete="$new_path ${arguments% *}"
20055      else
20056        new_complete="$new_path"
20057      fi
20058
20059  if test "x$complete" != "x$new_complete"; then
20060      CXX="$new_complete"
20061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20062$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20063    fi
20064
20065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20066$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20067  TEST_COMPILER="$CXX"
20068
20069    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20070        # Follow a chain of symbolic links. Use readlink
20071        # where it exists, else fall back to horribly
20072        # complicated shell code.
20073        if test "x$READLINK_TESTED" != yes; then
20074            # On MacOSX there is a readlink tool with a different
20075            # purpose than the GNU readlink tool. Check the found readlink.
20076            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20077            if test "x$ISGNU" = x; then
20078                 # A readlink that we do not know how to use.
20079                 # Are there other non-GNU readlinks out there?
20080                 READLINK_TESTED=yes
20081                 READLINK=
20082            fi
20083        fi
20084
20085        if test "x$READLINK" != x; then
20086            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20087        else
20088            # Save the current directory for restoring afterwards
20089            STARTDIR=$PWD
20090            COUNTER=0
20091            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20092            sym_link_file=`$BASENAME $TEST_COMPILER`
20093            # Use the system pwd and not the shell builtin to resolve directory symlinks
20094            cd $sym_link_dir
20095            cd `$THEPWDCMD`
20096            sym_link_dir=`$THEPWDCMD`
20097            # Resolve file symlinks
20098            while test $COUNTER -lt 20; do
20099                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20100                if test "x$ISLINK" == x; then
20101                    # This is not a symbolic link! We are done!
20102                    break
20103                fi
20104                # Again resolve directory symlinks since the target of the just found
20105                # link could be in a different directory
20106                cd `$DIRNAME $ISLINK`
20107                sym_link_dir=`$THEPWDCMD`
20108                sym_link_file=`$BASENAME $ISLINK`
20109                let COUNTER=COUNTER+1
20110            done
20111            cd $STARTDIR
20112            TEST_COMPILER=$sym_link_dir/$sym_link_file
20113        fi
20114    fi
20115
20116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20117$as_echo "$TEST_COMPILER" >&6; }
20118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20119$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20120
20121  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20122  if test "x$COMPILER_BASENAME" = "xccache"; then
20123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20124$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20125    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20126    # We want to control ccache invocation ourselves, so ignore this cc and try
20127    # searching again.
20128
20129    # Remove the path to the fake ccache cc from the PATH
20130    RETRY_COMPILER_SAVED_PATH="$PATH"
20131    COMPILER_DIRNAME=`$DIRNAME $CXX`
20132    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20133
20134    # Try again looking for our compiler
20135    if test -n "$ac_tool_prefix"; then
20136  for ac_prog in $COMPILER_CHECK_LIST
20137  do
20138    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20139set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20141$as_echo_n "checking for $ac_word... " >&6; }
20142if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20143  $as_echo_n "(cached) " >&6
20144else
20145  if test -n "$PROPER_COMPILER_CXX"; then
20146  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20147else
20148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20149for as_dir in $PATH
20150do
20151  IFS=$as_save_IFS
20152  test -z "$as_dir" && as_dir=.
20153    for ac_exec_ext in '' $ac_executable_extensions; do
20154  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20155    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20157    break 2
20158  fi
20159done
20160  done
20161IFS=$as_save_IFS
20162
20163fi
20164fi
20165PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20166if test -n "$PROPER_COMPILER_CXX"; then
20167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20168$as_echo "$PROPER_COMPILER_CXX" >&6; }
20169else
20170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20171$as_echo "no" >&6; }
20172fi
20173
20174
20175    test -n "$PROPER_COMPILER_CXX" && break
20176  done
20177fi
20178if test -z "$PROPER_COMPILER_CXX"; then
20179  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20180  for ac_prog in $COMPILER_CHECK_LIST
20181do
20182  # Extract the first word of "$ac_prog", so it can be a program name with args.
20183set dummy $ac_prog; ac_word=$2
20184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20185$as_echo_n "checking for $ac_word... " >&6; }
20186if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20187  $as_echo_n "(cached) " >&6
20188else
20189  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20190  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20191else
20192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20193for as_dir in $PATH
20194do
20195  IFS=$as_save_IFS
20196  test -z "$as_dir" && as_dir=.
20197    for ac_exec_ext in '' $ac_executable_extensions; do
20198  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20199    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20201    break 2
20202  fi
20203done
20204  done
20205IFS=$as_save_IFS
20206
20207fi
20208fi
20209ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20210if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20212$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20213else
20214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20215$as_echo "no" >&6; }
20216fi
20217
20218
20219  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20220done
20221
20222  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20223    PROPER_COMPILER_CXX=""
20224  else
20225    case $cross_compiling:$ac_tool_warned in
20226yes:)
20227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20229ac_tool_warned=yes ;;
20230esac
20231    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20232  fi
20233fi
20234
20235
20236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20237
20238  # First separate the path from the arguments. This will split at the first
20239  # space.
20240  complete="$PROPER_COMPILER_CXX"
20241  path="${complete%% *}"
20242  tmp="$complete EOL"
20243  arguments="${tmp#* }"
20244
20245  # Input might be given as Windows format, start by converting to
20246  # unix format.
20247  new_path=`$CYGPATH -u "$path"`
20248
20249  # Now try to locate executable using which
20250  new_path=`$WHICH "$new_path" 2> /dev/null`
20251  # bat and cmd files are not always considered executable in cygwin causing which
20252  # to not find them
20253  if test "x$new_path" = x \
20254           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20255           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20256    new_path=`$CYGPATH -u "$path"`
20257  fi
20258  if test "x$new_path" = x; then
20259    # Oops. Which didn't find the executable.
20260    # The splitting of arguments from the executable at a space might have been incorrect,
20261    # since paths with space are more likely in Windows. Give it another try with the whole
20262    # argument.
20263    path="$complete"
20264    arguments="EOL"
20265    new_path=`$CYGPATH -u "$path"`
20266    new_path=`$WHICH "$new_path" 2> /dev/null`
20267    # bat and cmd files are not always considered executable in cygwin causing which
20268    # to not find them
20269    if test "x$new_path" = x \
20270             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20271             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20272      new_path=`$CYGPATH -u "$path"`
20273    fi
20274    if test "x$new_path" = x; then
20275      # It's still not found. Now this is an unrecoverable error.
20276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20277$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20278      has_space=`$ECHO "$complete" | $GREP " "`
20279      if test "x$has_space" != x; then
20280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20282      fi
20283      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20284    fi
20285  fi
20286
20287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20290  # "foo.exe" is OK but "foo" is an error.
20291  #
20292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20293  # It is also a way to make sure we got the proper file name for the real test later on.
20294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20295  if test "x$test_shortpath" = x; then
20296    # Short path failed, file does not exist as specified.
20297    # Try adding .exe or .cmd
20298    if test -f "${new_path}.exe"; then
20299       input_to_shortpath="${new_path}.exe"
20300    elif test -f "${new_path}.cmd"; then
20301       input_to_shortpath="${new_path}.cmd"
20302    else
20303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20304$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20307      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20308    fi
20309  else
20310    input_to_shortpath="$new_path"
20311  fi
20312
20313  # Call helper function which possibly converts this using DOS-style short mode.
20314  # If so, the updated path is stored in $new_path.
20315  new_path="$input_to_shortpath"
20316
20317  input_path="$input_to_shortpath"
20318  # Check if we need to convert this using DOS-style short mode. If the path
20319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20320  # take no chances and rewrite it.
20321  # Note: m4 eats our [], so we need to use [ and ] instead.
20322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20323  if test "x$has_forbidden_chars" != x; then
20324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20328      # Going to short mode and back again did indeed matter. Since short mode is
20329      # case insensitive, let's make it lowercase to improve readability.
20330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20331      # Now convert it back to Unix-stile (cygpath)
20332      input_path=`$CYGPATH -u "$shortmode_path"`
20333      new_path="$input_path"
20334    fi
20335  fi
20336
20337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20338  if test "x$test_cygdrive_prefix" = x; then
20339    # As a simple fix, exclude /usr/bin since it's not a real path.
20340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20342      # a path prefixed by /cygdrive for fixpath to work.
20343      new_path="$CYGWIN_ROOT_PATH$input_path"
20344    fi
20345  fi
20346
20347  # remove trailing .exe if any
20348  new_path="${new_path/%.exe/}"
20349
20350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20351
20352  # First separate the path from the arguments. This will split at the first
20353  # space.
20354  complete="$PROPER_COMPILER_CXX"
20355  path="${complete%% *}"
20356  tmp="$complete EOL"
20357  arguments="${tmp#* }"
20358
20359  # Input might be given as Windows format, start by converting to
20360  # unix format.
20361  new_path="$path"
20362
20363  windows_path="$new_path"
20364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20365    unix_path=`$CYGPATH -u "$windows_path"`
20366    new_path="$unix_path"
20367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20369    new_path="$unix_path"
20370  fi
20371
20372
20373  # Now try to locate executable using which
20374  new_path=`$WHICH "$new_path" 2> /dev/null`
20375
20376  if test "x$new_path" = x; then
20377    # Oops. Which didn't find the executable.
20378    # The splitting of arguments from the executable at a space might have been incorrect,
20379    # since paths with space are more likely in Windows. Give it another try with the whole
20380    # argument.
20381    path="$complete"
20382    arguments="EOL"
20383    new_path="$path"
20384
20385  windows_path="$new_path"
20386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20387    unix_path=`$CYGPATH -u "$windows_path"`
20388    new_path="$unix_path"
20389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20391    new_path="$unix_path"
20392  fi
20393
20394
20395    new_path=`$WHICH "$new_path" 2> /dev/null`
20396
20397    if test "x$new_path" = x; then
20398      # It's still not found. Now this is an unrecoverable error.
20399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20400$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20401      has_space=`$ECHO "$complete" | $GREP " "`
20402      if test "x$has_space" != x; then
20403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20405      fi
20406      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20407    fi
20408  fi
20409
20410  # Now new_path has a complete unix path to the binary
20411  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20412    # Keep paths in /bin as-is, but remove trailing .exe if any
20413    new_path="${new_path/%.exe/}"
20414    # Do not save /bin paths to all_fixpath_prefixes!
20415  else
20416    # Not in mixed or Windows style, start by that.
20417    new_path=`cmd //c echo $new_path`
20418
20419  input_path="$new_path"
20420  # Check if we need to convert this using DOS-style short mode. If the path
20421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20422  # take no chances and rewrite it.
20423  # Note: m4 eats our [], so we need to use [ and ] instead.
20424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20425  if test "x$has_forbidden_chars" != x; then
20426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20428  fi
20429
20430    # Output is in $new_path
20431
20432  windows_path="$new_path"
20433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20434    unix_path=`$CYGPATH -u "$windows_path"`
20435    new_path="$unix_path"
20436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20438    new_path="$unix_path"
20439  fi
20440
20441    # remove trailing .exe if any
20442    new_path="${new_path/%.exe/}"
20443
20444    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20445    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20446  fi
20447
20448  else
20449    # We're on a posix platform. Hooray! :)
20450    # First separate the path from the arguments. This will split at the first
20451    # space.
20452    complete="$PROPER_COMPILER_CXX"
20453    path="${complete%% *}"
20454    tmp="$complete EOL"
20455    arguments="${tmp#* }"
20456
20457    # Cannot rely on the command "which" here since it doesn't always work.
20458    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20459    if test -z "$is_absolute_path"; then
20460      # Path to executable is not absolute. Find it.
20461      IFS_save="$IFS"
20462      IFS=:
20463      for p in $PATH; do
20464        if test -f "$p/$path" && test -x "$p/$path"; then
20465          new_path="$p/$path"
20466          break
20467        fi
20468      done
20469      IFS="$IFS_save"
20470    else
20471      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20472$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20473      new_path="$path"
20474    fi
20475
20476    if test "x$new_path" = x; then
20477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20478$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20479        has_space=`$ECHO "$complete" | $GREP " "`
20480        if test "x$has_space" != x; then
20481          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20482$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20483        fi
20484        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20485      fi
20486  fi
20487
20488      # Now join together the path and the arguments once again
20489      if test "x$arguments" != xEOL; then
20490        new_complete="$new_path ${arguments% *}"
20491      else
20492        new_complete="$new_path"
20493      fi
20494
20495  if test "x$complete" != "x$new_complete"; then
20496      PROPER_COMPILER_CXX="$new_complete"
20497      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20498$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20499    fi
20500
20501    PATH="$RETRY_COMPILER_SAVED_PATH"
20502
20503    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20504$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20505
20506    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20507        # Follow a chain of symbolic links. Use readlink
20508        # where it exists, else fall back to horribly
20509        # complicated shell code.
20510        if test "x$READLINK_TESTED" != yes; then
20511            # On MacOSX there is a readlink tool with a different
20512            # purpose than the GNU readlink tool. Check the found readlink.
20513            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20514            if test "x$ISGNU" = x; then
20515                 # A readlink that we do not know how to use.
20516                 # Are there other non-GNU readlinks out there?
20517                 READLINK_TESTED=yes
20518                 READLINK=
20519            fi
20520        fi
20521
20522        if test "x$READLINK" != x; then
20523            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20524        else
20525            # Save the current directory for restoring afterwards
20526            STARTDIR=$PWD
20527            COUNTER=0
20528            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20529            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20530            # Use the system pwd and not the shell builtin to resolve directory symlinks
20531            cd $sym_link_dir
20532            cd `$THEPWDCMD`
20533            sym_link_dir=`$THEPWDCMD`
20534            # Resolve file symlinks
20535            while test $COUNTER -lt 20; do
20536                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20537                if test "x$ISLINK" == x; then
20538                    # This is not a symbolic link! We are done!
20539                    break
20540                fi
20541                # Again resolve directory symlinks since the target of the just found
20542                # link could be in a different directory
20543                cd `$DIRNAME $ISLINK`
20544                sym_link_dir=`$THEPWDCMD`
20545                sym_link_file=`$BASENAME $ISLINK`
20546                let COUNTER=COUNTER+1
20547            done
20548            cd $STARTDIR
20549            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20550        fi
20551    fi
20552
20553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20554$as_echo "$PROPER_COMPILER_CXX" >&6; }
20555    CXX="$PROPER_COMPILER_CXX"
20556  else
20557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20558$as_echo "no, keeping CXX" >&6; }
20559    CXX="$TEST_COMPILER"
20560  fi
20561
20562  COMPILER=$CXX
20563  COMPILER_NAME=$COMPILER_NAME
20564
20565  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20566    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20567    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20568    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20569    if test $? -ne 0; then
20570      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20571
20572      { $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
20573$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20574      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20575$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20576      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20577    else
20578      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20579      COMPILER_VENDOR="Sun Studio"
20580    fi
20581  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20582    # First line typically looks something like:
20583    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20584    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20585    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20586    COMPILER_VENDOR="Microsoft CL.EXE"
20587    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20588    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20589      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20590        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20591      fi
20592    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20593      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20594        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20595      fi
20596    fi
20597  else
20598    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20599    # Check that this is likely to be GCC.
20600    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20601    if test $? -ne 0; then
20602      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20603$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20604      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20605$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20606      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20607    fi
20608
20609    # First line typically looks something like:
20610    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20611    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20612    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20613  fi
20614  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20615  CXX_VERSION="$COMPILER_VERSION"
20616  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20617  CXX_VENDOR="$COMPILER_VENDOR"
20618
20619  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20620$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20621
20622
20623# Now that we have resolved CXX ourself, let autoconf have it's go at it
20624ac_ext=cpp
20625ac_cpp='$CXXCPP $CPPFLAGS'
20626ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20627ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20628ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20629if test -z "$CXX"; then
20630  if test -n "$CCC"; then
20631    CXX=$CCC
20632  else
20633    if test -n "$ac_tool_prefix"; then
20634  for ac_prog in $CXX
20635  do
20636    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20637set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20639$as_echo_n "checking for $ac_word... " >&6; }
20640if test "${ac_cv_prog_CXX+set}" = set; then :
20641  $as_echo_n "(cached) " >&6
20642else
20643  if test -n "$CXX"; then
20644  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20645else
20646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20647for as_dir in $PATH
20648do
20649  IFS=$as_save_IFS
20650  test -z "$as_dir" && as_dir=.
20651    for ac_exec_ext in '' $ac_executable_extensions; do
20652  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20653    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20655    break 2
20656  fi
20657done
20658  done
20659IFS=$as_save_IFS
20660
20661fi
20662fi
20663CXX=$ac_cv_prog_CXX
20664if test -n "$CXX"; then
20665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20666$as_echo "$CXX" >&6; }
20667else
20668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20669$as_echo "no" >&6; }
20670fi
20671
20672
20673    test -n "$CXX" && break
20674  done
20675fi
20676if test -z "$CXX"; then
20677  ac_ct_CXX=$CXX
20678  for ac_prog in $CXX
20679do
20680  # Extract the first word of "$ac_prog", so it can be a program name with args.
20681set dummy $ac_prog; ac_word=$2
20682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20683$as_echo_n "checking for $ac_word... " >&6; }
20684if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20685  $as_echo_n "(cached) " >&6
20686else
20687  if test -n "$ac_ct_CXX"; then
20688  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20689else
20690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20691for as_dir in $PATH
20692do
20693  IFS=$as_save_IFS
20694  test -z "$as_dir" && as_dir=.
20695    for ac_exec_ext in '' $ac_executable_extensions; do
20696  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20697    ac_cv_prog_ac_ct_CXX="$ac_prog"
20698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20699    break 2
20700  fi
20701done
20702  done
20703IFS=$as_save_IFS
20704
20705fi
20706fi
20707ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20708if test -n "$ac_ct_CXX"; then
20709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20710$as_echo "$ac_ct_CXX" >&6; }
20711else
20712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20713$as_echo "no" >&6; }
20714fi
20715
20716
20717  test -n "$ac_ct_CXX" && break
20718done
20719
20720  if test "x$ac_ct_CXX" = x; then
20721    CXX="g++"
20722  else
20723    case $cross_compiling:$ac_tool_warned in
20724yes:)
20725{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20726$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20727ac_tool_warned=yes ;;
20728esac
20729    CXX=$ac_ct_CXX
20730  fi
20731fi
20732
20733  fi
20734fi
20735# Provide some information about the compiler.
20736$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20737set X $ac_compile
20738ac_compiler=$2
20739for ac_option in --version -v -V -qversion; do
20740  { { ac_try="$ac_compiler $ac_option >&5"
20741case "(($ac_try" in
20742  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20743  *) ac_try_echo=$ac_try;;
20744esac
20745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20746$as_echo "$ac_try_echo"; } >&5
20747  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20748  ac_status=$?
20749  if test -s conftest.err; then
20750    sed '10a\
20751... rest of stderr output deleted ...
20752         10q' conftest.err >conftest.er1
20753    cat conftest.er1 >&5
20754  fi
20755  rm -f conftest.er1 conftest.err
20756  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20757  test $ac_status = 0; }
20758done
20759
20760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20761$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20762if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20763  $as_echo_n "(cached) " >&6
20764else
20765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20766/* end confdefs.h.  */
20767
20768int
20769main ()
20770{
20771#ifndef __GNUC__
20772       choke me
20773#endif
20774
20775  ;
20776  return 0;
20777}
20778_ACEOF
20779if ac_fn_cxx_try_compile "$LINENO"; then :
20780  ac_compiler_gnu=yes
20781else
20782  ac_compiler_gnu=no
20783fi
20784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20785ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20786
20787fi
20788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20789$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20790if test $ac_compiler_gnu = yes; then
20791  GXX=yes
20792else
20793  GXX=
20794fi
20795ac_test_CXXFLAGS=${CXXFLAGS+set}
20796ac_save_CXXFLAGS=$CXXFLAGS
20797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20798$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20799if test "${ac_cv_prog_cxx_g+set}" = set; then :
20800  $as_echo_n "(cached) " >&6
20801else
20802  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20803   ac_cxx_werror_flag=yes
20804   ac_cv_prog_cxx_g=no
20805   CXXFLAGS="-g"
20806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20807/* end confdefs.h.  */
20808
20809int
20810main ()
20811{
20812
20813  ;
20814  return 0;
20815}
20816_ACEOF
20817if ac_fn_cxx_try_compile "$LINENO"; then :
20818  ac_cv_prog_cxx_g=yes
20819else
20820  CXXFLAGS=""
20821      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20822/* end confdefs.h.  */
20823
20824int
20825main ()
20826{
20827
20828  ;
20829  return 0;
20830}
20831_ACEOF
20832if ac_fn_cxx_try_compile "$LINENO"; then :
20833
20834else
20835  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20836	 CXXFLAGS="-g"
20837	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20838/* end confdefs.h.  */
20839
20840int
20841main ()
20842{
20843
20844  ;
20845  return 0;
20846}
20847_ACEOF
20848if ac_fn_cxx_try_compile "$LINENO"; then :
20849  ac_cv_prog_cxx_g=yes
20850fi
20851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20852fi
20853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20854fi
20855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20856   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20857fi
20858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20859$as_echo "$ac_cv_prog_cxx_g" >&6; }
20860if test "$ac_test_CXXFLAGS" = set; then
20861  CXXFLAGS=$ac_save_CXXFLAGS
20862elif test $ac_cv_prog_cxx_g = yes; then
20863  if test "$GXX" = yes; then
20864    CXXFLAGS="-g -O2"
20865  else
20866    CXXFLAGS="-g"
20867  fi
20868else
20869  if test "$GXX" = yes; then
20870    CXXFLAGS="-O2"
20871  else
20872    CXXFLAGS=
20873  fi
20874fi
20875ac_ext=cpp
20876ac_cpp='$CXXCPP $CPPFLAGS'
20877ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20878ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20879ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20880
20881
20882### Locate other tools
20883
20884if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20885    ac_ext=m
20886ac_cpp='$OBJCPP $CPPFLAGS'
20887ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20888ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20889ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20890if test -n "$ac_tool_prefix"; then
20891  for ac_prog in gcc objcc objc cc CC
20892  do
20893    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20894set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20896$as_echo_n "checking for $ac_word... " >&6; }
20897if test "${ac_cv_prog_OBJC+set}" = set; then :
20898  $as_echo_n "(cached) " >&6
20899else
20900  if test -n "$OBJC"; then
20901  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20902else
20903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20904for as_dir in $PATH
20905do
20906  IFS=$as_save_IFS
20907  test -z "$as_dir" && as_dir=.
20908    for ac_exec_ext in '' $ac_executable_extensions; do
20909  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20910    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20912    break 2
20913  fi
20914done
20915  done
20916IFS=$as_save_IFS
20917
20918fi
20919fi
20920OBJC=$ac_cv_prog_OBJC
20921if test -n "$OBJC"; then
20922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20923$as_echo "$OBJC" >&6; }
20924else
20925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20926$as_echo "no" >&6; }
20927fi
20928
20929
20930    test -n "$OBJC" && break
20931  done
20932fi
20933if test -z "$OBJC"; then
20934  ac_ct_OBJC=$OBJC
20935  for ac_prog in gcc objcc objc cc CC
20936do
20937  # Extract the first word of "$ac_prog", so it can be a program name with args.
20938set dummy $ac_prog; ac_word=$2
20939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20940$as_echo_n "checking for $ac_word... " >&6; }
20941if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20942  $as_echo_n "(cached) " >&6
20943else
20944  if test -n "$ac_ct_OBJC"; then
20945  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20946else
20947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20948for as_dir in $PATH
20949do
20950  IFS=$as_save_IFS
20951  test -z "$as_dir" && as_dir=.
20952    for ac_exec_ext in '' $ac_executable_extensions; do
20953  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20954    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20956    break 2
20957  fi
20958done
20959  done
20960IFS=$as_save_IFS
20961
20962fi
20963fi
20964ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20965if test -n "$ac_ct_OBJC"; then
20966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20967$as_echo "$ac_ct_OBJC" >&6; }
20968else
20969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20970$as_echo "no" >&6; }
20971fi
20972
20973
20974  test -n "$ac_ct_OBJC" && break
20975done
20976
20977  if test "x$ac_ct_OBJC" = x; then
20978    OBJC="gcc"
20979  else
20980    case $cross_compiling:$ac_tool_warned in
20981yes:)
20982{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20983$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20984ac_tool_warned=yes ;;
20985esac
20986    OBJC=$ac_ct_OBJC
20987  fi
20988fi
20989
20990# Provide some information about the compiler.
20991$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20992set X $ac_compile
20993ac_compiler=$2
20994for ac_option in --version -v -V -qversion; do
20995  { { ac_try="$ac_compiler $ac_option >&5"
20996case "(($ac_try" in
20997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20998  *) ac_try_echo=$ac_try;;
20999esac
21000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21001$as_echo "$ac_try_echo"; } >&5
21002  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21003  ac_status=$?
21004  if test -s conftest.err; then
21005    sed '10a\
21006... rest of stderr output deleted ...
21007         10q' conftest.err >conftest.er1
21008    cat conftest.er1 >&5
21009  fi
21010  rm -f conftest.er1 conftest.err
21011  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21012  test $ac_status = 0; }
21013done
21014
21015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21016$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21017if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21018  $as_echo_n "(cached) " >&6
21019else
21020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21021/* end confdefs.h.  */
21022
21023int
21024main ()
21025{
21026#ifndef __GNUC__
21027       choke me
21028#endif
21029
21030  ;
21031  return 0;
21032}
21033_ACEOF
21034if ac_fn_objc_try_compile "$LINENO"; then :
21035  ac_compiler_gnu=yes
21036else
21037  ac_compiler_gnu=no
21038fi
21039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21040ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21041
21042fi
21043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21044$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21045if test $ac_compiler_gnu = yes; then
21046  GOBJC=yes
21047else
21048  GOBJC=
21049fi
21050ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21051ac_save_OBJCFLAGS=$OBJCFLAGS
21052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21053$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21054if test "${ac_cv_prog_objc_g+set}" = set; then :
21055  $as_echo_n "(cached) " >&6
21056else
21057  ac_save_objc_werror_flag=$ac_objc_werror_flag
21058   ac_objc_werror_flag=yes
21059   ac_cv_prog_objc_g=no
21060   OBJCFLAGS="-g"
21061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21062/* end confdefs.h.  */
21063
21064int
21065main ()
21066{
21067
21068  ;
21069  return 0;
21070}
21071_ACEOF
21072if ac_fn_objc_try_compile "$LINENO"; then :
21073  ac_cv_prog_objc_g=yes
21074else
21075  OBJCFLAGS=""
21076      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21077/* end confdefs.h.  */
21078
21079int
21080main ()
21081{
21082
21083  ;
21084  return 0;
21085}
21086_ACEOF
21087if ac_fn_objc_try_compile "$LINENO"; then :
21088
21089else
21090  ac_objc_werror_flag=$ac_save_objc_werror_flag
21091	 OBJCFLAGS="-g"
21092	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21093/* end confdefs.h.  */
21094
21095int
21096main ()
21097{
21098
21099  ;
21100  return 0;
21101}
21102_ACEOF
21103if ac_fn_objc_try_compile "$LINENO"; then :
21104  ac_cv_prog_objc_g=yes
21105fi
21106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21107fi
21108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21109fi
21110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21111   ac_objc_werror_flag=$ac_save_objc_werror_flag
21112fi
21113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21114$as_echo "$ac_cv_prog_objc_g" >&6; }
21115if test "$ac_test_OBJCFLAGS" = set; then
21116  OBJCFLAGS=$ac_save_OBJCFLAGS
21117elif test $ac_cv_prog_objc_g = yes; then
21118  if test "$GOBJC" = yes; then
21119    OBJCFLAGS="-g -O2"
21120  else
21121    OBJCFLAGS="-g"
21122  fi
21123else
21124  if test "$GOBJC" = yes; then
21125    OBJCFLAGS="-O2"
21126  else
21127    OBJCFLAGS=
21128  fi
21129fi
21130ac_ext=cpp
21131ac_cpp='$CXXCPP $CPPFLAGS'
21132ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21133ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21134ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21135
21136
21137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21138
21139  # First separate the path from the arguments. This will split at the first
21140  # space.
21141  complete="$OBJC"
21142  path="${complete%% *}"
21143  tmp="$complete EOL"
21144  arguments="${tmp#* }"
21145
21146  # Input might be given as Windows format, start by converting to
21147  # unix format.
21148  new_path=`$CYGPATH -u "$path"`
21149
21150  # Now try to locate executable using which
21151  new_path=`$WHICH "$new_path" 2> /dev/null`
21152  # bat and cmd files are not always considered executable in cygwin causing which
21153  # to not find them
21154  if test "x$new_path" = x \
21155           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21156           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21157    new_path=`$CYGPATH -u "$path"`
21158  fi
21159  if test "x$new_path" = x; then
21160    # Oops. Which didn't find the executable.
21161    # The splitting of arguments from the executable at a space might have been incorrect,
21162    # since paths with space are more likely in Windows. Give it another try with the whole
21163    # argument.
21164    path="$complete"
21165    arguments="EOL"
21166    new_path=`$CYGPATH -u "$path"`
21167    new_path=`$WHICH "$new_path" 2> /dev/null`
21168    # bat and cmd files are not always considered executable in cygwin causing which
21169    # to not find them
21170    if test "x$new_path" = x \
21171             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21172             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21173      new_path=`$CYGPATH -u "$path"`
21174    fi
21175    if test "x$new_path" = x; then
21176      # It's still not found. Now this is an unrecoverable error.
21177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21178$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21179      has_space=`$ECHO "$complete" | $GREP " "`
21180      if test "x$has_space" != x; then
21181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21183      fi
21184      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21185    fi
21186  fi
21187
21188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21191  # "foo.exe" is OK but "foo" is an error.
21192  #
21193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21194  # It is also a way to make sure we got the proper file name for the real test later on.
21195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21196  if test "x$test_shortpath" = x; then
21197    # Short path failed, file does not exist as specified.
21198    # Try adding .exe or .cmd
21199    if test -f "${new_path}.exe"; then
21200       input_to_shortpath="${new_path}.exe"
21201    elif test -f "${new_path}.cmd"; then
21202       input_to_shortpath="${new_path}.cmd"
21203    else
21204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21205$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21206      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21207$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21208      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21209    fi
21210  else
21211    input_to_shortpath="$new_path"
21212  fi
21213
21214  # Call helper function which possibly converts this using DOS-style short mode.
21215  # If so, the updated path is stored in $new_path.
21216  new_path="$input_to_shortpath"
21217
21218  input_path="$input_to_shortpath"
21219  # Check if we need to convert this using DOS-style short mode. If the path
21220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21221  # take no chances and rewrite it.
21222  # Note: m4 eats our [], so we need to use [ and ] instead.
21223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21224  if test "x$has_forbidden_chars" != x; then
21225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21229      # Going to short mode and back again did indeed matter. Since short mode is
21230      # case insensitive, let's make it lowercase to improve readability.
21231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21232      # Now convert it back to Unix-stile (cygpath)
21233      input_path=`$CYGPATH -u "$shortmode_path"`
21234      new_path="$input_path"
21235    fi
21236  fi
21237
21238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21239  if test "x$test_cygdrive_prefix" = x; then
21240    # As a simple fix, exclude /usr/bin since it's not a real path.
21241    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21243      # a path prefixed by /cygdrive for fixpath to work.
21244      new_path="$CYGWIN_ROOT_PATH$input_path"
21245    fi
21246  fi
21247
21248  # remove trailing .exe if any
21249  new_path="${new_path/%.exe/}"
21250
21251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21252
21253  # First separate the path from the arguments. This will split at the first
21254  # space.
21255  complete="$OBJC"
21256  path="${complete%% *}"
21257  tmp="$complete EOL"
21258  arguments="${tmp#* }"
21259
21260  # Input might be given as Windows format, start by converting to
21261  # unix format.
21262  new_path="$path"
21263
21264  windows_path="$new_path"
21265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21266    unix_path=`$CYGPATH -u "$windows_path"`
21267    new_path="$unix_path"
21268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21270    new_path="$unix_path"
21271  fi
21272
21273
21274  # Now try to locate executable using which
21275  new_path=`$WHICH "$new_path" 2> /dev/null`
21276
21277  if test "x$new_path" = x; then
21278    # Oops. Which didn't find the executable.
21279    # The splitting of arguments from the executable at a space might have been incorrect,
21280    # since paths with space are more likely in Windows. Give it another try with the whole
21281    # argument.
21282    path="$complete"
21283    arguments="EOL"
21284    new_path="$path"
21285
21286  windows_path="$new_path"
21287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21288    unix_path=`$CYGPATH -u "$windows_path"`
21289    new_path="$unix_path"
21290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21292    new_path="$unix_path"
21293  fi
21294
21295
21296    new_path=`$WHICH "$new_path" 2> /dev/null`
21297
21298    if test "x$new_path" = x; then
21299      # It's still not found. Now this is an unrecoverable error.
21300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21301$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21302      has_space=`$ECHO "$complete" | $GREP " "`
21303      if test "x$has_space" != x; then
21304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21306      fi
21307      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21308    fi
21309  fi
21310
21311  # Now new_path has a complete unix path to the binary
21312  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21313    # Keep paths in /bin as-is, but remove trailing .exe if any
21314    new_path="${new_path/%.exe/}"
21315    # Do not save /bin paths to all_fixpath_prefixes!
21316  else
21317    # Not in mixed or Windows style, start by that.
21318    new_path=`cmd //c echo $new_path`
21319
21320  input_path="$new_path"
21321  # Check if we need to convert this using DOS-style short mode. If the path
21322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21323  # take no chances and rewrite it.
21324  # Note: m4 eats our [], so we need to use [ and ] instead.
21325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21326  if test "x$has_forbidden_chars" != x; then
21327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21329  fi
21330
21331    # Output is in $new_path
21332
21333  windows_path="$new_path"
21334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21335    unix_path=`$CYGPATH -u "$windows_path"`
21336    new_path="$unix_path"
21337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21339    new_path="$unix_path"
21340  fi
21341
21342    # remove trailing .exe if any
21343    new_path="${new_path/%.exe/}"
21344
21345    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21346    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21347  fi
21348
21349  else
21350    # We're on a posix platform. Hooray! :)
21351    # First separate the path from the arguments. This will split at the first
21352    # space.
21353    complete="$OBJC"
21354    path="${complete%% *}"
21355    tmp="$complete EOL"
21356    arguments="${tmp#* }"
21357
21358    # Cannot rely on the command "which" here since it doesn't always work.
21359    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21360    if test -z "$is_absolute_path"; then
21361      # Path to executable is not absolute. Find it.
21362      IFS_save="$IFS"
21363      IFS=:
21364      for p in $PATH; do
21365        if test -f "$p/$path" && test -x "$p/$path"; then
21366          new_path="$p/$path"
21367          break
21368        fi
21369      done
21370      IFS="$IFS_save"
21371    else
21372      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21373$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21374      new_path="$path"
21375    fi
21376
21377    if test "x$new_path" = x; then
21378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21379$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21380        has_space=`$ECHO "$complete" | $GREP " "`
21381        if test "x$has_space" != x; then
21382          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21383$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21384        fi
21385        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21386      fi
21387  fi
21388
21389      # Now join together the path and the arguments once again
21390      if test "x$arguments" != xEOL; then
21391        new_complete="$new_path ${arguments% *}"
21392      else
21393        new_complete="$new_path"
21394      fi
21395
21396  if test "x$complete" != "x$new_complete"; then
21397      OBJC="$new_complete"
21398      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21399$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21400    fi
21401
21402else
21403    OBJC=
21404fi
21405
21406# Restore the flags to the user specified values.
21407# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21408CFLAGS="$ORG_CFLAGS"
21409CXXFLAGS="$ORG_CXXFLAGS"
21410OBJCFLAGS="$ORG_OBJCFLAGS"
21411
21412LD="$CC"
21413LDEXE="$CC"
21414LDCXX="$CXX"
21415LDEXECXX="$CXX"
21416
21417# LDEXE is the linker to use, when creating executables.
21418
21419# Linking C++ libraries.
21420
21421# Linking C++ executables.
21422
21423
21424if test "x$OPENJDK_TARGET_OS" != xwindows; then
21425    if test -n "$ac_tool_prefix"; then
21426  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21427set dummy ${ac_tool_prefix}ar; ac_word=$2
21428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21429$as_echo_n "checking for $ac_word... " >&6; }
21430if test "${ac_cv_prog_AR+set}" = set; then :
21431  $as_echo_n "(cached) " >&6
21432else
21433  if test -n "$AR"; then
21434  ac_cv_prog_AR="$AR" # Let the user override the test.
21435else
21436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21437for as_dir in $PATH
21438do
21439  IFS=$as_save_IFS
21440  test -z "$as_dir" && as_dir=.
21441    for ac_exec_ext in '' $ac_executable_extensions; do
21442  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21443    ac_cv_prog_AR="${ac_tool_prefix}ar"
21444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21445    break 2
21446  fi
21447done
21448  done
21449IFS=$as_save_IFS
21450
21451fi
21452fi
21453AR=$ac_cv_prog_AR
21454if test -n "$AR"; then
21455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21456$as_echo "$AR" >&6; }
21457else
21458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21459$as_echo "no" >&6; }
21460fi
21461
21462
21463fi
21464if test -z "$ac_cv_prog_AR"; then
21465  ac_ct_AR=$AR
21466  # Extract the first word of "ar", so it can be a program name with args.
21467set dummy ar; ac_word=$2
21468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21469$as_echo_n "checking for $ac_word... " >&6; }
21470if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21471  $as_echo_n "(cached) " >&6
21472else
21473  if test -n "$ac_ct_AR"; then
21474  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21475else
21476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21477for as_dir in $PATH
21478do
21479  IFS=$as_save_IFS
21480  test -z "$as_dir" && as_dir=.
21481    for ac_exec_ext in '' $ac_executable_extensions; do
21482  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21483    ac_cv_prog_ac_ct_AR="ar"
21484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21485    break 2
21486  fi
21487done
21488  done
21489IFS=$as_save_IFS
21490
21491fi
21492fi
21493ac_ct_AR=$ac_cv_prog_ac_ct_AR
21494if test -n "$ac_ct_AR"; then
21495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21496$as_echo "$ac_ct_AR" >&6; }
21497else
21498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21499$as_echo "no" >&6; }
21500fi
21501
21502  if test "x$ac_ct_AR" = x; then
21503    AR=""
21504  else
21505    case $cross_compiling:$ac_tool_warned in
21506yes:)
21507{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21508$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21509ac_tool_warned=yes ;;
21510esac
21511    AR=$ac_ct_AR
21512  fi
21513else
21514  AR="$ac_cv_prog_AR"
21515fi
21516
21517
21518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21519
21520  # First separate the path from the arguments. This will split at the first
21521  # space.
21522  complete="$AR"
21523  path="${complete%% *}"
21524  tmp="$complete EOL"
21525  arguments="${tmp#* }"
21526
21527  # Input might be given as Windows format, start by converting to
21528  # unix format.
21529  new_path=`$CYGPATH -u "$path"`
21530
21531  # Now try to locate executable using which
21532  new_path=`$WHICH "$new_path" 2> /dev/null`
21533  # bat and cmd files are not always considered executable in cygwin causing which
21534  # to not find them
21535  if test "x$new_path" = x \
21536           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21537           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21538    new_path=`$CYGPATH -u "$path"`
21539  fi
21540  if test "x$new_path" = x; then
21541    # Oops. Which didn't find the executable.
21542    # The splitting of arguments from the executable at a space might have been incorrect,
21543    # since paths with space are more likely in Windows. Give it another try with the whole
21544    # argument.
21545    path="$complete"
21546    arguments="EOL"
21547    new_path=`$CYGPATH -u "$path"`
21548    new_path=`$WHICH "$new_path" 2> /dev/null`
21549    # bat and cmd files are not always considered executable in cygwin causing which
21550    # to not find them
21551    if test "x$new_path" = x \
21552             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21553             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21554      new_path=`$CYGPATH -u "$path"`
21555    fi
21556    if test "x$new_path" = x; then
21557      # It's still not found. Now this is an unrecoverable error.
21558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21559$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21560      has_space=`$ECHO "$complete" | $GREP " "`
21561      if test "x$has_space" != x; then
21562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21564      fi
21565      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21566    fi
21567  fi
21568
21569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21572  # "foo.exe" is OK but "foo" is an error.
21573  #
21574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21575  # It is also a way to make sure we got the proper file name for the real test later on.
21576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21577  if test "x$test_shortpath" = x; then
21578    # Short path failed, file does not exist as specified.
21579    # Try adding .exe or .cmd
21580    if test -f "${new_path}.exe"; then
21581       input_to_shortpath="${new_path}.exe"
21582    elif test -f "${new_path}.cmd"; then
21583       input_to_shortpath="${new_path}.cmd"
21584    else
21585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21586$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21587      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21588$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21589      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21590    fi
21591  else
21592    input_to_shortpath="$new_path"
21593  fi
21594
21595  # Call helper function which possibly converts this using DOS-style short mode.
21596  # If so, the updated path is stored in $new_path.
21597  new_path="$input_to_shortpath"
21598
21599  input_path="$input_to_shortpath"
21600  # Check if we need to convert this using DOS-style short mode. If the path
21601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21602  # take no chances and rewrite it.
21603  # Note: m4 eats our [], so we need to use [ and ] instead.
21604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21605  if test "x$has_forbidden_chars" != x; then
21606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21610      # Going to short mode and back again did indeed matter. Since short mode is
21611      # case insensitive, let's make it lowercase to improve readability.
21612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21613      # Now convert it back to Unix-stile (cygpath)
21614      input_path=`$CYGPATH -u "$shortmode_path"`
21615      new_path="$input_path"
21616    fi
21617  fi
21618
21619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21620  if test "x$test_cygdrive_prefix" = x; then
21621    # As a simple fix, exclude /usr/bin since it's not a real path.
21622    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21624      # a path prefixed by /cygdrive for fixpath to work.
21625      new_path="$CYGWIN_ROOT_PATH$input_path"
21626    fi
21627  fi
21628
21629  # remove trailing .exe if any
21630  new_path="${new_path/%.exe/}"
21631
21632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21633
21634  # First separate the path from the arguments. This will split at the first
21635  # space.
21636  complete="$AR"
21637  path="${complete%% *}"
21638  tmp="$complete EOL"
21639  arguments="${tmp#* }"
21640
21641  # Input might be given as Windows format, start by converting to
21642  # unix format.
21643  new_path="$path"
21644
21645  windows_path="$new_path"
21646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21647    unix_path=`$CYGPATH -u "$windows_path"`
21648    new_path="$unix_path"
21649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21651    new_path="$unix_path"
21652  fi
21653
21654
21655  # Now try to locate executable using which
21656  new_path=`$WHICH "$new_path" 2> /dev/null`
21657
21658  if test "x$new_path" = x; then
21659    # Oops. Which didn't find the executable.
21660    # The splitting of arguments from the executable at a space might have been incorrect,
21661    # since paths with space are more likely in Windows. Give it another try with the whole
21662    # argument.
21663    path="$complete"
21664    arguments="EOL"
21665    new_path="$path"
21666
21667  windows_path="$new_path"
21668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21669    unix_path=`$CYGPATH -u "$windows_path"`
21670    new_path="$unix_path"
21671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21673    new_path="$unix_path"
21674  fi
21675
21676
21677    new_path=`$WHICH "$new_path" 2> /dev/null`
21678
21679    if test "x$new_path" = x; then
21680      # It's still not found. Now this is an unrecoverable error.
21681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21682$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21683      has_space=`$ECHO "$complete" | $GREP " "`
21684      if test "x$has_space" != x; then
21685        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21686$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21687      fi
21688      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21689    fi
21690  fi
21691
21692  # Now new_path has a complete unix path to the binary
21693  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21694    # Keep paths in /bin as-is, but remove trailing .exe if any
21695    new_path="${new_path/%.exe/}"
21696    # Do not save /bin paths to all_fixpath_prefixes!
21697  else
21698    # Not in mixed or Windows style, start by that.
21699    new_path=`cmd //c echo $new_path`
21700
21701  input_path="$new_path"
21702  # Check if we need to convert this using DOS-style short mode. If the path
21703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21704  # take no chances and rewrite it.
21705  # Note: m4 eats our [], so we need to use [ and ] instead.
21706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21707  if test "x$has_forbidden_chars" != x; then
21708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21710  fi
21711
21712    # Output is in $new_path
21713
21714  windows_path="$new_path"
21715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21716    unix_path=`$CYGPATH -u "$windows_path"`
21717    new_path="$unix_path"
21718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21720    new_path="$unix_path"
21721  fi
21722
21723    # remove trailing .exe if any
21724    new_path="${new_path/%.exe/}"
21725
21726    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21727    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21728  fi
21729
21730  else
21731    # We're on a posix platform. Hooray! :)
21732    # First separate the path from the arguments. This will split at the first
21733    # space.
21734    complete="$AR"
21735    path="${complete%% *}"
21736    tmp="$complete EOL"
21737    arguments="${tmp#* }"
21738
21739    # Cannot rely on the command "which" here since it doesn't always work.
21740    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21741    if test -z "$is_absolute_path"; then
21742      # Path to executable is not absolute. Find it.
21743      IFS_save="$IFS"
21744      IFS=:
21745      for p in $PATH; do
21746        if test -f "$p/$path" && test -x "$p/$path"; then
21747          new_path="$p/$path"
21748          break
21749        fi
21750      done
21751      IFS="$IFS_save"
21752    else
21753      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21754$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21755      new_path="$path"
21756    fi
21757
21758    if test "x$new_path" = x; then
21759        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21760$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21761        has_space=`$ECHO "$complete" | $GREP " "`
21762        if test "x$has_space" != x; then
21763          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21764$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21765        fi
21766        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21767      fi
21768  fi
21769
21770      # Now join together the path and the arguments once again
21771      if test "x$arguments" != xEOL; then
21772        new_complete="$new_path ${arguments% *}"
21773      else
21774        new_complete="$new_path"
21775      fi
21776
21777  if test "x$complete" != "x$new_complete"; then
21778      AR="$new_complete"
21779      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21780$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21781    fi
21782
21783fi
21784if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21785    ARFLAGS="-r"
21786else
21787    ARFLAGS=""
21788fi
21789
21790
21791# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21792HOTSPOT_CXX="$CXX"
21793HOTSPOT_LD="$LD"
21794
21795
21796
21797COMPILER_NAME=gcc
21798COMPILER_TYPE=CC
21799if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21800
21801    # For now, assume that we are always compiling using cl.exe.
21802    CC_OUT_OPTION=-Fo
21803    EXE_OUT_OPTION=-out:
21804    LD_OUT_OPTION=-out:
21805    AR_OUT_OPTION=-out:
21806    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21807    # program for something completely different.
21808    # Extract the first word of "link", so it can be a program name with args.
21809set dummy link; ac_word=$2
21810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21811$as_echo_n "checking for $ac_word... " >&6; }
21812if test "${ac_cv_prog_WINLD+set}" = set; then :
21813  $as_echo_n "(cached) " >&6
21814else
21815  if test -n "$WINLD"; then
21816  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21817else
21818  ac_prog_rejected=no
21819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21820for as_dir in $PATH
21821do
21822  IFS=$as_save_IFS
21823  test -z "$as_dir" && as_dir=.
21824    for ac_exec_ext in '' $ac_executable_extensions; do
21825  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21826    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21827       ac_prog_rejected=yes
21828       continue
21829     fi
21830    ac_cv_prog_WINLD="link"
21831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21832    break 2
21833  fi
21834done
21835  done
21836IFS=$as_save_IFS
21837
21838if test $ac_prog_rejected = yes; then
21839  # We found a bogon in the path, so make sure we never use it.
21840  set dummy $ac_cv_prog_WINLD
21841  shift
21842  if test $# != 0; then
21843    # We chose a different compiler from the bogus one.
21844    # However, it has the same basename, so the bogon will be chosen
21845    # first if we set WINLD to just the basename; use the full file name.
21846    shift
21847    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21848  fi
21849fi
21850fi
21851fi
21852WINLD=$ac_cv_prog_WINLD
21853if test -n "$WINLD"; then
21854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21855$as_echo "$WINLD" >&6; }
21856else
21857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21858$as_echo "no" >&6; }
21859fi
21860
21861
21862    # Since we must ignore the first found link, WINLD will contain
21863    # the full path to the link.exe program.
21864
21865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21866
21867  # First separate the path from the arguments. This will split at the first
21868  # space.
21869  complete="$WINLD"
21870  path="${complete%% *}"
21871  tmp="$complete EOL"
21872  arguments="${tmp#* }"
21873
21874  # Input might be given as Windows format, start by converting to
21875  # unix format.
21876  new_path=`$CYGPATH -u "$path"`
21877
21878  # Now try to locate executable using which
21879  new_path=`$WHICH "$new_path" 2> /dev/null`
21880  # bat and cmd files are not always considered executable in cygwin causing which
21881  # to not find them
21882  if test "x$new_path" = x \
21883           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21884           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21885    new_path=`$CYGPATH -u "$path"`
21886  fi
21887  if test "x$new_path" = x; then
21888    # Oops. Which didn't find the executable.
21889    # The splitting of arguments from the executable at a space might have been incorrect,
21890    # since paths with space are more likely in Windows. Give it another try with the whole
21891    # argument.
21892    path="$complete"
21893    arguments="EOL"
21894    new_path=`$CYGPATH -u "$path"`
21895    new_path=`$WHICH "$new_path" 2> /dev/null`
21896    # bat and cmd files are not always considered executable in cygwin causing which
21897    # to not find them
21898    if test "x$new_path" = x \
21899             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21900             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21901      new_path=`$CYGPATH -u "$path"`
21902    fi
21903    if test "x$new_path" = x; then
21904      # It's still not found. Now this is an unrecoverable error.
21905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21906$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21907      has_space=`$ECHO "$complete" | $GREP " "`
21908      if test "x$has_space" != x; then
21909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21911      fi
21912      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21913    fi
21914  fi
21915
21916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21919  # "foo.exe" is OK but "foo" is an error.
21920  #
21921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21922  # It is also a way to make sure we got the proper file name for the real test later on.
21923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21924  if test "x$test_shortpath" = x; then
21925    # Short path failed, file does not exist as specified.
21926    # Try adding .exe or .cmd
21927    if test -f "${new_path}.exe"; then
21928       input_to_shortpath="${new_path}.exe"
21929    elif test -f "${new_path}.cmd"; then
21930       input_to_shortpath="${new_path}.cmd"
21931    else
21932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21933$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21936      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21937    fi
21938  else
21939    input_to_shortpath="$new_path"
21940  fi
21941
21942  # Call helper function which possibly converts this using DOS-style short mode.
21943  # If so, the updated path is stored in $new_path.
21944  new_path="$input_to_shortpath"
21945
21946  input_path="$input_to_shortpath"
21947  # Check if we need to convert this using DOS-style short mode. If the path
21948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21949  # take no chances and rewrite it.
21950  # Note: m4 eats our [], so we need to use [ and ] instead.
21951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21952  if test "x$has_forbidden_chars" != x; then
21953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21957      # Going to short mode and back again did indeed matter. Since short mode is
21958      # case insensitive, let's make it lowercase to improve readability.
21959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21960      # Now convert it back to Unix-stile (cygpath)
21961      input_path=`$CYGPATH -u "$shortmode_path"`
21962      new_path="$input_path"
21963    fi
21964  fi
21965
21966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21967  if test "x$test_cygdrive_prefix" = x; then
21968    # As a simple fix, exclude /usr/bin since it's not a real path.
21969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21971      # a path prefixed by /cygdrive for fixpath to work.
21972      new_path="$CYGWIN_ROOT_PATH$input_path"
21973    fi
21974  fi
21975
21976  # remove trailing .exe if any
21977  new_path="${new_path/%.exe/}"
21978
21979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21980
21981  # First separate the path from the arguments. This will split at the first
21982  # space.
21983  complete="$WINLD"
21984  path="${complete%% *}"
21985  tmp="$complete EOL"
21986  arguments="${tmp#* }"
21987
21988  # Input might be given as Windows format, start by converting to
21989  # unix format.
21990  new_path="$path"
21991
21992  windows_path="$new_path"
21993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21994    unix_path=`$CYGPATH -u "$windows_path"`
21995    new_path="$unix_path"
21996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21998    new_path="$unix_path"
21999  fi
22000
22001
22002  # Now try to locate executable using which
22003  new_path=`$WHICH "$new_path" 2> /dev/null`
22004
22005  if test "x$new_path" = x; then
22006    # Oops. Which didn't find the executable.
22007    # The splitting of arguments from the executable at a space might have been incorrect,
22008    # since paths with space are more likely in Windows. Give it another try with the whole
22009    # argument.
22010    path="$complete"
22011    arguments="EOL"
22012    new_path="$path"
22013
22014  windows_path="$new_path"
22015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22016    unix_path=`$CYGPATH -u "$windows_path"`
22017    new_path="$unix_path"
22018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22020    new_path="$unix_path"
22021  fi
22022
22023
22024    new_path=`$WHICH "$new_path" 2> /dev/null`
22025
22026    if test "x$new_path" = x; then
22027      # It's still not found. Now this is an unrecoverable error.
22028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22029$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22030      has_space=`$ECHO "$complete" | $GREP " "`
22031      if test "x$has_space" != x; then
22032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22034      fi
22035      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22036    fi
22037  fi
22038
22039  # Now new_path has a complete unix path to the binary
22040  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22041    # Keep paths in /bin as-is, but remove trailing .exe if any
22042    new_path="${new_path/%.exe/}"
22043    # Do not save /bin paths to all_fixpath_prefixes!
22044  else
22045    # Not in mixed or Windows style, start by that.
22046    new_path=`cmd //c echo $new_path`
22047
22048  input_path="$new_path"
22049  # Check if we need to convert this using DOS-style short mode. If the path
22050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22051  # take no chances and rewrite it.
22052  # Note: m4 eats our [], so we need to use [ and ] instead.
22053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22054  if test "x$has_forbidden_chars" != x; then
22055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22057  fi
22058
22059    # Output is in $new_path
22060
22061  windows_path="$new_path"
22062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22063    unix_path=`$CYGPATH -u "$windows_path"`
22064    new_path="$unix_path"
22065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22067    new_path="$unix_path"
22068  fi
22069
22070    # remove trailing .exe if any
22071    new_path="${new_path/%.exe/}"
22072
22073    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22074    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22075  fi
22076
22077  else
22078    # We're on a posix platform. Hooray! :)
22079    # First separate the path from the arguments. This will split at the first
22080    # space.
22081    complete="$WINLD"
22082    path="${complete%% *}"
22083    tmp="$complete EOL"
22084    arguments="${tmp#* }"
22085
22086    # Cannot rely on the command "which" here since it doesn't always work.
22087    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22088    if test -z "$is_absolute_path"; then
22089      # Path to executable is not absolute. Find it.
22090      IFS_save="$IFS"
22091      IFS=:
22092      for p in $PATH; do
22093        if test -f "$p/$path" && test -x "$p/$path"; then
22094          new_path="$p/$path"
22095          break
22096        fi
22097      done
22098      IFS="$IFS_save"
22099    else
22100      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22101$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22102      new_path="$path"
22103    fi
22104
22105    if test "x$new_path" = x; then
22106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22107$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22108        has_space=`$ECHO "$complete" | $GREP " "`
22109        if test "x$has_space" != x; then
22110          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22111$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22112        fi
22113        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22114      fi
22115  fi
22116
22117      # Now join together the path and the arguments once again
22118      if test "x$arguments" != xEOL; then
22119        new_complete="$new_path ${arguments% *}"
22120      else
22121        new_complete="$new_path"
22122      fi
22123
22124  if test "x$complete" != "x$new_complete"; then
22125      WINLD="$new_complete"
22126      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22127$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22128    fi
22129
22130    printf "Windows linker was found at $WINLD\n"
22131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22132$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22133    "$WINLD" --version > /dev/null
22134    if test $? -eq 0 ; then
22135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22136$as_echo "no" >&6; }
22137      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22138    else
22139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22140$as_echo "yes" >&6; }
22141    fi
22142    LD="$WINLD"
22143    LDEXE="$WINLD"
22144    LDCXX="$WINLD"
22145    LDEXECXX="$WINLD"
22146
22147    # Extract the first word of "mt", so it can be a program name with args.
22148set dummy mt; ac_word=$2
22149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22150$as_echo_n "checking for $ac_word... " >&6; }
22151if test "${ac_cv_prog_MT+set}" = set; then :
22152  $as_echo_n "(cached) " >&6
22153else
22154  if test -n "$MT"; then
22155  ac_cv_prog_MT="$MT" # Let the user override the test.
22156else
22157  ac_prog_rejected=no
22158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22159for as_dir in $PATH
22160do
22161  IFS=$as_save_IFS
22162  test -z "$as_dir" && as_dir=.
22163    for ac_exec_ext in '' $ac_executable_extensions; do
22164  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22165    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22166       ac_prog_rejected=yes
22167       continue
22168     fi
22169    ac_cv_prog_MT="mt"
22170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22171    break 2
22172  fi
22173done
22174  done
22175IFS=$as_save_IFS
22176
22177if test $ac_prog_rejected = yes; then
22178  # We found a bogon in the path, so make sure we never use it.
22179  set dummy $ac_cv_prog_MT
22180  shift
22181  if test $# != 0; then
22182    # We chose a different compiler from the bogus one.
22183    # However, it has the same basename, so the bogon will be chosen
22184    # first if we set MT to just the basename; use the full file name.
22185    shift
22186    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22187  fi
22188fi
22189fi
22190fi
22191MT=$ac_cv_prog_MT
22192if test -n "$MT"; then
22193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22194$as_echo "$MT" >&6; }
22195else
22196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22197$as_echo "no" >&6; }
22198fi
22199
22200
22201
22202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22203
22204  # First separate the path from the arguments. This will split at the first
22205  # space.
22206  complete="$MT"
22207  path="${complete%% *}"
22208  tmp="$complete EOL"
22209  arguments="${tmp#* }"
22210
22211  # Input might be given as Windows format, start by converting to
22212  # unix format.
22213  new_path=`$CYGPATH -u "$path"`
22214
22215  # Now try to locate executable using which
22216  new_path=`$WHICH "$new_path" 2> /dev/null`
22217  # bat and cmd files are not always considered executable in cygwin causing which
22218  # to not find them
22219  if test "x$new_path" = x \
22220           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22221           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22222    new_path=`$CYGPATH -u "$path"`
22223  fi
22224  if test "x$new_path" = x; then
22225    # Oops. Which didn't find the executable.
22226    # The splitting of arguments from the executable at a space might have been incorrect,
22227    # since paths with space are more likely in Windows. Give it another try with the whole
22228    # argument.
22229    path="$complete"
22230    arguments="EOL"
22231    new_path=`$CYGPATH -u "$path"`
22232    new_path=`$WHICH "$new_path" 2> /dev/null`
22233    # bat and cmd files are not always considered executable in cygwin causing which
22234    # to not find them
22235    if test "x$new_path" = x \
22236             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22237             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22238      new_path=`$CYGPATH -u "$path"`
22239    fi
22240    if test "x$new_path" = x; then
22241      # It's still not found. Now this is an unrecoverable error.
22242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22243$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22244      has_space=`$ECHO "$complete" | $GREP " "`
22245      if test "x$has_space" != x; then
22246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22248      fi
22249      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22250    fi
22251  fi
22252
22253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22256  # "foo.exe" is OK but "foo" is an error.
22257  #
22258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22259  # It is also a way to make sure we got the proper file name for the real test later on.
22260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22261  if test "x$test_shortpath" = x; then
22262    # Short path failed, file does not exist as specified.
22263    # Try adding .exe or .cmd
22264    if test -f "${new_path}.exe"; then
22265       input_to_shortpath="${new_path}.exe"
22266    elif test -f "${new_path}.cmd"; then
22267       input_to_shortpath="${new_path}.cmd"
22268    else
22269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22270$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22271      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22272$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22273      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22274    fi
22275  else
22276    input_to_shortpath="$new_path"
22277  fi
22278
22279  # Call helper function which possibly converts this using DOS-style short mode.
22280  # If so, the updated path is stored in $new_path.
22281  new_path="$input_to_shortpath"
22282
22283  input_path="$input_to_shortpath"
22284  # Check if we need to convert this using DOS-style short mode. If the path
22285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22286  # take no chances and rewrite it.
22287  # Note: m4 eats our [], so we need to use [ and ] instead.
22288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22289  if test "x$has_forbidden_chars" != x; then
22290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22294      # Going to short mode and back again did indeed matter. Since short mode is
22295      # case insensitive, let's make it lowercase to improve readability.
22296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22297      # Now convert it back to Unix-stile (cygpath)
22298      input_path=`$CYGPATH -u "$shortmode_path"`
22299      new_path="$input_path"
22300    fi
22301  fi
22302
22303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22304  if test "x$test_cygdrive_prefix" = x; then
22305    # As a simple fix, exclude /usr/bin since it's not a real path.
22306    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22308      # a path prefixed by /cygdrive for fixpath to work.
22309      new_path="$CYGWIN_ROOT_PATH$input_path"
22310    fi
22311  fi
22312
22313  # remove trailing .exe if any
22314  new_path="${new_path/%.exe/}"
22315
22316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22317
22318  # First separate the path from the arguments. This will split at the first
22319  # space.
22320  complete="$MT"
22321  path="${complete%% *}"
22322  tmp="$complete EOL"
22323  arguments="${tmp#* }"
22324
22325  # Input might be given as Windows format, start by converting to
22326  # unix format.
22327  new_path="$path"
22328
22329  windows_path="$new_path"
22330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22331    unix_path=`$CYGPATH -u "$windows_path"`
22332    new_path="$unix_path"
22333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22335    new_path="$unix_path"
22336  fi
22337
22338
22339  # Now try to locate executable using which
22340  new_path=`$WHICH "$new_path" 2> /dev/null`
22341
22342  if test "x$new_path" = x; then
22343    # Oops. Which didn't find the executable.
22344    # The splitting of arguments from the executable at a space might have been incorrect,
22345    # since paths with space are more likely in Windows. Give it another try with the whole
22346    # argument.
22347    path="$complete"
22348    arguments="EOL"
22349    new_path="$path"
22350
22351  windows_path="$new_path"
22352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22353    unix_path=`$CYGPATH -u "$windows_path"`
22354    new_path="$unix_path"
22355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22357    new_path="$unix_path"
22358  fi
22359
22360
22361    new_path=`$WHICH "$new_path" 2> /dev/null`
22362
22363    if test "x$new_path" = x; then
22364      # It's still not found. Now this is an unrecoverable error.
22365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22366$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22367      has_space=`$ECHO "$complete" | $GREP " "`
22368      if test "x$has_space" != x; then
22369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22371      fi
22372      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22373    fi
22374  fi
22375
22376  # Now new_path has a complete unix path to the binary
22377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22378    # Keep paths in /bin as-is, but remove trailing .exe if any
22379    new_path="${new_path/%.exe/}"
22380    # Do not save /bin paths to all_fixpath_prefixes!
22381  else
22382    # Not in mixed or Windows style, start by that.
22383    new_path=`cmd //c echo $new_path`
22384
22385  input_path="$new_path"
22386  # Check if we need to convert this using DOS-style short mode. If the path
22387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22388  # take no chances and rewrite it.
22389  # Note: m4 eats our [], so we need to use [ and ] instead.
22390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22391  if test "x$has_forbidden_chars" != x; then
22392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22394  fi
22395
22396    # Output is in $new_path
22397
22398  windows_path="$new_path"
22399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22400    unix_path=`$CYGPATH -u "$windows_path"`
22401    new_path="$unix_path"
22402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22404    new_path="$unix_path"
22405  fi
22406
22407    # remove trailing .exe if any
22408    new_path="${new_path/%.exe/}"
22409
22410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22412  fi
22413
22414  else
22415    # We're on a posix platform. Hooray! :)
22416    # First separate the path from the arguments. This will split at the first
22417    # space.
22418    complete="$MT"
22419    path="${complete%% *}"
22420    tmp="$complete EOL"
22421    arguments="${tmp#* }"
22422
22423    # Cannot rely on the command "which" here since it doesn't always work.
22424    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22425    if test -z "$is_absolute_path"; then
22426      # Path to executable is not absolute. Find it.
22427      IFS_save="$IFS"
22428      IFS=:
22429      for p in $PATH; do
22430        if test -f "$p/$path" && test -x "$p/$path"; then
22431          new_path="$p/$path"
22432          break
22433        fi
22434      done
22435      IFS="$IFS_save"
22436    else
22437      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22438$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22439      new_path="$path"
22440    fi
22441
22442    if test "x$new_path" = x; then
22443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22444$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22445        has_space=`$ECHO "$complete" | $GREP " "`
22446        if test "x$has_space" != x; then
22447          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22449        fi
22450        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22451      fi
22452  fi
22453
22454      # Now join together the path and the arguments once again
22455      if test "x$arguments" != xEOL; then
22456        new_complete="$new_path ${arguments% *}"
22457      else
22458        new_complete="$new_path"
22459      fi
22460
22461  if test "x$complete" != "x$new_complete"; then
22462      MT="$new_complete"
22463      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22464$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22465    fi
22466
22467    # The resource compiler
22468    # Extract the first word of "rc", so it can be a program name with args.
22469set dummy rc; ac_word=$2
22470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22471$as_echo_n "checking for $ac_word... " >&6; }
22472if test "${ac_cv_prog_RC+set}" = set; then :
22473  $as_echo_n "(cached) " >&6
22474else
22475  if test -n "$RC"; then
22476  ac_cv_prog_RC="$RC" # Let the user override the test.
22477else
22478  ac_prog_rejected=no
22479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22480for as_dir in $PATH
22481do
22482  IFS=$as_save_IFS
22483  test -z "$as_dir" && as_dir=.
22484    for ac_exec_ext in '' $ac_executable_extensions; do
22485  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22486    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22487       ac_prog_rejected=yes
22488       continue
22489     fi
22490    ac_cv_prog_RC="rc"
22491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22492    break 2
22493  fi
22494done
22495  done
22496IFS=$as_save_IFS
22497
22498if test $ac_prog_rejected = yes; then
22499  # We found a bogon in the path, so make sure we never use it.
22500  set dummy $ac_cv_prog_RC
22501  shift
22502  if test $# != 0; then
22503    # We chose a different compiler from the bogus one.
22504    # However, it has the same basename, so the bogon will be chosen
22505    # first if we set RC to just the basename; use the full file name.
22506    shift
22507    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22508  fi
22509fi
22510fi
22511fi
22512RC=$ac_cv_prog_RC
22513if test -n "$RC"; then
22514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22515$as_echo "$RC" >&6; }
22516else
22517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22518$as_echo "no" >&6; }
22519fi
22520
22521
22522
22523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22524
22525  # First separate the path from the arguments. This will split at the first
22526  # space.
22527  complete="$RC"
22528  path="${complete%% *}"
22529  tmp="$complete EOL"
22530  arguments="${tmp#* }"
22531
22532  # Input might be given as Windows format, start by converting to
22533  # unix format.
22534  new_path=`$CYGPATH -u "$path"`
22535
22536  # Now try to locate executable using which
22537  new_path=`$WHICH "$new_path" 2> /dev/null`
22538  # bat and cmd files are not always considered executable in cygwin causing which
22539  # to not find them
22540  if test "x$new_path" = x \
22541           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22542           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22543    new_path=`$CYGPATH -u "$path"`
22544  fi
22545  if test "x$new_path" = x; then
22546    # Oops. Which didn't find the executable.
22547    # The splitting of arguments from the executable at a space might have been incorrect,
22548    # since paths with space are more likely in Windows. Give it another try with the whole
22549    # argument.
22550    path="$complete"
22551    arguments="EOL"
22552    new_path=`$CYGPATH -u "$path"`
22553    new_path=`$WHICH "$new_path" 2> /dev/null`
22554    # bat and cmd files are not always considered executable in cygwin causing which
22555    # to not find them
22556    if test "x$new_path" = x \
22557             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22558             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22559      new_path=`$CYGPATH -u "$path"`
22560    fi
22561    if test "x$new_path" = x; then
22562      # It's still not found. Now this is an unrecoverable error.
22563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22564$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22565      has_space=`$ECHO "$complete" | $GREP " "`
22566      if test "x$has_space" != x; then
22567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22569      fi
22570      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22571    fi
22572  fi
22573
22574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22577  # "foo.exe" is OK but "foo" is an error.
22578  #
22579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22580  # It is also a way to make sure we got the proper file name for the real test later on.
22581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22582  if test "x$test_shortpath" = x; then
22583    # Short path failed, file does not exist as specified.
22584    # Try adding .exe or .cmd
22585    if test -f "${new_path}.exe"; then
22586       input_to_shortpath="${new_path}.exe"
22587    elif test -f "${new_path}.cmd"; then
22588       input_to_shortpath="${new_path}.cmd"
22589    else
22590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22591$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22592      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22593$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22594      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22595    fi
22596  else
22597    input_to_shortpath="$new_path"
22598  fi
22599
22600  # Call helper function which possibly converts this using DOS-style short mode.
22601  # If so, the updated path is stored in $new_path.
22602  new_path="$input_to_shortpath"
22603
22604  input_path="$input_to_shortpath"
22605  # Check if we need to convert this using DOS-style short mode. If the path
22606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22607  # take no chances and rewrite it.
22608  # Note: m4 eats our [], so we need to use [ and ] instead.
22609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22610  if test "x$has_forbidden_chars" != x; then
22611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22615      # Going to short mode and back again did indeed matter. Since short mode is
22616      # case insensitive, let's make it lowercase to improve readability.
22617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22618      # Now convert it back to Unix-stile (cygpath)
22619      input_path=`$CYGPATH -u "$shortmode_path"`
22620      new_path="$input_path"
22621    fi
22622  fi
22623
22624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22625  if test "x$test_cygdrive_prefix" = x; then
22626    # As a simple fix, exclude /usr/bin since it's not a real path.
22627    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22629      # a path prefixed by /cygdrive for fixpath to work.
22630      new_path="$CYGWIN_ROOT_PATH$input_path"
22631    fi
22632  fi
22633
22634  # remove trailing .exe if any
22635  new_path="${new_path/%.exe/}"
22636
22637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22638
22639  # First separate the path from the arguments. This will split at the first
22640  # space.
22641  complete="$RC"
22642  path="${complete%% *}"
22643  tmp="$complete EOL"
22644  arguments="${tmp#* }"
22645
22646  # Input might be given as Windows format, start by converting to
22647  # unix format.
22648  new_path="$path"
22649
22650  windows_path="$new_path"
22651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22652    unix_path=`$CYGPATH -u "$windows_path"`
22653    new_path="$unix_path"
22654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22656    new_path="$unix_path"
22657  fi
22658
22659
22660  # Now try to locate executable using which
22661  new_path=`$WHICH "$new_path" 2> /dev/null`
22662
22663  if test "x$new_path" = x; then
22664    # Oops. Which didn't find the executable.
22665    # The splitting of arguments from the executable at a space might have been incorrect,
22666    # since paths with space are more likely in Windows. Give it another try with the whole
22667    # argument.
22668    path="$complete"
22669    arguments="EOL"
22670    new_path="$path"
22671
22672  windows_path="$new_path"
22673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22674    unix_path=`$CYGPATH -u "$windows_path"`
22675    new_path="$unix_path"
22676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22678    new_path="$unix_path"
22679  fi
22680
22681
22682    new_path=`$WHICH "$new_path" 2> /dev/null`
22683
22684    if test "x$new_path" = x; then
22685      # It's still not found. Now this is an unrecoverable error.
22686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22687$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22688      has_space=`$ECHO "$complete" | $GREP " "`
22689      if test "x$has_space" != x; then
22690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22692      fi
22693      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22694    fi
22695  fi
22696
22697  # Now new_path has a complete unix path to the binary
22698  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22699    # Keep paths in /bin as-is, but remove trailing .exe if any
22700    new_path="${new_path/%.exe/}"
22701    # Do not save /bin paths to all_fixpath_prefixes!
22702  else
22703    # Not in mixed or Windows style, start by that.
22704    new_path=`cmd //c echo $new_path`
22705
22706  input_path="$new_path"
22707  # Check if we need to convert this using DOS-style short mode. If the path
22708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22709  # take no chances and rewrite it.
22710  # Note: m4 eats our [], so we need to use [ and ] instead.
22711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22712  if test "x$has_forbidden_chars" != x; then
22713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22715  fi
22716
22717    # Output is in $new_path
22718
22719  windows_path="$new_path"
22720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22721    unix_path=`$CYGPATH -u "$windows_path"`
22722    new_path="$unix_path"
22723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22725    new_path="$unix_path"
22726  fi
22727
22728    # remove trailing .exe if any
22729    new_path="${new_path/%.exe/}"
22730
22731    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22732    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22733  fi
22734
22735  else
22736    # We're on a posix platform. Hooray! :)
22737    # First separate the path from the arguments. This will split at the first
22738    # space.
22739    complete="$RC"
22740    path="${complete%% *}"
22741    tmp="$complete EOL"
22742    arguments="${tmp#* }"
22743
22744    # Cannot rely on the command "which" here since it doesn't always work.
22745    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22746    if test -z "$is_absolute_path"; then
22747      # Path to executable is not absolute. Find it.
22748      IFS_save="$IFS"
22749      IFS=:
22750      for p in $PATH; do
22751        if test -f "$p/$path" && test -x "$p/$path"; then
22752          new_path="$p/$path"
22753          break
22754        fi
22755      done
22756      IFS="$IFS_save"
22757    else
22758      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22759$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22760      new_path="$path"
22761    fi
22762
22763    if test "x$new_path" = x; then
22764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22765$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22766        has_space=`$ECHO "$complete" | $GREP " "`
22767        if test "x$has_space" != x; then
22768          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22769$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22770        fi
22771        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22772      fi
22773  fi
22774
22775      # Now join together the path and the arguments once again
22776      if test "x$arguments" != xEOL; then
22777        new_complete="$new_path ${arguments% *}"
22778      else
22779        new_complete="$new_path"
22780      fi
22781
22782  if test "x$complete" != "x$new_complete"; then
22783      RC="$new_complete"
22784      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22785$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22786    fi
22787
22788
22789    # For hotspot, we need these in Windows mixed path,
22790    # so rewrite them all. Need added .exe suffix.
22791    HOTSPOT_CXX="$CXX.exe"
22792    HOTSPOT_LD="$LD.exe"
22793    HOTSPOT_MT="$MT.exe"
22794    HOTSPOT_RC="$RC.exe"
22795
22796  unix_path="$HOTSPOT_CXX"
22797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22798    windows_path=`$CYGPATH -m "$unix_path"`
22799    HOTSPOT_CXX="$windows_path"
22800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22801    windows_path=`cmd //c echo $unix_path`
22802    HOTSPOT_CXX="$windows_path"
22803  fi
22804
22805
22806  unix_path="$HOTSPOT_LD"
22807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22808    windows_path=`$CYGPATH -m "$unix_path"`
22809    HOTSPOT_LD="$windows_path"
22810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22811    windows_path=`cmd //c echo $unix_path`
22812    HOTSPOT_LD="$windows_path"
22813  fi
22814
22815
22816  unix_path="$HOTSPOT_MT"
22817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22818    windows_path=`$CYGPATH -m "$unix_path"`
22819    HOTSPOT_MT="$windows_path"
22820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22821    windows_path=`cmd //c echo $unix_path`
22822    HOTSPOT_MT="$windows_path"
22823  fi
22824
22825
22826  unix_path="$HOTSPOT_RC"
22827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22828    windows_path=`$CYGPATH -m "$unix_path"`
22829    HOTSPOT_RC="$windows_path"
22830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22831    windows_path=`cmd //c echo $unix_path`
22832    HOTSPOT_RC="$windows_path"
22833  fi
22834
22835
22836
22837
22838    RC_FLAGS="-nologo -l 0x409 -r"
22839    if test "x$VARIANT" = xOPT; then :
22840
22841        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22842
22843fi
22844    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22845    if test "x$JDK_UPDATE_VERSION" = x; then :
22846
22847        JDK_UPDATE_VERSION_NOTNULL=0
22848
22849fi
22850    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22851    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22852    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22853    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22854    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22855    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22856    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22857
22858    # lib.exe is used to create static libraries.
22859    # Extract the first word of "lib", so it can be a program name with args.
22860set dummy lib; ac_word=$2
22861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22862$as_echo_n "checking for $ac_word... " >&6; }
22863if test "${ac_cv_prog_WINAR+set}" = set; then :
22864  $as_echo_n "(cached) " >&6
22865else
22866  if test -n "$WINAR"; then
22867  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22868else
22869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22870for as_dir in $PATH
22871do
22872  IFS=$as_save_IFS
22873  test -z "$as_dir" && as_dir=.
22874    for ac_exec_ext in '' $ac_executable_extensions; do
22875  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22876    ac_cv_prog_WINAR="lib"
22877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22878    break 2
22879  fi
22880done
22881  done
22882IFS=$as_save_IFS
22883
22884fi
22885fi
22886WINAR=$ac_cv_prog_WINAR
22887if test -n "$WINAR"; then
22888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22889$as_echo "$WINAR" >&6; }
22890else
22891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22892$as_echo "no" >&6; }
22893fi
22894
22895
22896
22897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22898
22899  # First separate the path from the arguments. This will split at the first
22900  # space.
22901  complete="$WINAR"
22902  path="${complete%% *}"
22903  tmp="$complete EOL"
22904  arguments="${tmp#* }"
22905
22906  # Input might be given as Windows format, start by converting to
22907  # unix format.
22908  new_path=`$CYGPATH -u "$path"`
22909
22910  # Now try to locate executable using which
22911  new_path=`$WHICH "$new_path" 2> /dev/null`
22912  # bat and cmd files are not always considered executable in cygwin causing which
22913  # to not find them
22914  if test "x$new_path" = x \
22915           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22916           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22917    new_path=`$CYGPATH -u "$path"`
22918  fi
22919  if test "x$new_path" = x; then
22920    # Oops. Which didn't find the executable.
22921    # The splitting of arguments from the executable at a space might have been incorrect,
22922    # since paths with space are more likely in Windows. Give it another try with the whole
22923    # argument.
22924    path="$complete"
22925    arguments="EOL"
22926    new_path=`$CYGPATH -u "$path"`
22927    new_path=`$WHICH "$new_path" 2> /dev/null`
22928    # bat and cmd files are not always considered executable in cygwin causing which
22929    # to not find them
22930    if test "x$new_path" = x \
22931             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22932             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22933      new_path=`$CYGPATH -u "$path"`
22934    fi
22935    if test "x$new_path" = x; then
22936      # It's still not found. Now this is an unrecoverable error.
22937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22938$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22939      has_space=`$ECHO "$complete" | $GREP " "`
22940      if test "x$has_space" != x; then
22941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22943      fi
22944      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22945    fi
22946  fi
22947
22948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22951  # "foo.exe" is OK but "foo" is an error.
22952  #
22953  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22954  # It is also a way to make sure we got the proper file name for the real test later on.
22955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22956  if test "x$test_shortpath" = x; then
22957    # Short path failed, file does not exist as specified.
22958    # Try adding .exe or .cmd
22959    if test -f "${new_path}.exe"; then
22960       input_to_shortpath="${new_path}.exe"
22961    elif test -f "${new_path}.cmd"; then
22962       input_to_shortpath="${new_path}.cmd"
22963    else
22964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22965$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22966      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22967$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22968      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22969    fi
22970  else
22971    input_to_shortpath="$new_path"
22972  fi
22973
22974  # Call helper function which possibly converts this using DOS-style short mode.
22975  # If so, the updated path is stored in $new_path.
22976  new_path="$input_to_shortpath"
22977
22978  input_path="$input_to_shortpath"
22979  # Check if we need to convert this using DOS-style short mode. If the path
22980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22981  # take no chances and rewrite it.
22982  # Note: m4 eats our [], so we need to use [ and ] instead.
22983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22984  if test "x$has_forbidden_chars" != x; then
22985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22989      # Going to short mode and back again did indeed matter. Since short mode is
22990      # case insensitive, let's make it lowercase to improve readability.
22991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22992      # Now convert it back to Unix-stile (cygpath)
22993      input_path=`$CYGPATH -u "$shortmode_path"`
22994      new_path="$input_path"
22995    fi
22996  fi
22997
22998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22999  if test "x$test_cygdrive_prefix" = x; then
23000    # As a simple fix, exclude /usr/bin since it's not a real path.
23001    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23003      # a path prefixed by /cygdrive for fixpath to work.
23004      new_path="$CYGWIN_ROOT_PATH$input_path"
23005    fi
23006  fi
23007
23008  # remove trailing .exe if any
23009  new_path="${new_path/%.exe/}"
23010
23011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23012
23013  # First separate the path from the arguments. This will split at the first
23014  # space.
23015  complete="$WINAR"
23016  path="${complete%% *}"
23017  tmp="$complete EOL"
23018  arguments="${tmp#* }"
23019
23020  # Input might be given as Windows format, start by converting to
23021  # unix format.
23022  new_path="$path"
23023
23024  windows_path="$new_path"
23025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23026    unix_path=`$CYGPATH -u "$windows_path"`
23027    new_path="$unix_path"
23028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23030    new_path="$unix_path"
23031  fi
23032
23033
23034  # Now try to locate executable using which
23035  new_path=`$WHICH "$new_path" 2> /dev/null`
23036
23037  if test "x$new_path" = x; then
23038    # Oops. Which didn't find the executable.
23039    # The splitting of arguments from the executable at a space might have been incorrect,
23040    # since paths with space are more likely in Windows. Give it another try with the whole
23041    # argument.
23042    path="$complete"
23043    arguments="EOL"
23044    new_path="$path"
23045
23046  windows_path="$new_path"
23047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23048    unix_path=`$CYGPATH -u "$windows_path"`
23049    new_path="$unix_path"
23050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23052    new_path="$unix_path"
23053  fi
23054
23055
23056    new_path=`$WHICH "$new_path" 2> /dev/null`
23057
23058    if test "x$new_path" = x; then
23059      # It's still not found. Now this is an unrecoverable error.
23060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23061$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23062      has_space=`$ECHO "$complete" | $GREP " "`
23063      if test "x$has_space" != x; then
23064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23066      fi
23067      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23068    fi
23069  fi
23070
23071  # Now new_path has a complete unix path to the binary
23072  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23073    # Keep paths in /bin as-is, but remove trailing .exe if any
23074    new_path="${new_path/%.exe/}"
23075    # Do not save /bin paths to all_fixpath_prefixes!
23076  else
23077    # Not in mixed or Windows style, start by that.
23078    new_path=`cmd //c echo $new_path`
23079
23080  input_path="$new_path"
23081  # Check if we need to convert this using DOS-style short mode. If the path
23082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23083  # take no chances and rewrite it.
23084  # Note: m4 eats our [], so we need to use [ and ] instead.
23085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23086  if test "x$has_forbidden_chars" != x; then
23087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23089  fi
23090
23091    # Output is in $new_path
23092
23093  windows_path="$new_path"
23094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23095    unix_path=`$CYGPATH -u "$windows_path"`
23096    new_path="$unix_path"
23097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23099    new_path="$unix_path"
23100  fi
23101
23102    # remove trailing .exe if any
23103    new_path="${new_path/%.exe/}"
23104
23105    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23106    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23107  fi
23108
23109  else
23110    # We're on a posix platform. Hooray! :)
23111    # First separate the path from the arguments. This will split at the first
23112    # space.
23113    complete="$WINAR"
23114    path="${complete%% *}"
23115    tmp="$complete EOL"
23116    arguments="${tmp#* }"
23117
23118    # Cannot rely on the command "which" here since it doesn't always work.
23119    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23120    if test -z "$is_absolute_path"; then
23121      # Path to executable is not absolute. Find it.
23122      IFS_save="$IFS"
23123      IFS=:
23124      for p in $PATH; do
23125        if test -f "$p/$path" && test -x "$p/$path"; then
23126          new_path="$p/$path"
23127          break
23128        fi
23129      done
23130      IFS="$IFS_save"
23131    else
23132      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23133$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23134      new_path="$path"
23135    fi
23136
23137    if test "x$new_path" = x; then
23138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23139$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23140        has_space=`$ECHO "$complete" | $GREP " "`
23141        if test "x$has_space" != x; then
23142          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23143$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23144        fi
23145        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23146      fi
23147  fi
23148
23149      # Now join together the path and the arguments once again
23150      if test "x$arguments" != xEOL; then
23151        new_complete="$new_path ${arguments% *}"
23152      else
23153        new_complete="$new_path"
23154      fi
23155
23156  if test "x$complete" != "x$new_complete"; then
23157      WINAR="$new_complete"
23158      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23159$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23160    fi
23161
23162    AR="$WINAR"
23163    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23164
23165    # Extract the first word of "dumpbin", so it can be a program name with args.
23166set dummy dumpbin; ac_word=$2
23167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23168$as_echo_n "checking for $ac_word... " >&6; }
23169if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23170  $as_echo_n "(cached) " >&6
23171else
23172  if test -n "$DUMPBIN"; then
23173  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23174else
23175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23176for as_dir in $PATH
23177do
23178  IFS=$as_save_IFS
23179  test -z "$as_dir" && as_dir=.
23180    for ac_exec_ext in '' $ac_executable_extensions; do
23181  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23182    ac_cv_prog_DUMPBIN="dumpbin"
23183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23184    break 2
23185  fi
23186done
23187  done
23188IFS=$as_save_IFS
23189
23190fi
23191fi
23192DUMPBIN=$ac_cv_prog_DUMPBIN
23193if test -n "$DUMPBIN"; then
23194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23195$as_echo "$DUMPBIN" >&6; }
23196else
23197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23198$as_echo "no" >&6; }
23199fi
23200
23201
23202
23203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23204
23205  # First separate the path from the arguments. This will split at the first
23206  # space.
23207  complete="$DUMPBIN"
23208  path="${complete%% *}"
23209  tmp="$complete EOL"
23210  arguments="${tmp#* }"
23211
23212  # Input might be given as Windows format, start by converting to
23213  # unix format.
23214  new_path=`$CYGPATH -u "$path"`
23215
23216  # Now try to locate executable using which
23217  new_path=`$WHICH "$new_path" 2> /dev/null`
23218  # bat and cmd files are not always considered executable in cygwin causing which
23219  # to not find them
23220  if test "x$new_path" = x \
23221           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23222           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23223    new_path=`$CYGPATH -u "$path"`
23224  fi
23225  if test "x$new_path" = x; then
23226    # Oops. Which didn't find the executable.
23227    # The splitting of arguments from the executable at a space might have been incorrect,
23228    # since paths with space are more likely in Windows. Give it another try with the whole
23229    # argument.
23230    path="$complete"
23231    arguments="EOL"
23232    new_path=`$CYGPATH -u "$path"`
23233    new_path=`$WHICH "$new_path" 2> /dev/null`
23234    # bat and cmd files are not always considered executable in cygwin causing which
23235    # to not find them
23236    if test "x$new_path" = x \
23237             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23238             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23239      new_path=`$CYGPATH -u "$path"`
23240    fi
23241    if test "x$new_path" = x; then
23242      # It's still not found. Now this is an unrecoverable error.
23243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23244$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23245      has_space=`$ECHO "$complete" | $GREP " "`
23246      if test "x$has_space" != x; then
23247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23249      fi
23250      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23251    fi
23252  fi
23253
23254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23257  # "foo.exe" is OK but "foo" is an error.
23258  #
23259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23260  # It is also a way to make sure we got the proper file name for the real test later on.
23261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23262  if test "x$test_shortpath" = x; then
23263    # Short path failed, file does not exist as specified.
23264    # Try adding .exe or .cmd
23265    if test -f "${new_path}.exe"; then
23266       input_to_shortpath="${new_path}.exe"
23267    elif test -f "${new_path}.cmd"; then
23268       input_to_shortpath="${new_path}.cmd"
23269    else
23270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23271$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23274      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23275    fi
23276  else
23277    input_to_shortpath="$new_path"
23278  fi
23279
23280  # Call helper function which possibly converts this using DOS-style short mode.
23281  # If so, the updated path is stored in $new_path.
23282  new_path="$input_to_shortpath"
23283
23284  input_path="$input_to_shortpath"
23285  # Check if we need to convert this using DOS-style short mode. If the path
23286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23287  # take no chances and rewrite it.
23288  # Note: m4 eats our [], so we need to use [ and ] instead.
23289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23290  if test "x$has_forbidden_chars" != x; then
23291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23295      # Going to short mode and back again did indeed matter. Since short mode is
23296      # case insensitive, let's make it lowercase to improve readability.
23297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23298      # Now convert it back to Unix-stile (cygpath)
23299      input_path=`$CYGPATH -u "$shortmode_path"`
23300      new_path="$input_path"
23301    fi
23302  fi
23303
23304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23305  if test "x$test_cygdrive_prefix" = x; then
23306    # As a simple fix, exclude /usr/bin since it's not a real path.
23307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23309      # a path prefixed by /cygdrive for fixpath to work.
23310      new_path="$CYGWIN_ROOT_PATH$input_path"
23311    fi
23312  fi
23313
23314  # remove trailing .exe if any
23315  new_path="${new_path/%.exe/}"
23316
23317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23318
23319  # First separate the path from the arguments. This will split at the first
23320  # space.
23321  complete="$DUMPBIN"
23322  path="${complete%% *}"
23323  tmp="$complete EOL"
23324  arguments="${tmp#* }"
23325
23326  # Input might be given as Windows format, start by converting to
23327  # unix format.
23328  new_path="$path"
23329
23330  windows_path="$new_path"
23331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23332    unix_path=`$CYGPATH -u "$windows_path"`
23333    new_path="$unix_path"
23334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23336    new_path="$unix_path"
23337  fi
23338
23339
23340  # Now try to locate executable using which
23341  new_path=`$WHICH "$new_path" 2> /dev/null`
23342
23343  if test "x$new_path" = x; then
23344    # Oops. Which didn't find the executable.
23345    # The splitting of arguments from the executable at a space might have been incorrect,
23346    # since paths with space are more likely in Windows. Give it another try with the whole
23347    # argument.
23348    path="$complete"
23349    arguments="EOL"
23350    new_path="$path"
23351
23352  windows_path="$new_path"
23353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23354    unix_path=`$CYGPATH -u "$windows_path"`
23355    new_path="$unix_path"
23356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23358    new_path="$unix_path"
23359  fi
23360
23361
23362    new_path=`$WHICH "$new_path" 2> /dev/null`
23363
23364    if test "x$new_path" = x; then
23365      # It's still not found. Now this is an unrecoverable error.
23366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23367$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23368      has_space=`$ECHO "$complete" | $GREP " "`
23369      if test "x$has_space" != x; then
23370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23372      fi
23373      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23374    fi
23375  fi
23376
23377  # Now new_path has a complete unix path to the binary
23378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23379    # Keep paths in /bin as-is, but remove trailing .exe if any
23380    new_path="${new_path/%.exe/}"
23381    # Do not save /bin paths to all_fixpath_prefixes!
23382  else
23383    # Not in mixed or Windows style, start by that.
23384    new_path=`cmd //c echo $new_path`
23385
23386  input_path="$new_path"
23387  # Check if we need to convert this using DOS-style short mode. If the path
23388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23389  # take no chances and rewrite it.
23390  # Note: m4 eats our [], so we need to use [ and ] instead.
23391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23392  if test "x$has_forbidden_chars" != x; then
23393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23395  fi
23396
23397    # Output is in $new_path
23398
23399  windows_path="$new_path"
23400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23401    unix_path=`$CYGPATH -u "$windows_path"`
23402    new_path="$unix_path"
23403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23405    new_path="$unix_path"
23406  fi
23407
23408    # remove trailing .exe if any
23409    new_path="${new_path/%.exe/}"
23410
23411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23413  fi
23414
23415  else
23416    # We're on a posix platform. Hooray! :)
23417    # First separate the path from the arguments. This will split at the first
23418    # space.
23419    complete="$DUMPBIN"
23420    path="${complete%% *}"
23421    tmp="$complete EOL"
23422    arguments="${tmp#* }"
23423
23424    # Cannot rely on the command "which" here since it doesn't always work.
23425    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23426    if test -z "$is_absolute_path"; then
23427      # Path to executable is not absolute. Find it.
23428      IFS_save="$IFS"
23429      IFS=:
23430      for p in $PATH; do
23431        if test -f "$p/$path" && test -x "$p/$path"; then
23432          new_path="$p/$path"
23433          break
23434        fi
23435      done
23436      IFS="$IFS_save"
23437    else
23438      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23439$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23440      new_path="$path"
23441    fi
23442
23443    if test "x$new_path" = x; then
23444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23445$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23446        has_space=`$ECHO "$complete" | $GREP " "`
23447        if test "x$has_space" != x; then
23448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23450        fi
23451        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23452      fi
23453  fi
23454
23455      # Now join together the path and the arguments once again
23456      if test "x$arguments" != xEOL; then
23457        new_complete="$new_path ${arguments% *}"
23458      else
23459        new_complete="$new_path"
23460      fi
23461
23462  if test "x$complete" != "x$new_complete"; then
23463      DUMPBIN="$new_complete"
23464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23465$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23466    fi
23467
23468
23469    COMPILER_TYPE=CL
23470    CCXXFLAGS="$CCXXFLAGS -nologo"
23471
23472fi
23473
23474
23475
23476ac_ext=c
23477ac_cpp='$CPP $CPPFLAGS'
23478ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23479ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23480ac_compiler_gnu=$ac_cv_c_compiler_gnu
23481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23482$as_echo_n "checking how to run the C preprocessor... " >&6; }
23483# On Suns, sometimes $CPP names a directory.
23484if test -n "$CPP" && test -d "$CPP"; then
23485  CPP=
23486fi
23487if test -z "$CPP"; then
23488  if test "${ac_cv_prog_CPP+set}" = set; then :
23489  $as_echo_n "(cached) " >&6
23490else
23491      # Double quotes because CPP needs to be expanded
23492    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23493    do
23494      ac_preproc_ok=false
23495for ac_c_preproc_warn_flag in '' yes
23496do
23497  # Use a header file that comes with gcc, so configuring glibc
23498  # with a fresh cross-compiler works.
23499  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23500  # <limits.h> exists even on freestanding compilers.
23501  # On the NeXT, cc -E runs the code through the compiler's parser,
23502  # not just through cpp. "Syntax error" is here to catch this case.
23503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23504/* end confdefs.h.  */
23505#ifdef __STDC__
23506# include <limits.h>
23507#else
23508# include <assert.h>
23509#endif
23510		     Syntax error
23511_ACEOF
23512if ac_fn_c_try_cpp "$LINENO"; then :
23513
23514else
23515  # Broken: fails on valid input.
23516continue
23517fi
23518rm -f conftest.err conftest.i conftest.$ac_ext
23519
23520  # OK, works on sane cases.  Now check whether nonexistent headers
23521  # can be detected and how.
23522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23523/* end confdefs.h.  */
23524#include <ac_nonexistent.h>
23525_ACEOF
23526if ac_fn_c_try_cpp "$LINENO"; then :
23527  # Broken: success on invalid input.
23528continue
23529else
23530  # Passes both tests.
23531ac_preproc_ok=:
23532break
23533fi
23534rm -f conftest.err conftest.i conftest.$ac_ext
23535
23536done
23537# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23538rm -f conftest.i conftest.err conftest.$ac_ext
23539if $ac_preproc_ok; then :
23540  break
23541fi
23542
23543    done
23544    ac_cv_prog_CPP=$CPP
23545
23546fi
23547  CPP=$ac_cv_prog_CPP
23548else
23549  ac_cv_prog_CPP=$CPP
23550fi
23551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23552$as_echo "$CPP" >&6; }
23553ac_preproc_ok=false
23554for ac_c_preproc_warn_flag in '' yes
23555do
23556  # Use a header file that comes with gcc, so configuring glibc
23557  # with a fresh cross-compiler works.
23558  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23559  # <limits.h> exists even on freestanding compilers.
23560  # On the NeXT, cc -E runs the code through the compiler's parser,
23561  # not just through cpp. "Syntax error" is here to catch this case.
23562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23563/* end confdefs.h.  */
23564#ifdef __STDC__
23565# include <limits.h>
23566#else
23567# include <assert.h>
23568#endif
23569		     Syntax error
23570_ACEOF
23571if ac_fn_c_try_cpp "$LINENO"; then :
23572
23573else
23574  # Broken: fails on valid input.
23575continue
23576fi
23577rm -f conftest.err conftest.i conftest.$ac_ext
23578
23579  # OK, works on sane cases.  Now check whether nonexistent headers
23580  # can be detected and how.
23581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23582/* end confdefs.h.  */
23583#include <ac_nonexistent.h>
23584_ACEOF
23585if ac_fn_c_try_cpp "$LINENO"; then :
23586  # Broken: success on invalid input.
23587continue
23588else
23589  # Passes both tests.
23590ac_preproc_ok=:
23591break
23592fi
23593rm -f conftest.err conftest.i conftest.$ac_ext
23594
23595done
23596# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23597rm -f conftest.i conftest.err conftest.$ac_ext
23598if $ac_preproc_ok; then :
23599
23600else
23601  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23603as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23604See \`config.log' for more details" "$LINENO" 5 ; }
23605fi
23606
23607ac_ext=cpp
23608ac_cpp='$CXXCPP $CPPFLAGS'
23609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23612
23613
23614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23615
23616  # First separate the path from the arguments. This will split at the first
23617  # space.
23618  complete="$CPP"
23619  path="${complete%% *}"
23620  tmp="$complete EOL"
23621  arguments="${tmp#* }"
23622
23623  # Input might be given as Windows format, start by converting to
23624  # unix format.
23625  new_path=`$CYGPATH -u "$path"`
23626
23627  # Now try to locate executable using which
23628  new_path=`$WHICH "$new_path" 2> /dev/null`
23629  # bat and cmd files are not always considered executable in cygwin causing which
23630  # to not find them
23631  if test "x$new_path" = x \
23632           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23633           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23634    new_path=`$CYGPATH -u "$path"`
23635  fi
23636  if test "x$new_path" = x; then
23637    # Oops. Which didn't find the executable.
23638    # The splitting of arguments from the executable at a space might have been incorrect,
23639    # since paths with space are more likely in Windows. Give it another try with the whole
23640    # argument.
23641    path="$complete"
23642    arguments="EOL"
23643    new_path=`$CYGPATH -u "$path"`
23644    new_path=`$WHICH "$new_path" 2> /dev/null`
23645    # bat and cmd files are not always considered executable in cygwin causing which
23646    # to not find them
23647    if test "x$new_path" = x \
23648             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23649             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23650      new_path=`$CYGPATH -u "$path"`
23651    fi
23652    if test "x$new_path" = x; then
23653      # It's still not found. Now this is an unrecoverable error.
23654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23655$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23656      has_space=`$ECHO "$complete" | $GREP " "`
23657      if test "x$has_space" != x; then
23658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23660      fi
23661      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23662    fi
23663  fi
23664
23665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23668  # "foo.exe" is OK but "foo" is an error.
23669  #
23670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23671  # It is also a way to make sure we got the proper file name for the real test later on.
23672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23673  if test "x$test_shortpath" = x; then
23674    # Short path failed, file does not exist as specified.
23675    # Try adding .exe or .cmd
23676    if test -f "${new_path}.exe"; then
23677       input_to_shortpath="${new_path}.exe"
23678    elif test -f "${new_path}.cmd"; then
23679       input_to_shortpath="${new_path}.cmd"
23680    else
23681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23682$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23683      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23684$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23685      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23686    fi
23687  else
23688    input_to_shortpath="$new_path"
23689  fi
23690
23691  # Call helper function which possibly converts this using DOS-style short mode.
23692  # If so, the updated path is stored in $new_path.
23693  new_path="$input_to_shortpath"
23694
23695  input_path="$input_to_shortpath"
23696  # Check if we need to convert this using DOS-style short mode. If the path
23697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23698  # take no chances and rewrite it.
23699  # Note: m4 eats our [], so we need to use [ and ] instead.
23700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23701  if test "x$has_forbidden_chars" != x; then
23702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23706      # Going to short mode and back again did indeed matter. Since short mode is
23707      # case insensitive, let's make it lowercase to improve readability.
23708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23709      # Now convert it back to Unix-stile (cygpath)
23710      input_path=`$CYGPATH -u "$shortmode_path"`
23711      new_path="$input_path"
23712    fi
23713  fi
23714
23715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23716  if test "x$test_cygdrive_prefix" = x; then
23717    # As a simple fix, exclude /usr/bin since it's not a real path.
23718    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23720      # a path prefixed by /cygdrive for fixpath to work.
23721      new_path="$CYGWIN_ROOT_PATH$input_path"
23722    fi
23723  fi
23724
23725  # remove trailing .exe if any
23726  new_path="${new_path/%.exe/}"
23727
23728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23729
23730  # First separate the path from the arguments. This will split at the first
23731  # space.
23732  complete="$CPP"
23733  path="${complete%% *}"
23734  tmp="$complete EOL"
23735  arguments="${tmp#* }"
23736
23737  # Input might be given as Windows format, start by converting to
23738  # unix format.
23739  new_path="$path"
23740
23741  windows_path="$new_path"
23742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23743    unix_path=`$CYGPATH -u "$windows_path"`
23744    new_path="$unix_path"
23745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23747    new_path="$unix_path"
23748  fi
23749
23750
23751  # Now try to locate executable using which
23752  new_path=`$WHICH "$new_path" 2> /dev/null`
23753
23754  if test "x$new_path" = x; then
23755    # Oops. Which didn't find the executable.
23756    # The splitting of arguments from the executable at a space might have been incorrect,
23757    # since paths with space are more likely in Windows. Give it another try with the whole
23758    # argument.
23759    path="$complete"
23760    arguments="EOL"
23761    new_path="$path"
23762
23763  windows_path="$new_path"
23764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23765    unix_path=`$CYGPATH -u "$windows_path"`
23766    new_path="$unix_path"
23767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23769    new_path="$unix_path"
23770  fi
23771
23772
23773    new_path=`$WHICH "$new_path" 2> /dev/null`
23774
23775    if test "x$new_path" = x; then
23776      # It's still not found. Now this is an unrecoverable error.
23777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23778$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23779      has_space=`$ECHO "$complete" | $GREP " "`
23780      if test "x$has_space" != x; then
23781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23783      fi
23784      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23785    fi
23786  fi
23787
23788  # Now new_path has a complete unix path to the binary
23789  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23790    # Keep paths in /bin as-is, but remove trailing .exe if any
23791    new_path="${new_path/%.exe/}"
23792    # Do not save /bin paths to all_fixpath_prefixes!
23793  else
23794    # Not in mixed or Windows style, start by that.
23795    new_path=`cmd //c echo $new_path`
23796
23797  input_path="$new_path"
23798  # Check if we need to convert this using DOS-style short mode. If the path
23799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23800  # take no chances and rewrite it.
23801  # Note: m4 eats our [], so we need to use [ and ] instead.
23802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23803  if test "x$has_forbidden_chars" != x; then
23804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23806  fi
23807
23808    # Output is in $new_path
23809
23810  windows_path="$new_path"
23811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23812    unix_path=`$CYGPATH -u "$windows_path"`
23813    new_path="$unix_path"
23814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23816    new_path="$unix_path"
23817  fi
23818
23819    # remove trailing .exe if any
23820    new_path="${new_path/%.exe/}"
23821
23822    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23823    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23824  fi
23825
23826  else
23827    # We're on a posix platform. Hooray! :)
23828    # First separate the path from the arguments. This will split at the first
23829    # space.
23830    complete="$CPP"
23831    path="${complete%% *}"
23832    tmp="$complete EOL"
23833    arguments="${tmp#* }"
23834
23835    # Cannot rely on the command "which" here since it doesn't always work.
23836    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23837    if test -z "$is_absolute_path"; then
23838      # Path to executable is not absolute. Find it.
23839      IFS_save="$IFS"
23840      IFS=:
23841      for p in $PATH; do
23842        if test -f "$p/$path" && test -x "$p/$path"; then
23843          new_path="$p/$path"
23844          break
23845        fi
23846      done
23847      IFS="$IFS_save"
23848    else
23849      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23850$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23851      new_path="$path"
23852    fi
23853
23854    if test "x$new_path" = x; then
23855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23856$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23857        has_space=`$ECHO "$complete" | $GREP " "`
23858        if test "x$has_space" != x; then
23859          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23860$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23861        fi
23862        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23863      fi
23864  fi
23865
23866      # Now join together the path and the arguments once again
23867      if test "x$arguments" != xEOL; then
23868        new_complete="$new_path ${arguments% *}"
23869      else
23870        new_complete="$new_path"
23871      fi
23872
23873  if test "x$complete" != "x$new_complete"; then
23874      CPP="$new_complete"
23875      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23876$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23877    fi
23878
23879
23880ac_ext=cpp
23881ac_cpp='$CXXCPP $CPPFLAGS'
23882ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23883ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23884ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23886$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23887if test -z "$CXXCPP"; then
23888  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23889  $as_echo_n "(cached) " >&6
23890else
23891      # Double quotes because CXXCPP needs to be expanded
23892    for CXXCPP in "$CXX -E" "/lib/cpp"
23893    do
23894      ac_preproc_ok=false
23895for ac_cxx_preproc_warn_flag in '' yes
23896do
23897  # Use a header file that comes with gcc, so configuring glibc
23898  # with a fresh cross-compiler works.
23899  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23900  # <limits.h> exists even on freestanding compilers.
23901  # On the NeXT, cc -E runs the code through the compiler's parser,
23902  # not just through cpp. "Syntax error" is here to catch this case.
23903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23904/* end confdefs.h.  */
23905#ifdef __STDC__
23906# include <limits.h>
23907#else
23908# include <assert.h>
23909#endif
23910		     Syntax error
23911_ACEOF
23912if ac_fn_cxx_try_cpp "$LINENO"; then :
23913
23914else
23915  # Broken: fails on valid input.
23916continue
23917fi
23918rm -f conftest.err conftest.i conftest.$ac_ext
23919
23920  # OK, works on sane cases.  Now check whether nonexistent headers
23921  # can be detected and how.
23922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23923/* end confdefs.h.  */
23924#include <ac_nonexistent.h>
23925_ACEOF
23926if ac_fn_cxx_try_cpp "$LINENO"; then :
23927  # Broken: success on invalid input.
23928continue
23929else
23930  # Passes both tests.
23931ac_preproc_ok=:
23932break
23933fi
23934rm -f conftest.err conftest.i conftest.$ac_ext
23935
23936done
23937# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23938rm -f conftest.i conftest.err conftest.$ac_ext
23939if $ac_preproc_ok; then :
23940  break
23941fi
23942
23943    done
23944    ac_cv_prog_CXXCPP=$CXXCPP
23945
23946fi
23947  CXXCPP=$ac_cv_prog_CXXCPP
23948else
23949  ac_cv_prog_CXXCPP=$CXXCPP
23950fi
23951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23952$as_echo "$CXXCPP" >&6; }
23953ac_preproc_ok=false
23954for ac_cxx_preproc_warn_flag in '' yes
23955do
23956  # Use a header file that comes with gcc, so configuring glibc
23957  # with a fresh cross-compiler works.
23958  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23959  # <limits.h> exists even on freestanding compilers.
23960  # On the NeXT, cc -E runs the code through the compiler's parser,
23961  # not just through cpp. "Syntax error" is here to catch this case.
23962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23963/* end confdefs.h.  */
23964#ifdef __STDC__
23965# include <limits.h>
23966#else
23967# include <assert.h>
23968#endif
23969		     Syntax error
23970_ACEOF
23971if ac_fn_cxx_try_cpp "$LINENO"; then :
23972
23973else
23974  # Broken: fails on valid input.
23975continue
23976fi
23977rm -f conftest.err conftest.i conftest.$ac_ext
23978
23979  # OK, works on sane cases.  Now check whether nonexistent headers
23980  # can be detected and how.
23981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23982/* end confdefs.h.  */
23983#include <ac_nonexistent.h>
23984_ACEOF
23985if ac_fn_cxx_try_cpp "$LINENO"; then :
23986  # Broken: success on invalid input.
23987continue
23988else
23989  # Passes both tests.
23990ac_preproc_ok=:
23991break
23992fi
23993rm -f conftest.err conftest.i conftest.$ac_ext
23994
23995done
23996# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23997rm -f conftest.i conftest.err conftest.$ac_ext
23998if $ac_preproc_ok; then :
23999
24000else
24001  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24003as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24004See \`config.log' for more details" "$LINENO" 5 ; }
24005fi
24006
24007ac_ext=cpp
24008ac_cpp='$CXXCPP $CPPFLAGS'
24009ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24010ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24011ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24012
24013
24014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24015
24016  # First separate the path from the arguments. This will split at the first
24017  # space.
24018  complete="$CXXCPP"
24019  path="${complete%% *}"
24020  tmp="$complete EOL"
24021  arguments="${tmp#* }"
24022
24023  # Input might be given as Windows format, start by converting to
24024  # unix format.
24025  new_path=`$CYGPATH -u "$path"`
24026
24027  # Now try to locate executable using which
24028  new_path=`$WHICH "$new_path" 2> /dev/null`
24029  # bat and cmd files are not always considered executable in cygwin causing which
24030  # to not find them
24031  if test "x$new_path" = x \
24032           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24033           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24034    new_path=`$CYGPATH -u "$path"`
24035  fi
24036  if test "x$new_path" = x; then
24037    # Oops. Which didn't find the executable.
24038    # The splitting of arguments from the executable at a space might have been incorrect,
24039    # since paths with space are more likely in Windows. Give it another try with the whole
24040    # argument.
24041    path="$complete"
24042    arguments="EOL"
24043    new_path=`$CYGPATH -u "$path"`
24044    new_path=`$WHICH "$new_path" 2> /dev/null`
24045    # bat and cmd files are not always considered executable in cygwin causing which
24046    # to not find them
24047    if test "x$new_path" = x \
24048             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24049             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24050      new_path=`$CYGPATH -u "$path"`
24051    fi
24052    if test "x$new_path" = x; then
24053      # It's still not found. Now this is an unrecoverable error.
24054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24055$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24056      has_space=`$ECHO "$complete" | $GREP " "`
24057      if test "x$has_space" != x; then
24058        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24060      fi
24061      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24062    fi
24063  fi
24064
24065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24068  # "foo.exe" is OK but "foo" is an error.
24069  #
24070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24071  # It is also a way to make sure we got the proper file name for the real test later on.
24072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24073  if test "x$test_shortpath" = x; then
24074    # Short path failed, file does not exist as specified.
24075    # Try adding .exe or .cmd
24076    if test -f "${new_path}.exe"; then
24077       input_to_shortpath="${new_path}.exe"
24078    elif test -f "${new_path}.cmd"; then
24079       input_to_shortpath="${new_path}.cmd"
24080    else
24081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24082$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24083      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24084$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24085      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24086    fi
24087  else
24088    input_to_shortpath="$new_path"
24089  fi
24090
24091  # Call helper function which possibly converts this using DOS-style short mode.
24092  # If so, the updated path is stored in $new_path.
24093  new_path="$input_to_shortpath"
24094
24095  input_path="$input_to_shortpath"
24096  # Check if we need to convert this using DOS-style short mode. If the path
24097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24098  # take no chances and rewrite it.
24099  # Note: m4 eats our [], so we need to use [ and ] instead.
24100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24101  if test "x$has_forbidden_chars" != x; then
24102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24106      # Going to short mode and back again did indeed matter. Since short mode is
24107      # case insensitive, let's make it lowercase to improve readability.
24108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24109      # Now convert it back to Unix-stile (cygpath)
24110      input_path=`$CYGPATH -u "$shortmode_path"`
24111      new_path="$input_path"
24112    fi
24113  fi
24114
24115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24116  if test "x$test_cygdrive_prefix" = x; then
24117    # As a simple fix, exclude /usr/bin since it's not a real path.
24118    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24120      # a path prefixed by /cygdrive for fixpath to work.
24121      new_path="$CYGWIN_ROOT_PATH$input_path"
24122    fi
24123  fi
24124
24125  # remove trailing .exe if any
24126  new_path="${new_path/%.exe/}"
24127
24128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24129
24130  # First separate the path from the arguments. This will split at the first
24131  # space.
24132  complete="$CXXCPP"
24133  path="${complete%% *}"
24134  tmp="$complete EOL"
24135  arguments="${tmp#* }"
24136
24137  # Input might be given as Windows format, start by converting to
24138  # unix format.
24139  new_path="$path"
24140
24141  windows_path="$new_path"
24142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24143    unix_path=`$CYGPATH -u "$windows_path"`
24144    new_path="$unix_path"
24145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24147    new_path="$unix_path"
24148  fi
24149
24150
24151  # Now try to locate executable using which
24152  new_path=`$WHICH "$new_path" 2> /dev/null`
24153
24154  if test "x$new_path" = x; then
24155    # Oops. Which didn't find the executable.
24156    # The splitting of arguments from the executable at a space might have been incorrect,
24157    # since paths with space are more likely in Windows. Give it another try with the whole
24158    # argument.
24159    path="$complete"
24160    arguments="EOL"
24161    new_path="$path"
24162
24163  windows_path="$new_path"
24164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24165    unix_path=`$CYGPATH -u "$windows_path"`
24166    new_path="$unix_path"
24167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24169    new_path="$unix_path"
24170  fi
24171
24172
24173    new_path=`$WHICH "$new_path" 2> /dev/null`
24174
24175    if test "x$new_path" = x; then
24176      # It's still not found. Now this is an unrecoverable error.
24177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24178$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24179      has_space=`$ECHO "$complete" | $GREP " "`
24180      if test "x$has_space" != x; then
24181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24183      fi
24184      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24185    fi
24186  fi
24187
24188  # Now new_path has a complete unix path to the binary
24189  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24190    # Keep paths in /bin as-is, but remove trailing .exe if any
24191    new_path="${new_path/%.exe/}"
24192    # Do not save /bin paths to all_fixpath_prefixes!
24193  else
24194    # Not in mixed or Windows style, start by that.
24195    new_path=`cmd //c echo $new_path`
24196
24197  input_path="$new_path"
24198  # Check if we need to convert this using DOS-style short mode. If the path
24199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24200  # take no chances and rewrite it.
24201  # Note: m4 eats our [], so we need to use [ and ] instead.
24202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24203  if test "x$has_forbidden_chars" != x; then
24204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24206  fi
24207
24208    # Output is in $new_path
24209
24210  windows_path="$new_path"
24211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24212    unix_path=`$CYGPATH -u "$windows_path"`
24213    new_path="$unix_path"
24214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24216    new_path="$unix_path"
24217  fi
24218
24219    # remove trailing .exe if any
24220    new_path="${new_path/%.exe/}"
24221
24222    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24223    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24224  fi
24225
24226  else
24227    # We're on a posix platform. Hooray! :)
24228    # First separate the path from the arguments. This will split at the first
24229    # space.
24230    complete="$CXXCPP"
24231    path="${complete%% *}"
24232    tmp="$complete EOL"
24233    arguments="${tmp#* }"
24234
24235    # Cannot rely on the command "which" here since it doesn't always work.
24236    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24237    if test -z "$is_absolute_path"; then
24238      # Path to executable is not absolute. Find it.
24239      IFS_save="$IFS"
24240      IFS=:
24241      for p in $PATH; do
24242        if test -f "$p/$path" && test -x "$p/$path"; then
24243          new_path="$p/$path"
24244          break
24245        fi
24246      done
24247      IFS="$IFS_save"
24248    else
24249      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24250$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24251      new_path="$path"
24252    fi
24253
24254    if test "x$new_path" = x; then
24255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24256$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24257        has_space=`$ECHO "$complete" | $GREP " "`
24258        if test "x$has_space" != x; then
24259          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24260$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24261        fi
24262        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24263      fi
24264  fi
24265
24266      # Now join together the path and the arguments once again
24267      if test "x$arguments" != xEOL; then
24268        new_complete="$new_path ${arguments% *}"
24269      else
24270        new_complete="$new_path"
24271      fi
24272
24273  if test "x$complete" != "x$new_complete"; then
24274      CXXCPP="$new_complete"
24275      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24276$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24277    fi
24278
24279
24280if test "x$COMPILE_TYPE" != "xcross"; then
24281    # If we are not cross compiling, use the same compilers for
24282    # building the build platform executables. The cross-compilation
24283    # case needed to be done earlier, but this can only be done after
24284    # the native tools have been localized.
24285    BUILD_CC="$CC"
24286    BUILD_CXX="$CXX"
24287    BUILD_LD="$LD"
24288fi
24289
24290# for solaris we really need solaris tools, and not gnu equivalent
24291#   these seems to normally reside in /usr/ccs/bin so add that to path before
24292#   starting to probe
24293#
24294#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24295#         so that it can be overriden --with-tools-dir
24296if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24297    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24298fi
24299
24300# Find the right assembler.
24301if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24302    # Extract the first word of "as", so it can be a program name with args.
24303set dummy as; ac_word=$2
24304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24305$as_echo_n "checking for $ac_word... " >&6; }
24306if test "${ac_cv_path_AS+set}" = set; then :
24307  $as_echo_n "(cached) " >&6
24308else
24309  case $AS in
24310  [\\/]* | ?:[\\/]*)
24311  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24312  ;;
24313  *)
24314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24315for as_dir in $PATH
24316do
24317  IFS=$as_save_IFS
24318  test -z "$as_dir" && as_dir=.
24319    for ac_exec_ext in '' $ac_executable_extensions; do
24320  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24321    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24323    break 2
24324  fi
24325done
24326  done
24327IFS=$as_save_IFS
24328
24329  ;;
24330esac
24331fi
24332AS=$ac_cv_path_AS
24333if test -n "$AS"; then
24334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24335$as_echo "$AS" >&6; }
24336else
24337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24338$as_echo "no" >&6; }
24339fi
24340
24341
24342
24343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24344
24345  # First separate the path from the arguments. This will split at the first
24346  # space.
24347  complete="$AS"
24348  path="${complete%% *}"
24349  tmp="$complete EOL"
24350  arguments="${tmp#* }"
24351
24352  # Input might be given as Windows format, start by converting to
24353  # unix format.
24354  new_path=`$CYGPATH -u "$path"`
24355
24356  # Now try to locate executable using which
24357  new_path=`$WHICH "$new_path" 2> /dev/null`
24358  # bat and cmd files are not always considered executable in cygwin causing which
24359  # to not find them
24360  if test "x$new_path" = x \
24361           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24362           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24363    new_path=`$CYGPATH -u "$path"`
24364  fi
24365  if test "x$new_path" = x; then
24366    # Oops. Which didn't find the executable.
24367    # The splitting of arguments from the executable at a space might have been incorrect,
24368    # since paths with space are more likely in Windows. Give it another try with the whole
24369    # argument.
24370    path="$complete"
24371    arguments="EOL"
24372    new_path=`$CYGPATH -u "$path"`
24373    new_path=`$WHICH "$new_path" 2> /dev/null`
24374    # bat and cmd files are not always considered executable in cygwin causing which
24375    # to not find them
24376    if test "x$new_path" = x \
24377             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24378             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24379      new_path=`$CYGPATH -u "$path"`
24380    fi
24381    if test "x$new_path" = x; then
24382      # It's still not found. Now this is an unrecoverable error.
24383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24384$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24385      has_space=`$ECHO "$complete" | $GREP " "`
24386      if test "x$has_space" != x; then
24387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24389      fi
24390      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24391    fi
24392  fi
24393
24394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24397  # "foo.exe" is OK but "foo" is an error.
24398  #
24399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24400  # It is also a way to make sure we got the proper file name for the real test later on.
24401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24402  if test "x$test_shortpath" = x; then
24403    # Short path failed, file does not exist as specified.
24404    # Try adding .exe or .cmd
24405    if test -f "${new_path}.exe"; then
24406       input_to_shortpath="${new_path}.exe"
24407    elif test -f "${new_path}.cmd"; then
24408       input_to_shortpath="${new_path}.cmd"
24409    else
24410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24411$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24412      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24413$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24414      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24415    fi
24416  else
24417    input_to_shortpath="$new_path"
24418  fi
24419
24420  # Call helper function which possibly converts this using DOS-style short mode.
24421  # If so, the updated path is stored in $new_path.
24422  new_path="$input_to_shortpath"
24423
24424  input_path="$input_to_shortpath"
24425  # Check if we need to convert this using DOS-style short mode. If the path
24426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24427  # take no chances and rewrite it.
24428  # Note: m4 eats our [], so we need to use [ and ] instead.
24429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24430  if test "x$has_forbidden_chars" != x; then
24431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24435      # Going to short mode and back again did indeed matter. Since short mode is
24436      # case insensitive, let's make it lowercase to improve readability.
24437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24438      # Now convert it back to Unix-stile (cygpath)
24439      input_path=`$CYGPATH -u "$shortmode_path"`
24440      new_path="$input_path"
24441    fi
24442  fi
24443
24444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24445  if test "x$test_cygdrive_prefix" = x; then
24446    # As a simple fix, exclude /usr/bin since it's not a real path.
24447    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24449      # a path prefixed by /cygdrive for fixpath to work.
24450      new_path="$CYGWIN_ROOT_PATH$input_path"
24451    fi
24452  fi
24453
24454  # remove trailing .exe if any
24455  new_path="${new_path/%.exe/}"
24456
24457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24458
24459  # First separate the path from the arguments. This will split at the first
24460  # space.
24461  complete="$AS"
24462  path="${complete%% *}"
24463  tmp="$complete EOL"
24464  arguments="${tmp#* }"
24465
24466  # Input might be given as Windows format, start by converting to
24467  # unix format.
24468  new_path="$path"
24469
24470  windows_path="$new_path"
24471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24472    unix_path=`$CYGPATH -u "$windows_path"`
24473    new_path="$unix_path"
24474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24476    new_path="$unix_path"
24477  fi
24478
24479
24480  # Now try to locate executable using which
24481  new_path=`$WHICH "$new_path" 2> /dev/null`
24482
24483  if test "x$new_path" = x; then
24484    # Oops. Which didn't find the executable.
24485    # The splitting of arguments from the executable at a space might have been incorrect,
24486    # since paths with space are more likely in Windows. Give it another try with the whole
24487    # argument.
24488    path="$complete"
24489    arguments="EOL"
24490    new_path="$path"
24491
24492  windows_path="$new_path"
24493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24494    unix_path=`$CYGPATH -u "$windows_path"`
24495    new_path="$unix_path"
24496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24498    new_path="$unix_path"
24499  fi
24500
24501
24502    new_path=`$WHICH "$new_path" 2> /dev/null`
24503
24504    if test "x$new_path" = x; then
24505      # It's still not found. Now this is an unrecoverable error.
24506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24507$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24508      has_space=`$ECHO "$complete" | $GREP " "`
24509      if test "x$has_space" != x; then
24510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24512      fi
24513      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24514    fi
24515  fi
24516
24517  # Now new_path has a complete unix path to the binary
24518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24519    # Keep paths in /bin as-is, but remove trailing .exe if any
24520    new_path="${new_path/%.exe/}"
24521    # Do not save /bin paths to all_fixpath_prefixes!
24522  else
24523    # Not in mixed or Windows style, start by that.
24524    new_path=`cmd //c echo $new_path`
24525
24526  input_path="$new_path"
24527  # Check if we need to convert this using DOS-style short mode. If the path
24528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24529  # take no chances and rewrite it.
24530  # Note: m4 eats our [], so we need to use [ and ] instead.
24531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24532  if test "x$has_forbidden_chars" != x; then
24533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24535  fi
24536
24537    # Output is in $new_path
24538
24539  windows_path="$new_path"
24540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24541    unix_path=`$CYGPATH -u "$windows_path"`
24542    new_path="$unix_path"
24543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24545    new_path="$unix_path"
24546  fi
24547
24548    # remove trailing .exe if any
24549    new_path="${new_path/%.exe/}"
24550
24551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24553  fi
24554
24555  else
24556    # We're on a posix platform. Hooray! :)
24557    # First separate the path from the arguments. This will split at the first
24558    # space.
24559    complete="$AS"
24560    path="${complete%% *}"
24561    tmp="$complete EOL"
24562    arguments="${tmp#* }"
24563
24564    # Cannot rely on the command "which" here since it doesn't always work.
24565    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24566    if test -z "$is_absolute_path"; then
24567      # Path to executable is not absolute. Find it.
24568      IFS_save="$IFS"
24569      IFS=:
24570      for p in $PATH; do
24571        if test -f "$p/$path" && test -x "$p/$path"; then
24572          new_path="$p/$path"
24573          break
24574        fi
24575      done
24576      IFS="$IFS_save"
24577    else
24578      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24579$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24580      new_path="$path"
24581    fi
24582
24583    if test "x$new_path" = x; then
24584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24585$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24586        has_space=`$ECHO "$complete" | $GREP " "`
24587        if test "x$has_space" != x; then
24588          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24589$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24590        fi
24591        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24592      fi
24593  fi
24594
24595      # Now join together the path and the arguments once again
24596      if test "x$arguments" != xEOL; then
24597        new_complete="$new_path ${arguments% *}"
24598      else
24599        new_complete="$new_path"
24600      fi
24601
24602  if test "x$complete" != "x$new_complete"; then
24603      AS="$new_complete"
24604      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24605$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24606    fi
24607
24608else
24609    AS="$CC -c"
24610fi
24611
24612
24613if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24614    for ac_prog in gnm nm
24615do
24616  # Extract the first word of "$ac_prog", so it can be a program name with args.
24617set dummy $ac_prog; ac_word=$2
24618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24619$as_echo_n "checking for $ac_word... " >&6; }
24620if test "${ac_cv_path_NM+set}" = set; then :
24621  $as_echo_n "(cached) " >&6
24622else
24623  case $NM in
24624  [\\/]* | ?:[\\/]*)
24625  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24626  ;;
24627  *)
24628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24629for as_dir in $PATH
24630do
24631  IFS=$as_save_IFS
24632  test -z "$as_dir" && as_dir=.
24633    for ac_exec_ext in '' $ac_executable_extensions; do
24634  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24635    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24637    break 2
24638  fi
24639done
24640  done
24641IFS=$as_save_IFS
24642
24643  ;;
24644esac
24645fi
24646NM=$ac_cv_path_NM
24647if test -n "$NM"; then
24648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24649$as_echo "$NM" >&6; }
24650else
24651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24652$as_echo "no" >&6; }
24653fi
24654
24655
24656  test -n "$NM" && break
24657done
24658
24659
24660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24661
24662  # First separate the path from the arguments. This will split at the first
24663  # space.
24664  complete="$NM"
24665  path="${complete%% *}"
24666  tmp="$complete EOL"
24667  arguments="${tmp#* }"
24668
24669  # Input might be given as Windows format, start by converting to
24670  # unix format.
24671  new_path=`$CYGPATH -u "$path"`
24672
24673  # Now try to locate executable using which
24674  new_path=`$WHICH "$new_path" 2> /dev/null`
24675  # bat and cmd files are not always considered executable in cygwin causing which
24676  # to not find them
24677  if test "x$new_path" = x \
24678           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24679           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24680    new_path=`$CYGPATH -u "$path"`
24681  fi
24682  if test "x$new_path" = x; then
24683    # Oops. Which didn't find the executable.
24684    # The splitting of arguments from the executable at a space might have been incorrect,
24685    # since paths with space are more likely in Windows. Give it another try with the whole
24686    # argument.
24687    path="$complete"
24688    arguments="EOL"
24689    new_path=`$CYGPATH -u "$path"`
24690    new_path=`$WHICH "$new_path" 2> /dev/null`
24691    # bat and cmd files are not always considered executable in cygwin causing which
24692    # to not find them
24693    if test "x$new_path" = x \
24694             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24695             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24696      new_path=`$CYGPATH -u "$path"`
24697    fi
24698    if test "x$new_path" = x; then
24699      # It's still not found. Now this is an unrecoverable error.
24700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24701$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24702      has_space=`$ECHO "$complete" | $GREP " "`
24703      if test "x$has_space" != x; then
24704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24706      fi
24707      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24708    fi
24709  fi
24710
24711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24714  # "foo.exe" is OK but "foo" is an error.
24715  #
24716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24717  # It is also a way to make sure we got the proper file name for the real test later on.
24718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24719  if test "x$test_shortpath" = x; then
24720    # Short path failed, file does not exist as specified.
24721    # Try adding .exe or .cmd
24722    if test -f "${new_path}.exe"; then
24723       input_to_shortpath="${new_path}.exe"
24724    elif test -f "${new_path}.cmd"; then
24725       input_to_shortpath="${new_path}.cmd"
24726    else
24727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24728$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24729      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24730$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24731      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24732    fi
24733  else
24734    input_to_shortpath="$new_path"
24735  fi
24736
24737  # Call helper function which possibly converts this using DOS-style short mode.
24738  # If so, the updated path is stored in $new_path.
24739  new_path="$input_to_shortpath"
24740
24741  input_path="$input_to_shortpath"
24742  # Check if we need to convert this using DOS-style short mode. If the path
24743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24744  # take no chances and rewrite it.
24745  # Note: m4 eats our [], so we need to use [ and ] instead.
24746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24747  if test "x$has_forbidden_chars" != x; then
24748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24752      # Going to short mode and back again did indeed matter. Since short mode is
24753      # case insensitive, let's make it lowercase to improve readability.
24754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24755      # Now convert it back to Unix-stile (cygpath)
24756      input_path=`$CYGPATH -u "$shortmode_path"`
24757      new_path="$input_path"
24758    fi
24759  fi
24760
24761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24762  if test "x$test_cygdrive_prefix" = x; then
24763    # As a simple fix, exclude /usr/bin since it's not a real path.
24764    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24766      # a path prefixed by /cygdrive for fixpath to work.
24767      new_path="$CYGWIN_ROOT_PATH$input_path"
24768    fi
24769  fi
24770
24771  # remove trailing .exe if any
24772  new_path="${new_path/%.exe/}"
24773
24774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24775
24776  # First separate the path from the arguments. This will split at the first
24777  # space.
24778  complete="$NM"
24779  path="${complete%% *}"
24780  tmp="$complete EOL"
24781  arguments="${tmp#* }"
24782
24783  # Input might be given as Windows format, start by converting to
24784  # unix format.
24785  new_path="$path"
24786
24787  windows_path="$new_path"
24788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24789    unix_path=`$CYGPATH -u "$windows_path"`
24790    new_path="$unix_path"
24791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24793    new_path="$unix_path"
24794  fi
24795
24796
24797  # Now try to locate executable using which
24798  new_path=`$WHICH "$new_path" 2> /dev/null`
24799
24800  if test "x$new_path" = x; then
24801    # Oops. Which didn't find the executable.
24802    # The splitting of arguments from the executable at a space might have been incorrect,
24803    # since paths with space are more likely in Windows. Give it another try with the whole
24804    # argument.
24805    path="$complete"
24806    arguments="EOL"
24807    new_path="$path"
24808
24809  windows_path="$new_path"
24810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24811    unix_path=`$CYGPATH -u "$windows_path"`
24812    new_path="$unix_path"
24813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24815    new_path="$unix_path"
24816  fi
24817
24818
24819    new_path=`$WHICH "$new_path" 2> /dev/null`
24820
24821    if test "x$new_path" = x; then
24822      # It's still not found. Now this is an unrecoverable error.
24823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24824$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24825      has_space=`$ECHO "$complete" | $GREP " "`
24826      if test "x$has_space" != x; then
24827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24829      fi
24830      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24831    fi
24832  fi
24833
24834  # Now new_path has a complete unix path to the binary
24835  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24836    # Keep paths in /bin as-is, but remove trailing .exe if any
24837    new_path="${new_path/%.exe/}"
24838    # Do not save /bin paths to all_fixpath_prefixes!
24839  else
24840    # Not in mixed or Windows style, start by that.
24841    new_path=`cmd //c echo $new_path`
24842
24843  input_path="$new_path"
24844  # Check if we need to convert this using DOS-style short mode. If the path
24845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24846  # take no chances and rewrite it.
24847  # Note: m4 eats our [], so we need to use [ and ] instead.
24848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24849  if test "x$has_forbidden_chars" != x; then
24850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24852  fi
24853
24854    # Output is in $new_path
24855
24856  windows_path="$new_path"
24857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24858    unix_path=`$CYGPATH -u "$windows_path"`
24859    new_path="$unix_path"
24860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24862    new_path="$unix_path"
24863  fi
24864
24865    # remove trailing .exe if any
24866    new_path="${new_path/%.exe/}"
24867
24868    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24869    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24870  fi
24871
24872  else
24873    # We're on a posix platform. Hooray! :)
24874    # First separate the path from the arguments. This will split at the first
24875    # space.
24876    complete="$NM"
24877    path="${complete%% *}"
24878    tmp="$complete EOL"
24879    arguments="${tmp#* }"
24880
24881    # Cannot rely on the command "which" here since it doesn't always work.
24882    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24883    if test -z "$is_absolute_path"; then
24884      # Path to executable is not absolute. Find it.
24885      IFS_save="$IFS"
24886      IFS=:
24887      for p in $PATH; do
24888        if test -f "$p/$path" && test -x "$p/$path"; then
24889          new_path="$p/$path"
24890          break
24891        fi
24892      done
24893      IFS="$IFS_save"
24894    else
24895      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24896$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24897      new_path="$path"
24898    fi
24899
24900    if test "x$new_path" = x; then
24901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24902$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24903        has_space=`$ECHO "$complete" | $GREP " "`
24904        if test "x$has_space" != x; then
24905          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24906$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24907        fi
24908        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24909      fi
24910  fi
24911
24912      # Now join together the path and the arguments once again
24913      if test "x$arguments" != xEOL; then
24914        new_complete="$new_path ${arguments% *}"
24915      else
24916        new_complete="$new_path"
24917      fi
24918
24919  if test "x$complete" != "x$new_complete"; then
24920      NM="$new_complete"
24921      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24922$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24923    fi
24924
24925    # Extract the first word of "strip", so it can be a program name with args.
24926set dummy strip; ac_word=$2
24927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24928$as_echo_n "checking for $ac_word... " >&6; }
24929if test "${ac_cv_path_STRIP+set}" = set; then :
24930  $as_echo_n "(cached) " >&6
24931else
24932  case $STRIP in
24933  [\\/]* | ?:[\\/]*)
24934  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24935  ;;
24936  *)
24937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24938for as_dir in $PATH
24939do
24940  IFS=$as_save_IFS
24941  test -z "$as_dir" && as_dir=.
24942    for ac_exec_ext in '' $ac_executable_extensions; do
24943  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24944    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24946    break 2
24947  fi
24948done
24949  done
24950IFS=$as_save_IFS
24951
24952  ;;
24953esac
24954fi
24955STRIP=$ac_cv_path_STRIP
24956if test -n "$STRIP"; then
24957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24958$as_echo "$STRIP" >&6; }
24959else
24960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24961$as_echo "no" >&6; }
24962fi
24963
24964
24965
24966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24967
24968  # First separate the path from the arguments. This will split at the first
24969  # space.
24970  complete="$STRIP"
24971  path="${complete%% *}"
24972  tmp="$complete EOL"
24973  arguments="${tmp#* }"
24974
24975  # Input might be given as Windows format, start by converting to
24976  # unix format.
24977  new_path=`$CYGPATH -u "$path"`
24978
24979  # Now try to locate executable using which
24980  new_path=`$WHICH "$new_path" 2> /dev/null`
24981  # bat and cmd files are not always considered executable in cygwin causing which
24982  # to not find them
24983  if test "x$new_path" = x \
24984           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24985           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24986    new_path=`$CYGPATH -u "$path"`
24987  fi
24988  if test "x$new_path" = x; then
24989    # Oops. Which didn't find the executable.
24990    # The splitting of arguments from the executable at a space might have been incorrect,
24991    # since paths with space are more likely in Windows. Give it another try with the whole
24992    # argument.
24993    path="$complete"
24994    arguments="EOL"
24995    new_path=`$CYGPATH -u "$path"`
24996    new_path=`$WHICH "$new_path" 2> /dev/null`
24997    # bat and cmd files are not always considered executable in cygwin causing which
24998    # to not find them
24999    if test "x$new_path" = x \
25000             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25001             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25002      new_path=`$CYGPATH -u "$path"`
25003    fi
25004    if test "x$new_path" = x; then
25005      # It's still not found. Now this is an unrecoverable error.
25006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25007$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25008      has_space=`$ECHO "$complete" | $GREP " "`
25009      if test "x$has_space" != x; then
25010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25012      fi
25013      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25014    fi
25015  fi
25016
25017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25020  # "foo.exe" is OK but "foo" is an error.
25021  #
25022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25023  # It is also a way to make sure we got the proper file name for the real test later on.
25024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25025  if test "x$test_shortpath" = x; then
25026    # Short path failed, file does not exist as specified.
25027    # Try adding .exe or .cmd
25028    if test -f "${new_path}.exe"; then
25029       input_to_shortpath="${new_path}.exe"
25030    elif test -f "${new_path}.cmd"; then
25031       input_to_shortpath="${new_path}.cmd"
25032    else
25033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25034$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25037      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25038    fi
25039  else
25040    input_to_shortpath="$new_path"
25041  fi
25042
25043  # Call helper function which possibly converts this using DOS-style short mode.
25044  # If so, the updated path is stored in $new_path.
25045  new_path="$input_to_shortpath"
25046
25047  input_path="$input_to_shortpath"
25048  # Check if we need to convert this using DOS-style short mode. If the path
25049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25050  # take no chances and rewrite it.
25051  # Note: m4 eats our [], so we need to use [ and ] instead.
25052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25053  if test "x$has_forbidden_chars" != x; then
25054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25058      # Going to short mode and back again did indeed matter. Since short mode is
25059      # case insensitive, let's make it lowercase to improve readability.
25060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25061      # Now convert it back to Unix-stile (cygpath)
25062      input_path=`$CYGPATH -u "$shortmode_path"`
25063      new_path="$input_path"
25064    fi
25065  fi
25066
25067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25068  if test "x$test_cygdrive_prefix" = x; then
25069    # As a simple fix, exclude /usr/bin since it's not a real path.
25070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25072      # a path prefixed by /cygdrive for fixpath to work.
25073      new_path="$CYGWIN_ROOT_PATH$input_path"
25074    fi
25075  fi
25076
25077  # remove trailing .exe if any
25078  new_path="${new_path/%.exe/}"
25079
25080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25081
25082  # First separate the path from the arguments. This will split at the first
25083  # space.
25084  complete="$STRIP"
25085  path="${complete%% *}"
25086  tmp="$complete EOL"
25087  arguments="${tmp#* }"
25088
25089  # Input might be given as Windows format, start by converting to
25090  # unix format.
25091  new_path="$path"
25092
25093  windows_path="$new_path"
25094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25095    unix_path=`$CYGPATH -u "$windows_path"`
25096    new_path="$unix_path"
25097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25099    new_path="$unix_path"
25100  fi
25101
25102
25103  # Now try to locate executable using which
25104  new_path=`$WHICH "$new_path" 2> /dev/null`
25105
25106  if test "x$new_path" = x; then
25107    # Oops. Which didn't find the executable.
25108    # The splitting of arguments from the executable at a space might have been incorrect,
25109    # since paths with space are more likely in Windows. Give it another try with the whole
25110    # argument.
25111    path="$complete"
25112    arguments="EOL"
25113    new_path="$path"
25114
25115  windows_path="$new_path"
25116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25117    unix_path=`$CYGPATH -u "$windows_path"`
25118    new_path="$unix_path"
25119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25121    new_path="$unix_path"
25122  fi
25123
25124
25125    new_path=`$WHICH "$new_path" 2> /dev/null`
25126
25127    if test "x$new_path" = x; then
25128      # It's still not found. Now this is an unrecoverable error.
25129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25130$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25131      has_space=`$ECHO "$complete" | $GREP " "`
25132      if test "x$has_space" != x; then
25133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25135      fi
25136      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25137    fi
25138  fi
25139
25140  # Now new_path has a complete unix path to the binary
25141  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25142    # Keep paths in /bin as-is, but remove trailing .exe if any
25143    new_path="${new_path/%.exe/}"
25144    # Do not save /bin paths to all_fixpath_prefixes!
25145  else
25146    # Not in mixed or Windows style, start by that.
25147    new_path=`cmd //c echo $new_path`
25148
25149  input_path="$new_path"
25150  # Check if we need to convert this using DOS-style short mode. If the path
25151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25152  # take no chances and rewrite it.
25153  # Note: m4 eats our [], so we need to use [ and ] instead.
25154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25155  if test "x$has_forbidden_chars" != x; then
25156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25158  fi
25159
25160    # Output is in $new_path
25161
25162  windows_path="$new_path"
25163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25164    unix_path=`$CYGPATH -u "$windows_path"`
25165    new_path="$unix_path"
25166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25168    new_path="$unix_path"
25169  fi
25170
25171    # remove trailing .exe if any
25172    new_path="${new_path/%.exe/}"
25173
25174    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25175    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25176  fi
25177
25178  else
25179    # We're on a posix platform. Hooray! :)
25180    # First separate the path from the arguments. This will split at the first
25181    # space.
25182    complete="$STRIP"
25183    path="${complete%% *}"
25184    tmp="$complete EOL"
25185    arguments="${tmp#* }"
25186
25187    # Cannot rely on the command "which" here since it doesn't always work.
25188    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25189    if test -z "$is_absolute_path"; then
25190      # Path to executable is not absolute. Find it.
25191      IFS_save="$IFS"
25192      IFS=:
25193      for p in $PATH; do
25194        if test -f "$p/$path" && test -x "$p/$path"; then
25195          new_path="$p/$path"
25196          break
25197        fi
25198      done
25199      IFS="$IFS_save"
25200    else
25201      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25202$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25203      new_path="$path"
25204    fi
25205
25206    if test "x$new_path" = x; then
25207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25208$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25209        has_space=`$ECHO "$complete" | $GREP " "`
25210        if test "x$has_space" != x; then
25211          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25212$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25213        fi
25214        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25215      fi
25216  fi
25217
25218      # Now join together the path and the arguments once again
25219      if test "x$arguments" != xEOL; then
25220        new_complete="$new_path ${arguments% *}"
25221      else
25222        new_complete="$new_path"
25223      fi
25224
25225  if test "x$complete" != "x$new_complete"; then
25226      STRIP="$new_complete"
25227      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25228$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25229    fi
25230
25231    # Extract the first word of "mcs", so it can be a program name with args.
25232set dummy mcs; ac_word=$2
25233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25234$as_echo_n "checking for $ac_word... " >&6; }
25235if test "${ac_cv_path_MCS+set}" = set; then :
25236  $as_echo_n "(cached) " >&6
25237else
25238  case $MCS in
25239  [\\/]* | ?:[\\/]*)
25240  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25241  ;;
25242  *)
25243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25244for as_dir in $PATH
25245do
25246  IFS=$as_save_IFS
25247  test -z "$as_dir" && as_dir=.
25248    for ac_exec_ext in '' $ac_executable_extensions; do
25249  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25250    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25252    break 2
25253  fi
25254done
25255  done
25256IFS=$as_save_IFS
25257
25258  ;;
25259esac
25260fi
25261MCS=$ac_cv_path_MCS
25262if test -n "$MCS"; then
25263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25264$as_echo "$MCS" >&6; }
25265else
25266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25267$as_echo "no" >&6; }
25268fi
25269
25270
25271
25272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25273
25274  # First separate the path from the arguments. This will split at the first
25275  # space.
25276  complete="$MCS"
25277  path="${complete%% *}"
25278  tmp="$complete EOL"
25279  arguments="${tmp#* }"
25280
25281  # Input might be given as Windows format, start by converting to
25282  # unix format.
25283  new_path=`$CYGPATH -u "$path"`
25284
25285  # Now try to locate executable using which
25286  new_path=`$WHICH "$new_path" 2> /dev/null`
25287  # bat and cmd files are not always considered executable in cygwin causing which
25288  # to not find them
25289  if test "x$new_path" = x \
25290           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25291           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25292    new_path=`$CYGPATH -u "$path"`
25293  fi
25294  if test "x$new_path" = x; then
25295    # Oops. Which didn't find the executable.
25296    # The splitting of arguments from the executable at a space might have been incorrect,
25297    # since paths with space are more likely in Windows. Give it another try with the whole
25298    # argument.
25299    path="$complete"
25300    arguments="EOL"
25301    new_path=`$CYGPATH -u "$path"`
25302    new_path=`$WHICH "$new_path" 2> /dev/null`
25303    # bat and cmd files are not always considered executable in cygwin causing which
25304    # to not find them
25305    if test "x$new_path" = x \
25306             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25307             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25308      new_path=`$CYGPATH -u "$path"`
25309    fi
25310    if test "x$new_path" = x; then
25311      # It's still not found. Now this is an unrecoverable error.
25312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25313$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25314      has_space=`$ECHO "$complete" | $GREP " "`
25315      if test "x$has_space" != x; then
25316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25318      fi
25319      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25320    fi
25321  fi
25322
25323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25326  # "foo.exe" is OK but "foo" is an error.
25327  #
25328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25329  # It is also a way to make sure we got the proper file name for the real test later on.
25330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25331  if test "x$test_shortpath" = x; then
25332    # Short path failed, file does not exist as specified.
25333    # Try adding .exe or .cmd
25334    if test -f "${new_path}.exe"; then
25335       input_to_shortpath="${new_path}.exe"
25336    elif test -f "${new_path}.cmd"; then
25337       input_to_shortpath="${new_path}.cmd"
25338    else
25339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25340$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25341      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25342$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25343      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25344    fi
25345  else
25346    input_to_shortpath="$new_path"
25347  fi
25348
25349  # Call helper function which possibly converts this using DOS-style short mode.
25350  # If so, the updated path is stored in $new_path.
25351  new_path="$input_to_shortpath"
25352
25353  input_path="$input_to_shortpath"
25354  # Check if we need to convert this using DOS-style short mode. If the path
25355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25356  # take no chances and rewrite it.
25357  # Note: m4 eats our [], so we need to use [ and ] instead.
25358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25359  if test "x$has_forbidden_chars" != x; then
25360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25364      # Going to short mode and back again did indeed matter. Since short mode is
25365      # case insensitive, let's make it lowercase to improve readability.
25366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25367      # Now convert it back to Unix-stile (cygpath)
25368      input_path=`$CYGPATH -u "$shortmode_path"`
25369      new_path="$input_path"
25370    fi
25371  fi
25372
25373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25374  if test "x$test_cygdrive_prefix" = x; then
25375    # As a simple fix, exclude /usr/bin since it's not a real path.
25376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25378      # a path prefixed by /cygdrive for fixpath to work.
25379      new_path="$CYGWIN_ROOT_PATH$input_path"
25380    fi
25381  fi
25382
25383  # remove trailing .exe if any
25384  new_path="${new_path/%.exe/}"
25385
25386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25387
25388  # First separate the path from the arguments. This will split at the first
25389  # space.
25390  complete="$MCS"
25391  path="${complete%% *}"
25392  tmp="$complete EOL"
25393  arguments="${tmp#* }"
25394
25395  # Input might be given as Windows format, start by converting to
25396  # unix format.
25397  new_path="$path"
25398
25399  windows_path="$new_path"
25400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25401    unix_path=`$CYGPATH -u "$windows_path"`
25402    new_path="$unix_path"
25403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25405    new_path="$unix_path"
25406  fi
25407
25408
25409  # Now try to locate executable using which
25410  new_path=`$WHICH "$new_path" 2> /dev/null`
25411
25412  if test "x$new_path" = x; then
25413    # Oops. Which didn't find the executable.
25414    # The splitting of arguments from the executable at a space might have been incorrect,
25415    # since paths with space are more likely in Windows. Give it another try with the whole
25416    # argument.
25417    path="$complete"
25418    arguments="EOL"
25419    new_path="$path"
25420
25421  windows_path="$new_path"
25422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25423    unix_path=`$CYGPATH -u "$windows_path"`
25424    new_path="$unix_path"
25425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25427    new_path="$unix_path"
25428  fi
25429
25430
25431    new_path=`$WHICH "$new_path" 2> /dev/null`
25432
25433    if test "x$new_path" = x; then
25434      # It's still not found. Now this is an unrecoverable error.
25435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25436$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25437      has_space=`$ECHO "$complete" | $GREP " "`
25438      if test "x$has_space" != x; then
25439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25441      fi
25442      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25443    fi
25444  fi
25445
25446  # Now new_path has a complete unix path to the binary
25447  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25448    # Keep paths in /bin as-is, but remove trailing .exe if any
25449    new_path="${new_path/%.exe/}"
25450    # Do not save /bin paths to all_fixpath_prefixes!
25451  else
25452    # Not in mixed or Windows style, start by that.
25453    new_path=`cmd //c echo $new_path`
25454
25455  input_path="$new_path"
25456  # Check if we need to convert this using DOS-style short mode. If the path
25457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25458  # take no chances and rewrite it.
25459  # Note: m4 eats our [], so we need to use [ and ] instead.
25460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25461  if test "x$has_forbidden_chars" != x; then
25462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25464  fi
25465
25466    # Output is in $new_path
25467
25468  windows_path="$new_path"
25469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25470    unix_path=`$CYGPATH -u "$windows_path"`
25471    new_path="$unix_path"
25472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25474    new_path="$unix_path"
25475  fi
25476
25477    # remove trailing .exe if any
25478    new_path="${new_path/%.exe/}"
25479
25480    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25481    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25482  fi
25483
25484  else
25485    # We're on a posix platform. Hooray! :)
25486    # First separate the path from the arguments. This will split at the first
25487    # space.
25488    complete="$MCS"
25489    path="${complete%% *}"
25490    tmp="$complete EOL"
25491    arguments="${tmp#* }"
25492
25493    # Cannot rely on the command "which" here since it doesn't always work.
25494    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25495    if test -z "$is_absolute_path"; then
25496      # Path to executable is not absolute. Find it.
25497      IFS_save="$IFS"
25498      IFS=:
25499      for p in $PATH; do
25500        if test -f "$p/$path" && test -x "$p/$path"; then
25501          new_path="$p/$path"
25502          break
25503        fi
25504      done
25505      IFS="$IFS_save"
25506    else
25507      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25508$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25509      new_path="$path"
25510    fi
25511
25512    if test "x$new_path" = x; then
25513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25514$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25515        has_space=`$ECHO "$complete" | $GREP " "`
25516        if test "x$has_space" != x; then
25517          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25518$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25519        fi
25520        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25521      fi
25522  fi
25523
25524      # Now join together the path and the arguments once again
25525      if test "x$arguments" != xEOL; then
25526        new_complete="$new_path ${arguments% *}"
25527      else
25528        new_complete="$new_path"
25529      fi
25530
25531  if test "x$complete" != "x$new_complete"; then
25532      MCS="$new_complete"
25533      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25534$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25535    fi
25536
25537elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25538    if test -n "$ac_tool_prefix"; then
25539  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25540set dummy ${ac_tool_prefix}nm; ac_word=$2
25541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25542$as_echo_n "checking for $ac_word... " >&6; }
25543if test "${ac_cv_prog_NM+set}" = set; then :
25544  $as_echo_n "(cached) " >&6
25545else
25546  if test -n "$NM"; then
25547  ac_cv_prog_NM="$NM" # Let the user override the test.
25548else
25549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25550for as_dir in $PATH
25551do
25552  IFS=$as_save_IFS
25553  test -z "$as_dir" && as_dir=.
25554    for ac_exec_ext in '' $ac_executable_extensions; do
25555  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25556    ac_cv_prog_NM="${ac_tool_prefix}nm"
25557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25558    break 2
25559  fi
25560done
25561  done
25562IFS=$as_save_IFS
25563
25564fi
25565fi
25566NM=$ac_cv_prog_NM
25567if test -n "$NM"; then
25568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25569$as_echo "$NM" >&6; }
25570else
25571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25572$as_echo "no" >&6; }
25573fi
25574
25575
25576fi
25577if test -z "$ac_cv_prog_NM"; then
25578  ac_ct_NM=$NM
25579  # Extract the first word of "nm", so it can be a program name with args.
25580set dummy nm; ac_word=$2
25581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25582$as_echo_n "checking for $ac_word... " >&6; }
25583if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25584  $as_echo_n "(cached) " >&6
25585else
25586  if test -n "$ac_ct_NM"; then
25587  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25588else
25589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25590for as_dir in $PATH
25591do
25592  IFS=$as_save_IFS
25593  test -z "$as_dir" && as_dir=.
25594    for ac_exec_ext in '' $ac_executable_extensions; do
25595  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25596    ac_cv_prog_ac_ct_NM="nm"
25597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25598    break 2
25599  fi
25600done
25601  done
25602IFS=$as_save_IFS
25603
25604fi
25605fi
25606ac_ct_NM=$ac_cv_prog_ac_ct_NM
25607if test -n "$ac_ct_NM"; then
25608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25609$as_echo "$ac_ct_NM" >&6; }
25610else
25611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25612$as_echo "no" >&6; }
25613fi
25614
25615  if test "x$ac_ct_NM" = x; then
25616    NM=""
25617  else
25618    case $cross_compiling:$ac_tool_warned in
25619yes:)
25620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25622ac_tool_warned=yes ;;
25623esac
25624    NM=$ac_ct_NM
25625  fi
25626else
25627  NM="$ac_cv_prog_NM"
25628fi
25629
25630
25631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25632
25633  # First separate the path from the arguments. This will split at the first
25634  # space.
25635  complete="$NM"
25636  path="${complete%% *}"
25637  tmp="$complete EOL"
25638  arguments="${tmp#* }"
25639
25640  # Input might be given as Windows format, start by converting to
25641  # unix format.
25642  new_path=`$CYGPATH -u "$path"`
25643
25644  # Now try to locate executable using which
25645  new_path=`$WHICH "$new_path" 2> /dev/null`
25646  # bat and cmd files are not always considered executable in cygwin causing which
25647  # to not find them
25648  if test "x$new_path" = x \
25649           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25650           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25651    new_path=`$CYGPATH -u "$path"`
25652  fi
25653  if test "x$new_path" = x; then
25654    # Oops. Which didn't find the executable.
25655    # The splitting of arguments from the executable at a space might have been incorrect,
25656    # since paths with space are more likely in Windows. Give it another try with the whole
25657    # argument.
25658    path="$complete"
25659    arguments="EOL"
25660    new_path=`$CYGPATH -u "$path"`
25661    new_path=`$WHICH "$new_path" 2> /dev/null`
25662    # bat and cmd files are not always considered executable in cygwin causing which
25663    # to not find them
25664    if test "x$new_path" = x \
25665             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25666             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25667      new_path=`$CYGPATH -u "$path"`
25668    fi
25669    if test "x$new_path" = x; then
25670      # It's still not found. Now this is an unrecoverable error.
25671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25672$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25673      has_space=`$ECHO "$complete" | $GREP " "`
25674      if test "x$has_space" != x; then
25675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25677      fi
25678      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25679    fi
25680  fi
25681
25682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25685  # "foo.exe" is OK but "foo" is an error.
25686  #
25687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25688  # It is also a way to make sure we got the proper file name for the real test later on.
25689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25690  if test "x$test_shortpath" = x; then
25691    # Short path failed, file does not exist as specified.
25692    # Try adding .exe or .cmd
25693    if test -f "${new_path}.exe"; then
25694       input_to_shortpath="${new_path}.exe"
25695    elif test -f "${new_path}.cmd"; then
25696       input_to_shortpath="${new_path}.cmd"
25697    else
25698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25699$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25700      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25701$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25702      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25703    fi
25704  else
25705    input_to_shortpath="$new_path"
25706  fi
25707
25708  # Call helper function which possibly converts this using DOS-style short mode.
25709  # If so, the updated path is stored in $new_path.
25710  new_path="$input_to_shortpath"
25711
25712  input_path="$input_to_shortpath"
25713  # Check if we need to convert this using DOS-style short mode. If the path
25714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25715  # take no chances and rewrite it.
25716  # Note: m4 eats our [], so we need to use [ and ] instead.
25717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25718  if test "x$has_forbidden_chars" != x; then
25719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25723      # Going to short mode and back again did indeed matter. Since short mode is
25724      # case insensitive, let's make it lowercase to improve readability.
25725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25726      # Now convert it back to Unix-stile (cygpath)
25727      input_path=`$CYGPATH -u "$shortmode_path"`
25728      new_path="$input_path"
25729    fi
25730  fi
25731
25732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25733  if test "x$test_cygdrive_prefix" = x; then
25734    # As a simple fix, exclude /usr/bin since it's not a real path.
25735    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25737      # a path prefixed by /cygdrive for fixpath to work.
25738      new_path="$CYGWIN_ROOT_PATH$input_path"
25739    fi
25740  fi
25741
25742  # remove trailing .exe if any
25743  new_path="${new_path/%.exe/}"
25744
25745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25746
25747  # First separate the path from the arguments. This will split at the first
25748  # space.
25749  complete="$NM"
25750  path="${complete%% *}"
25751  tmp="$complete EOL"
25752  arguments="${tmp#* }"
25753
25754  # Input might be given as Windows format, start by converting to
25755  # unix format.
25756  new_path="$path"
25757
25758  windows_path="$new_path"
25759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25760    unix_path=`$CYGPATH -u "$windows_path"`
25761    new_path="$unix_path"
25762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25764    new_path="$unix_path"
25765  fi
25766
25767
25768  # Now try to locate executable using which
25769  new_path=`$WHICH "$new_path" 2> /dev/null`
25770
25771  if test "x$new_path" = x; then
25772    # Oops. Which didn't find the executable.
25773    # The splitting of arguments from the executable at a space might have been incorrect,
25774    # since paths with space are more likely in Windows. Give it another try with the whole
25775    # argument.
25776    path="$complete"
25777    arguments="EOL"
25778    new_path="$path"
25779
25780  windows_path="$new_path"
25781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25782    unix_path=`$CYGPATH -u "$windows_path"`
25783    new_path="$unix_path"
25784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25786    new_path="$unix_path"
25787  fi
25788
25789
25790    new_path=`$WHICH "$new_path" 2> /dev/null`
25791
25792    if test "x$new_path" = x; then
25793      # It's still not found. Now this is an unrecoverable error.
25794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25795$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25796      has_space=`$ECHO "$complete" | $GREP " "`
25797      if test "x$has_space" != x; then
25798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25800      fi
25801      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25802    fi
25803  fi
25804
25805  # Now new_path has a complete unix path to the binary
25806  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25807    # Keep paths in /bin as-is, but remove trailing .exe if any
25808    new_path="${new_path/%.exe/}"
25809    # Do not save /bin paths to all_fixpath_prefixes!
25810  else
25811    # Not in mixed or Windows style, start by that.
25812    new_path=`cmd //c echo $new_path`
25813
25814  input_path="$new_path"
25815  # Check if we need to convert this using DOS-style short mode. If the path
25816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25817  # take no chances and rewrite it.
25818  # Note: m4 eats our [], so we need to use [ and ] instead.
25819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25820  if test "x$has_forbidden_chars" != x; then
25821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25823  fi
25824
25825    # Output is in $new_path
25826
25827  windows_path="$new_path"
25828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25829    unix_path=`$CYGPATH -u "$windows_path"`
25830    new_path="$unix_path"
25831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25833    new_path="$unix_path"
25834  fi
25835
25836    # remove trailing .exe if any
25837    new_path="${new_path/%.exe/}"
25838
25839    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25840    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25841  fi
25842
25843  else
25844    # We're on a posix platform. Hooray! :)
25845    # First separate the path from the arguments. This will split at the first
25846    # space.
25847    complete="$NM"
25848    path="${complete%% *}"
25849    tmp="$complete EOL"
25850    arguments="${tmp#* }"
25851
25852    # Cannot rely on the command "which" here since it doesn't always work.
25853    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25854    if test -z "$is_absolute_path"; then
25855      # Path to executable is not absolute. Find it.
25856      IFS_save="$IFS"
25857      IFS=:
25858      for p in $PATH; do
25859        if test -f "$p/$path" && test -x "$p/$path"; then
25860          new_path="$p/$path"
25861          break
25862        fi
25863      done
25864      IFS="$IFS_save"
25865    else
25866      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25867$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25868      new_path="$path"
25869    fi
25870
25871    if test "x$new_path" = x; then
25872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25873$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25874        has_space=`$ECHO "$complete" | $GREP " "`
25875        if test "x$has_space" != x; then
25876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25878        fi
25879        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25880      fi
25881  fi
25882
25883      # Now join together the path and the arguments once again
25884      if test "x$arguments" != xEOL; then
25885        new_complete="$new_path ${arguments% *}"
25886      else
25887        new_complete="$new_path"
25888      fi
25889
25890  if test "x$complete" != "x$new_complete"; then
25891      NM="$new_complete"
25892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25893$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25894    fi
25895
25896    if test -n "$ac_tool_prefix"; then
25897  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25898set dummy ${ac_tool_prefix}strip; ac_word=$2
25899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25900$as_echo_n "checking for $ac_word... " >&6; }
25901if test "${ac_cv_prog_STRIP+set}" = set; then :
25902  $as_echo_n "(cached) " >&6
25903else
25904  if test -n "$STRIP"; then
25905  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25906else
25907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25908for as_dir in $PATH
25909do
25910  IFS=$as_save_IFS
25911  test -z "$as_dir" && as_dir=.
25912    for ac_exec_ext in '' $ac_executable_extensions; do
25913  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25914    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25916    break 2
25917  fi
25918done
25919  done
25920IFS=$as_save_IFS
25921
25922fi
25923fi
25924STRIP=$ac_cv_prog_STRIP
25925if test -n "$STRIP"; then
25926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25927$as_echo "$STRIP" >&6; }
25928else
25929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25930$as_echo "no" >&6; }
25931fi
25932
25933
25934fi
25935if test -z "$ac_cv_prog_STRIP"; then
25936  ac_ct_STRIP=$STRIP
25937  # Extract the first word of "strip", so it can be a program name with args.
25938set dummy strip; ac_word=$2
25939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25940$as_echo_n "checking for $ac_word... " >&6; }
25941if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25942  $as_echo_n "(cached) " >&6
25943else
25944  if test -n "$ac_ct_STRIP"; then
25945  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25946else
25947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25948for as_dir in $PATH
25949do
25950  IFS=$as_save_IFS
25951  test -z "$as_dir" && as_dir=.
25952    for ac_exec_ext in '' $ac_executable_extensions; do
25953  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25954    ac_cv_prog_ac_ct_STRIP="strip"
25955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25956    break 2
25957  fi
25958done
25959  done
25960IFS=$as_save_IFS
25961
25962fi
25963fi
25964ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25965if test -n "$ac_ct_STRIP"; then
25966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25967$as_echo "$ac_ct_STRIP" >&6; }
25968else
25969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25970$as_echo "no" >&6; }
25971fi
25972
25973  if test "x$ac_ct_STRIP" = x; then
25974    STRIP=""
25975  else
25976    case $cross_compiling:$ac_tool_warned in
25977yes:)
25978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25980ac_tool_warned=yes ;;
25981esac
25982    STRIP=$ac_ct_STRIP
25983  fi
25984else
25985  STRIP="$ac_cv_prog_STRIP"
25986fi
25987
25988
25989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25990
25991  # First separate the path from the arguments. This will split at the first
25992  # space.
25993  complete="$STRIP"
25994  path="${complete%% *}"
25995  tmp="$complete EOL"
25996  arguments="${tmp#* }"
25997
25998  # Input might be given as Windows format, start by converting to
25999  # unix format.
26000  new_path=`$CYGPATH -u "$path"`
26001
26002  # Now try to locate executable using which
26003  new_path=`$WHICH "$new_path" 2> /dev/null`
26004  # bat and cmd files are not always considered executable in cygwin causing which
26005  # to not find them
26006  if test "x$new_path" = x \
26007           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26008           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26009    new_path=`$CYGPATH -u "$path"`
26010  fi
26011  if test "x$new_path" = x; then
26012    # Oops. Which didn't find the executable.
26013    # The splitting of arguments from the executable at a space might have been incorrect,
26014    # since paths with space are more likely in Windows. Give it another try with the whole
26015    # argument.
26016    path="$complete"
26017    arguments="EOL"
26018    new_path=`$CYGPATH -u "$path"`
26019    new_path=`$WHICH "$new_path" 2> /dev/null`
26020    # bat and cmd files are not always considered executable in cygwin causing which
26021    # to not find them
26022    if test "x$new_path" = x \
26023             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26024             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26025      new_path=`$CYGPATH -u "$path"`
26026    fi
26027    if test "x$new_path" = x; then
26028      # It's still not found. Now this is an unrecoverable error.
26029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26030$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26031      has_space=`$ECHO "$complete" | $GREP " "`
26032      if test "x$has_space" != x; then
26033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26035      fi
26036      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26037    fi
26038  fi
26039
26040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26043  # "foo.exe" is OK but "foo" is an error.
26044  #
26045  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26046  # It is also a way to make sure we got the proper file name for the real test later on.
26047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26048  if test "x$test_shortpath" = x; then
26049    # Short path failed, file does not exist as specified.
26050    # Try adding .exe or .cmd
26051    if test -f "${new_path}.exe"; then
26052       input_to_shortpath="${new_path}.exe"
26053    elif test -f "${new_path}.cmd"; then
26054       input_to_shortpath="${new_path}.cmd"
26055    else
26056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26057$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26058      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26059$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26060      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26061    fi
26062  else
26063    input_to_shortpath="$new_path"
26064  fi
26065
26066  # Call helper function which possibly converts this using DOS-style short mode.
26067  # If so, the updated path is stored in $new_path.
26068  new_path="$input_to_shortpath"
26069
26070  input_path="$input_to_shortpath"
26071  # Check if we need to convert this using DOS-style short mode. If the path
26072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26073  # take no chances and rewrite it.
26074  # Note: m4 eats our [], so we need to use [ and ] instead.
26075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26076  if test "x$has_forbidden_chars" != x; then
26077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26081      # Going to short mode and back again did indeed matter. Since short mode is
26082      # case insensitive, let's make it lowercase to improve readability.
26083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26084      # Now convert it back to Unix-stile (cygpath)
26085      input_path=`$CYGPATH -u "$shortmode_path"`
26086      new_path="$input_path"
26087    fi
26088  fi
26089
26090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26091  if test "x$test_cygdrive_prefix" = x; then
26092    # As a simple fix, exclude /usr/bin since it's not a real path.
26093    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26095      # a path prefixed by /cygdrive for fixpath to work.
26096      new_path="$CYGWIN_ROOT_PATH$input_path"
26097    fi
26098  fi
26099
26100  # remove trailing .exe if any
26101  new_path="${new_path/%.exe/}"
26102
26103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26104
26105  # First separate the path from the arguments. This will split at the first
26106  # space.
26107  complete="$STRIP"
26108  path="${complete%% *}"
26109  tmp="$complete EOL"
26110  arguments="${tmp#* }"
26111
26112  # Input might be given as Windows format, start by converting to
26113  # unix format.
26114  new_path="$path"
26115
26116  windows_path="$new_path"
26117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26118    unix_path=`$CYGPATH -u "$windows_path"`
26119    new_path="$unix_path"
26120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26122    new_path="$unix_path"
26123  fi
26124
26125
26126  # Now try to locate executable using which
26127  new_path=`$WHICH "$new_path" 2> /dev/null`
26128
26129  if test "x$new_path" = x; then
26130    # Oops. Which didn't find the executable.
26131    # The splitting of arguments from the executable at a space might have been incorrect,
26132    # since paths with space are more likely in Windows. Give it another try with the whole
26133    # argument.
26134    path="$complete"
26135    arguments="EOL"
26136    new_path="$path"
26137
26138  windows_path="$new_path"
26139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26140    unix_path=`$CYGPATH -u "$windows_path"`
26141    new_path="$unix_path"
26142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26144    new_path="$unix_path"
26145  fi
26146
26147
26148    new_path=`$WHICH "$new_path" 2> /dev/null`
26149
26150    if test "x$new_path" = x; then
26151      # It's still not found. Now this is an unrecoverable error.
26152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26153$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26154      has_space=`$ECHO "$complete" | $GREP " "`
26155      if test "x$has_space" != x; then
26156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26158      fi
26159      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26160    fi
26161  fi
26162
26163  # Now new_path has a complete unix path to the binary
26164  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26165    # Keep paths in /bin as-is, but remove trailing .exe if any
26166    new_path="${new_path/%.exe/}"
26167    # Do not save /bin paths to all_fixpath_prefixes!
26168  else
26169    # Not in mixed or Windows style, start by that.
26170    new_path=`cmd //c echo $new_path`
26171
26172  input_path="$new_path"
26173  # Check if we need to convert this using DOS-style short mode. If the path
26174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26175  # take no chances and rewrite it.
26176  # Note: m4 eats our [], so we need to use [ and ] instead.
26177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26178  if test "x$has_forbidden_chars" != x; then
26179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26181  fi
26182
26183    # Output is in $new_path
26184
26185  windows_path="$new_path"
26186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26187    unix_path=`$CYGPATH -u "$windows_path"`
26188    new_path="$unix_path"
26189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26191    new_path="$unix_path"
26192  fi
26193
26194    # remove trailing .exe if any
26195    new_path="${new_path/%.exe/}"
26196
26197    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26198    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26199  fi
26200
26201  else
26202    # We're on a posix platform. Hooray! :)
26203    # First separate the path from the arguments. This will split at the first
26204    # space.
26205    complete="$STRIP"
26206    path="${complete%% *}"
26207    tmp="$complete EOL"
26208    arguments="${tmp#* }"
26209
26210    # Cannot rely on the command "which" here since it doesn't always work.
26211    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26212    if test -z "$is_absolute_path"; then
26213      # Path to executable is not absolute. Find it.
26214      IFS_save="$IFS"
26215      IFS=:
26216      for p in $PATH; do
26217        if test -f "$p/$path" && test -x "$p/$path"; then
26218          new_path="$p/$path"
26219          break
26220        fi
26221      done
26222      IFS="$IFS_save"
26223    else
26224      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26225$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26226      new_path="$path"
26227    fi
26228
26229    if test "x$new_path" = x; then
26230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26231$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26232        has_space=`$ECHO "$complete" | $GREP " "`
26233        if test "x$has_space" != x; then
26234          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26235$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26236        fi
26237        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26238      fi
26239  fi
26240
26241      # Now join together the path and the arguments once again
26242      if test "x$arguments" != xEOL; then
26243        new_complete="$new_path ${arguments% *}"
26244      else
26245        new_complete="$new_path"
26246      fi
26247
26248  if test "x$complete" != "x$new_complete"; then
26249      STRIP="$new_complete"
26250      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26251$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26252    fi
26253
26254fi
26255
26256# objcopy is used for moving debug symbols to separate files when
26257# full debug symbols are enabled.
26258if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26259    if test -n "$ac_tool_prefix"; then
26260  for ac_prog in gobjcopy objcopy
26261  do
26262    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26263set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26265$as_echo_n "checking for $ac_word... " >&6; }
26266if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26267  $as_echo_n "(cached) " >&6
26268else
26269  if test -n "$OBJCOPY"; then
26270  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26271else
26272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26273for as_dir in $PATH
26274do
26275  IFS=$as_save_IFS
26276  test -z "$as_dir" && as_dir=.
26277    for ac_exec_ext in '' $ac_executable_extensions; do
26278  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26279    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26281    break 2
26282  fi
26283done
26284  done
26285IFS=$as_save_IFS
26286
26287fi
26288fi
26289OBJCOPY=$ac_cv_prog_OBJCOPY
26290if test -n "$OBJCOPY"; then
26291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26292$as_echo "$OBJCOPY" >&6; }
26293else
26294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26295$as_echo "no" >&6; }
26296fi
26297
26298
26299    test -n "$OBJCOPY" && break
26300  done
26301fi
26302if test -z "$OBJCOPY"; then
26303  ac_ct_OBJCOPY=$OBJCOPY
26304  for ac_prog in gobjcopy objcopy
26305do
26306  # Extract the first word of "$ac_prog", so it can be a program name with args.
26307set dummy $ac_prog; ac_word=$2
26308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26309$as_echo_n "checking for $ac_word... " >&6; }
26310if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26311  $as_echo_n "(cached) " >&6
26312else
26313  if test -n "$ac_ct_OBJCOPY"; then
26314  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26315else
26316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26317for as_dir in $PATH
26318do
26319  IFS=$as_save_IFS
26320  test -z "$as_dir" && as_dir=.
26321    for ac_exec_ext in '' $ac_executable_extensions; do
26322  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26323    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26325    break 2
26326  fi
26327done
26328  done
26329IFS=$as_save_IFS
26330
26331fi
26332fi
26333ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26334if test -n "$ac_ct_OBJCOPY"; then
26335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26336$as_echo "$ac_ct_OBJCOPY" >&6; }
26337else
26338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26339$as_echo "no" >&6; }
26340fi
26341
26342
26343  test -n "$ac_ct_OBJCOPY" && break
26344done
26345
26346  if test "x$ac_ct_OBJCOPY" = x; then
26347    OBJCOPY=""
26348  else
26349    case $cross_compiling:$ac_tool_warned in
26350yes:)
26351{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26352$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26353ac_tool_warned=yes ;;
26354esac
26355    OBJCOPY=$ac_ct_OBJCOPY
26356  fi
26357fi
26358
26359    # Only call fixup if objcopy was found.
26360    if test -n "$OBJCOPY"; then
26361
26362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26363
26364  # First separate the path from the arguments. This will split at the first
26365  # space.
26366  complete="$OBJCOPY"
26367  path="${complete%% *}"
26368  tmp="$complete EOL"
26369  arguments="${tmp#* }"
26370
26371  # Input might be given as Windows format, start by converting to
26372  # unix format.
26373  new_path=`$CYGPATH -u "$path"`
26374
26375  # Now try to locate executable using which
26376  new_path=`$WHICH "$new_path" 2> /dev/null`
26377  # bat and cmd files are not always considered executable in cygwin causing which
26378  # to not find them
26379  if test "x$new_path" = x \
26380           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26381           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26382    new_path=`$CYGPATH -u "$path"`
26383  fi
26384  if test "x$new_path" = x; then
26385    # Oops. Which didn't find the executable.
26386    # The splitting of arguments from the executable at a space might have been incorrect,
26387    # since paths with space are more likely in Windows. Give it another try with the whole
26388    # argument.
26389    path="$complete"
26390    arguments="EOL"
26391    new_path=`$CYGPATH -u "$path"`
26392    new_path=`$WHICH "$new_path" 2> /dev/null`
26393    # bat and cmd files are not always considered executable in cygwin causing which
26394    # to not find them
26395    if test "x$new_path" = x \
26396             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26397             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26398      new_path=`$CYGPATH -u "$path"`
26399    fi
26400    if test "x$new_path" = x; then
26401      # It's still not found. Now this is an unrecoverable error.
26402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26403$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26404      has_space=`$ECHO "$complete" | $GREP " "`
26405      if test "x$has_space" != x; then
26406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26408      fi
26409      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26410    fi
26411  fi
26412
26413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26416  # "foo.exe" is OK but "foo" is an error.
26417  #
26418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26419  # It is also a way to make sure we got the proper file name for the real test later on.
26420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26421  if test "x$test_shortpath" = x; then
26422    # Short path failed, file does not exist as specified.
26423    # Try adding .exe or .cmd
26424    if test -f "${new_path}.exe"; then
26425       input_to_shortpath="${new_path}.exe"
26426    elif test -f "${new_path}.cmd"; then
26427       input_to_shortpath="${new_path}.cmd"
26428    else
26429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26430$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26431      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26432$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26433      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26434    fi
26435  else
26436    input_to_shortpath="$new_path"
26437  fi
26438
26439  # Call helper function which possibly converts this using DOS-style short mode.
26440  # If so, the updated path is stored in $new_path.
26441  new_path="$input_to_shortpath"
26442
26443  input_path="$input_to_shortpath"
26444  # Check if we need to convert this using DOS-style short mode. If the path
26445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26446  # take no chances and rewrite it.
26447  # Note: m4 eats our [], so we need to use [ and ] instead.
26448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26449  if test "x$has_forbidden_chars" != x; then
26450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26454      # Going to short mode and back again did indeed matter. Since short mode is
26455      # case insensitive, let's make it lowercase to improve readability.
26456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26457      # Now convert it back to Unix-stile (cygpath)
26458      input_path=`$CYGPATH -u "$shortmode_path"`
26459      new_path="$input_path"
26460    fi
26461  fi
26462
26463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26464  if test "x$test_cygdrive_prefix" = x; then
26465    # As a simple fix, exclude /usr/bin since it's not a real path.
26466    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26468      # a path prefixed by /cygdrive for fixpath to work.
26469      new_path="$CYGWIN_ROOT_PATH$input_path"
26470    fi
26471  fi
26472
26473  # remove trailing .exe if any
26474  new_path="${new_path/%.exe/}"
26475
26476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26477
26478  # First separate the path from the arguments. This will split at the first
26479  # space.
26480  complete="$OBJCOPY"
26481  path="${complete%% *}"
26482  tmp="$complete EOL"
26483  arguments="${tmp#* }"
26484
26485  # Input might be given as Windows format, start by converting to
26486  # unix format.
26487  new_path="$path"
26488
26489  windows_path="$new_path"
26490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26491    unix_path=`$CYGPATH -u "$windows_path"`
26492    new_path="$unix_path"
26493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26495    new_path="$unix_path"
26496  fi
26497
26498
26499  # Now try to locate executable using which
26500  new_path=`$WHICH "$new_path" 2> /dev/null`
26501
26502  if test "x$new_path" = x; then
26503    # Oops. Which didn't find the executable.
26504    # The splitting of arguments from the executable at a space might have been incorrect,
26505    # since paths with space are more likely in Windows. Give it another try with the whole
26506    # argument.
26507    path="$complete"
26508    arguments="EOL"
26509    new_path="$path"
26510
26511  windows_path="$new_path"
26512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26513    unix_path=`$CYGPATH -u "$windows_path"`
26514    new_path="$unix_path"
26515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26517    new_path="$unix_path"
26518  fi
26519
26520
26521    new_path=`$WHICH "$new_path" 2> /dev/null`
26522
26523    if test "x$new_path" = x; then
26524      # It's still not found. Now this is an unrecoverable error.
26525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26526$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26527      has_space=`$ECHO "$complete" | $GREP " "`
26528      if test "x$has_space" != x; then
26529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26531      fi
26532      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26533    fi
26534  fi
26535
26536  # Now new_path has a complete unix path to the binary
26537  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26538    # Keep paths in /bin as-is, but remove trailing .exe if any
26539    new_path="${new_path/%.exe/}"
26540    # Do not save /bin paths to all_fixpath_prefixes!
26541  else
26542    # Not in mixed or Windows style, start by that.
26543    new_path=`cmd //c echo $new_path`
26544
26545  input_path="$new_path"
26546  # Check if we need to convert this using DOS-style short mode. If the path
26547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26548  # take no chances and rewrite it.
26549  # Note: m4 eats our [], so we need to use [ and ] instead.
26550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26551  if test "x$has_forbidden_chars" != x; then
26552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26554  fi
26555
26556    # Output is in $new_path
26557
26558  windows_path="$new_path"
26559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26560    unix_path=`$CYGPATH -u "$windows_path"`
26561    new_path="$unix_path"
26562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26564    new_path="$unix_path"
26565  fi
26566
26567    # remove trailing .exe if any
26568    new_path="${new_path/%.exe/}"
26569
26570    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26571    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26572  fi
26573
26574  else
26575    # We're on a posix platform. Hooray! :)
26576    # First separate the path from the arguments. This will split at the first
26577    # space.
26578    complete="$OBJCOPY"
26579    path="${complete%% *}"
26580    tmp="$complete EOL"
26581    arguments="${tmp#* }"
26582
26583    # Cannot rely on the command "which" here since it doesn't always work.
26584    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26585    if test -z "$is_absolute_path"; then
26586      # Path to executable is not absolute. Find it.
26587      IFS_save="$IFS"
26588      IFS=:
26589      for p in $PATH; do
26590        if test -f "$p/$path" && test -x "$p/$path"; then
26591          new_path="$p/$path"
26592          break
26593        fi
26594      done
26595      IFS="$IFS_save"
26596    else
26597      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26598$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26599      new_path="$path"
26600    fi
26601
26602    if test "x$new_path" = x; then
26603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26604$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26605        has_space=`$ECHO "$complete" | $GREP " "`
26606        if test "x$has_space" != x; then
26607          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26608$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26609        fi
26610        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26611      fi
26612  fi
26613
26614      # Now join together the path and the arguments once again
26615      if test "x$arguments" != xEOL; then
26616        new_complete="$new_path ${arguments% *}"
26617      else
26618        new_complete="$new_path"
26619      fi
26620
26621  if test "x$complete" != "x$new_complete"; then
26622      OBJCOPY="$new_complete"
26623      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26624$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26625    fi
26626
26627    fi
26628fi
26629
26630if test -n "$ac_tool_prefix"; then
26631  for ac_prog in gobjdump objdump
26632  do
26633    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26634set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26636$as_echo_n "checking for $ac_word... " >&6; }
26637if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26638  $as_echo_n "(cached) " >&6
26639else
26640  if test -n "$OBJDUMP"; then
26641  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26642else
26643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26644for as_dir in $PATH
26645do
26646  IFS=$as_save_IFS
26647  test -z "$as_dir" && as_dir=.
26648    for ac_exec_ext in '' $ac_executable_extensions; do
26649  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26650    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26652    break 2
26653  fi
26654done
26655  done
26656IFS=$as_save_IFS
26657
26658fi
26659fi
26660OBJDUMP=$ac_cv_prog_OBJDUMP
26661if test -n "$OBJDUMP"; then
26662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26663$as_echo "$OBJDUMP" >&6; }
26664else
26665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26666$as_echo "no" >&6; }
26667fi
26668
26669
26670    test -n "$OBJDUMP" && break
26671  done
26672fi
26673if test -z "$OBJDUMP"; then
26674  ac_ct_OBJDUMP=$OBJDUMP
26675  for ac_prog in gobjdump objdump
26676do
26677  # Extract the first word of "$ac_prog", so it can be a program name with args.
26678set dummy $ac_prog; ac_word=$2
26679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26680$as_echo_n "checking for $ac_word... " >&6; }
26681if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26682  $as_echo_n "(cached) " >&6
26683else
26684  if test -n "$ac_ct_OBJDUMP"; then
26685  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26686else
26687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26688for as_dir in $PATH
26689do
26690  IFS=$as_save_IFS
26691  test -z "$as_dir" && as_dir=.
26692    for ac_exec_ext in '' $ac_executable_extensions; do
26693  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26694    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26696    break 2
26697  fi
26698done
26699  done
26700IFS=$as_save_IFS
26701
26702fi
26703fi
26704ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26705if test -n "$ac_ct_OBJDUMP"; then
26706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26707$as_echo "$ac_ct_OBJDUMP" >&6; }
26708else
26709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26710$as_echo "no" >&6; }
26711fi
26712
26713
26714  test -n "$ac_ct_OBJDUMP" && break
26715done
26716
26717  if test "x$ac_ct_OBJDUMP" = x; then
26718    OBJDUMP=""
26719  else
26720    case $cross_compiling:$ac_tool_warned in
26721yes:)
26722{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26723$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26724ac_tool_warned=yes ;;
26725esac
26726    OBJDUMP=$ac_ct_OBJDUMP
26727  fi
26728fi
26729
26730if test "x$OBJDUMP" != x; then
26731  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26732
26733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26734
26735  # First separate the path from the arguments. This will split at the first
26736  # space.
26737  complete="$OBJDUMP"
26738  path="${complete%% *}"
26739  tmp="$complete EOL"
26740  arguments="${tmp#* }"
26741
26742  # Input might be given as Windows format, start by converting to
26743  # unix format.
26744  new_path=`$CYGPATH -u "$path"`
26745
26746  # Now try to locate executable using which
26747  new_path=`$WHICH "$new_path" 2> /dev/null`
26748  # bat and cmd files are not always considered executable in cygwin causing which
26749  # to not find them
26750  if test "x$new_path" = x \
26751           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26752           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26753    new_path=`$CYGPATH -u "$path"`
26754  fi
26755  if test "x$new_path" = x; then
26756    # Oops. Which didn't find the executable.
26757    # The splitting of arguments from the executable at a space might have been incorrect,
26758    # since paths with space are more likely in Windows. Give it another try with the whole
26759    # argument.
26760    path="$complete"
26761    arguments="EOL"
26762    new_path=`$CYGPATH -u "$path"`
26763    new_path=`$WHICH "$new_path" 2> /dev/null`
26764    # bat and cmd files are not always considered executable in cygwin causing which
26765    # to not find them
26766    if test "x$new_path" = x \
26767             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26768             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26769      new_path=`$CYGPATH -u "$path"`
26770    fi
26771    if test "x$new_path" = x; then
26772      # It's still not found. Now this is an unrecoverable error.
26773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26774$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26775      has_space=`$ECHO "$complete" | $GREP " "`
26776      if test "x$has_space" != x; then
26777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26779      fi
26780      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26781    fi
26782  fi
26783
26784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26787  # "foo.exe" is OK but "foo" is an error.
26788  #
26789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26790  # It is also a way to make sure we got the proper file name for the real test later on.
26791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26792  if test "x$test_shortpath" = x; then
26793    # Short path failed, file does not exist as specified.
26794    # Try adding .exe or .cmd
26795    if test -f "${new_path}.exe"; then
26796       input_to_shortpath="${new_path}.exe"
26797    elif test -f "${new_path}.cmd"; then
26798       input_to_shortpath="${new_path}.cmd"
26799    else
26800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26801$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26802      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26803$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26804      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26805    fi
26806  else
26807    input_to_shortpath="$new_path"
26808  fi
26809
26810  # Call helper function which possibly converts this using DOS-style short mode.
26811  # If so, the updated path is stored in $new_path.
26812  new_path="$input_to_shortpath"
26813
26814  input_path="$input_to_shortpath"
26815  # Check if we need to convert this using DOS-style short mode. If the path
26816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26817  # take no chances and rewrite it.
26818  # Note: m4 eats our [], so we need to use [ and ] instead.
26819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26820  if test "x$has_forbidden_chars" != x; then
26821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26825      # Going to short mode and back again did indeed matter. Since short mode is
26826      # case insensitive, let's make it lowercase to improve readability.
26827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26828      # Now convert it back to Unix-stile (cygpath)
26829      input_path=`$CYGPATH -u "$shortmode_path"`
26830      new_path="$input_path"
26831    fi
26832  fi
26833
26834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26835  if test "x$test_cygdrive_prefix" = x; then
26836    # As a simple fix, exclude /usr/bin since it's not a real path.
26837    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26839      # a path prefixed by /cygdrive for fixpath to work.
26840      new_path="$CYGWIN_ROOT_PATH$input_path"
26841    fi
26842  fi
26843
26844  # remove trailing .exe if any
26845  new_path="${new_path/%.exe/}"
26846
26847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26848
26849  # First separate the path from the arguments. This will split at the first
26850  # space.
26851  complete="$OBJDUMP"
26852  path="${complete%% *}"
26853  tmp="$complete EOL"
26854  arguments="${tmp#* }"
26855
26856  # Input might be given as Windows format, start by converting to
26857  # unix format.
26858  new_path="$path"
26859
26860  windows_path="$new_path"
26861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26862    unix_path=`$CYGPATH -u "$windows_path"`
26863    new_path="$unix_path"
26864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26866    new_path="$unix_path"
26867  fi
26868
26869
26870  # Now try to locate executable using which
26871  new_path=`$WHICH "$new_path" 2> /dev/null`
26872
26873  if test "x$new_path" = x; then
26874    # Oops. Which didn't find the executable.
26875    # The splitting of arguments from the executable at a space might have been incorrect,
26876    # since paths with space are more likely in Windows. Give it another try with the whole
26877    # argument.
26878    path="$complete"
26879    arguments="EOL"
26880    new_path="$path"
26881
26882  windows_path="$new_path"
26883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26884    unix_path=`$CYGPATH -u "$windows_path"`
26885    new_path="$unix_path"
26886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26888    new_path="$unix_path"
26889  fi
26890
26891
26892    new_path=`$WHICH "$new_path" 2> /dev/null`
26893
26894    if test "x$new_path" = x; then
26895      # It's still not found. Now this is an unrecoverable error.
26896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26897$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26898      has_space=`$ECHO "$complete" | $GREP " "`
26899      if test "x$has_space" != x; then
26900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26902      fi
26903      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26904    fi
26905  fi
26906
26907  # Now new_path has a complete unix path to the binary
26908  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26909    # Keep paths in /bin as-is, but remove trailing .exe if any
26910    new_path="${new_path/%.exe/}"
26911    # Do not save /bin paths to all_fixpath_prefixes!
26912  else
26913    # Not in mixed or Windows style, start by that.
26914    new_path=`cmd //c echo $new_path`
26915
26916  input_path="$new_path"
26917  # Check if we need to convert this using DOS-style short mode. If the path
26918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26919  # take no chances and rewrite it.
26920  # Note: m4 eats our [], so we need to use [ and ] instead.
26921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26922  if test "x$has_forbidden_chars" != x; then
26923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26925  fi
26926
26927    # Output is in $new_path
26928
26929  windows_path="$new_path"
26930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26931    unix_path=`$CYGPATH -u "$windows_path"`
26932    new_path="$unix_path"
26933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26935    new_path="$unix_path"
26936  fi
26937
26938    # remove trailing .exe if any
26939    new_path="${new_path/%.exe/}"
26940
26941    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26942    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26943  fi
26944
26945  else
26946    # We're on a posix platform. Hooray! :)
26947    # First separate the path from the arguments. This will split at the first
26948    # space.
26949    complete="$OBJDUMP"
26950    path="${complete%% *}"
26951    tmp="$complete EOL"
26952    arguments="${tmp#* }"
26953
26954    # Cannot rely on the command "which" here since it doesn't always work.
26955    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26956    if test -z "$is_absolute_path"; then
26957      # Path to executable is not absolute. Find it.
26958      IFS_save="$IFS"
26959      IFS=:
26960      for p in $PATH; do
26961        if test -f "$p/$path" && test -x "$p/$path"; then
26962          new_path="$p/$path"
26963          break
26964        fi
26965      done
26966      IFS="$IFS_save"
26967    else
26968      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26969$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26970      new_path="$path"
26971    fi
26972
26973    if test "x$new_path" = x; then
26974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26975$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26976        has_space=`$ECHO "$complete" | $GREP " "`
26977        if test "x$has_space" != x; then
26978          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26979$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26980        fi
26981        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26982      fi
26983  fi
26984
26985      # Now join together the path and the arguments once again
26986      if test "x$arguments" != xEOL; then
26987        new_complete="$new_path ${arguments% *}"
26988      else
26989        new_complete="$new_path"
26990      fi
26991
26992  if test "x$complete" != "x$new_complete"; then
26993      OBJDUMP="$new_complete"
26994      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26995$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26996    fi
26997
26998fi
26999
27000if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27001   # Extract the first word of "lipo", so it can be a program name with args.
27002set dummy lipo; ac_word=$2
27003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27004$as_echo_n "checking for $ac_word... " >&6; }
27005if test "${ac_cv_path_LIPO+set}" = set; then :
27006  $as_echo_n "(cached) " >&6
27007else
27008  case $LIPO in
27009  [\\/]* | ?:[\\/]*)
27010  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27011  ;;
27012  *)
27013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27014for as_dir in $PATH
27015do
27016  IFS=$as_save_IFS
27017  test -z "$as_dir" && as_dir=.
27018    for ac_exec_ext in '' $ac_executable_extensions; do
27019  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27020    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27022    break 2
27023  fi
27024done
27025  done
27026IFS=$as_save_IFS
27027
27028  ;;
27029esac
27030fi
27031LIPO=$ac_cv_path_LIPO
27032if test -n "$LIPO"; then
27033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27034$as_echo "$LIPO" >&6; }
27035else
27036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27037$as_echo "no" >&6; }
27038fi
27039
27040
27041
27042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27043
27044  # First separate the path from the arguments. This will split at the first
27045  # space.
27046  complete="$LIPO"
27047  path="${complete%% *}"
27048  tmp="$complete EOL"
27049  arguments="${tmp#* }"
27050
27051  # Input might be given as Windows format, start by converting to
27052  # unix format.
27053  new_path=`$CYGPATH -u "$path"`
27054
27055  # Now try to locate executable using which
27056  new_path=`$WHICH "$new_path" 2> /dev/null`
27057  # bat and cmd files are not always considered executable in cygwin causing which
27058  # to not find them
27059  if test "x$new_path" = x \
27060           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27061           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27062    new_path=`$CYGPATH -u "$path"`
27063  fi
27064  if test "x$new_path" = x; then
27065    # Oops. Which didn't find the executable.
27066    # The splitting of arguments from the executable at a space might have been incorrect,
27067    # since paths with space are more likely in Windows. Give it another try with the whole
27068    # argument.
27069    path="$complete"
27070    arguments="EOL"
27071    new_path=`$CYGPATH -u "$path"`
27072    new_path=`$WHICH "$new_path" 2> /dev/null`
27073    # bat and cmd files are not always considered executable in cygwin causing which
27074    # to not find them
27075    if test "x$new_path" = x \
27076             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27077             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27078      new_path=`$CYGPATH -u "$path"`
27079    fi
27080    if test "x$new_path" = x; then
27081      # It's still not found. Now this is an unrecoverable error.
27082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27083$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27084      has_space=`$ECHO "$complete" | $GREP " "`
27085      if test "x$has_space" != x; then
27086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27088      fi
27089      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27090    fi
27091  fi
27092
27093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27096  # "foo.exe" is OK but "foo" is an error.
27097  #
27098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27099  # It is also a way to make sure we got the proper file name for the real test later on.
27100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27101  if test "x$test_shortpath" = x; then
27102    # Short path failed, file does not exist as specified.
27103    # Try adding .exe or .cmd
27104    if test -f "${new_path}.exe"; then
27105       input_to_shortpath="${new_path}.exe"
27106    elif test -f "${new_path}.cmd"; then
27107       input_to_shortpath="${new_path}.cmd"
27108    else
27109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27110$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27111      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27112$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27113      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27114    fi
27115  else
27116    input_to_shortpath="$new_path"
27117  fi
27118
27119  # Call helper function which possibly converts this using DOS-style short mode.
27120  # If so, the updated path is stored in $new_path.
27121  new_path="$input_to_shortpath"
27122
27123  input_path="$input_to_shortpath"
27124  # Check if we need to convert this using DOS-style short mode. If the path
27125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27126  # take no chances and rewrite it.
27127  # Note: m4 eats our [], so we need to use [ and ] instead.
27128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27129  if test "x$has_forbidden_chars" != x; then
27130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27134      # Going to short mode and back again did indeed matter. Since short mode is
27135      # case insensitive, let's make it lowercase to improve readability.
27136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27137      # Now convert it back to Unix-stile (cygpath)
27138      input_path=`$CYGPATH -u "$shortmode_path"`
27139      new_path="$input_path"
27140    fi
27141  fi
27142
27143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27144  if test "x$test_cygdrive_prefix" = x; then
27145    # As a simple fix, exclude /usr/bin since it's not a real path.
27146    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27148      # a path prefixed by /cygdrive for fixpath to work.
27149      new_path="$CYGWIN_ROOT_PATH$input_path"
27150    fi
27151  fi
27152
27153  # remove trailing .exe if any
27154  new_path="${new_path/%.exe/}"
27155
27156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27157
27158  # First separate the path from the arguments. This will split at the first
27159  # space.
27160  complete="$LIPO"
27161  path="${complete%% *}"
27162  tmp="$complete EOL"
27163  arguments="${tmp#* }"
27164
27165  # Input might be given as Windows format, start by converting to
27166  # unix format.
27167  new_path="$path"
27168
27169  windows_path="$new_path"
27170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27171    unix_path=`$CYGPATH -u "$windows_path"`
27172    new_path="$unix_path"
27173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27175    new_path="$unix_path"
27176  fi
27177
27178
27179  # Now try to locate executable using which
27180  new_path=`$WHICH "$new_path" 2> /dev/null`
27181
27182  if test "x$new_path" = x; then
27183    # Oops. Which didn't find the executable.
27184    # The splitting of arguments from the executable at a space might have been incorrect,
27185    # since paths with space are more likely in Windows. Give it another try with the whole
27186    # argument.
27187    path="$complete"
27188    arguments="EOL"
27189    new_path="$path"
27190
27191  windows_path="$new_path"
27192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27193    unix_path=`$CYGPATH -u "$windows_path"`
27194    new_path="$unix_path"
27195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27197    new_path="$unix_path"
27198  fi
27199
27200
27201    new_path=`$WHICH "$new_path" 2> /dev/null`
27202
27203    if test "x$new_path" = x; then
27204      # It's still not found. Now this is an unrecoverable error.
27205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27206$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27207      has_space=`$ECHO "$complete" | $GREP " "`
27208      if test "x$has_space" != x; then
27209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27211      fi
27212      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27213    fi
27214  fi
27215
27216  # Now new_path has a complete unix path to the binary
27217  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27218    # Keep paths in /bin as-is, but remove trailing .exe if any
27219    new_path="${new_path/%.exe/}"
27220    # Do not save /bin paths to all_fixpath_prefixes!
27221  else
27222    # Not in mixed or Windows style, start by that.
27223    new_path=`cmd //c echo $new_path`
27224
27225  input_path="$new_path"
27226  # Check if we need to convert this using DOS-style short mode. If the path
27227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27228  # take no chances and rewrite it.
27229  # Note: m4 eats our [], so we need to use [ and ] instead.
27230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27231  if test "x$has_forbidden_chars" != x; then
27232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27234  fi
27235
27236    # Output is in $new_path
27237
27238  windows_path="$new_path"
27239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27240    unix_path=`$CYGPATH -u "$windows_path"`
27241    new_path="$unix_path"
27242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27244    new_path="$unix_path"
27245  fi
27246
27247    # remove trailing .exe if any
27248    new_path="${new_path/%.exe/}"
27249
27250    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27251    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27252  fi
27253
27254  else
27255    # We're on a posix platform. Hooray! :)
27256    # First separate the path from the arguments. This will split at the first
27257    # space.
27258    complete="$LIPO"
27259    path="${complete%% *}"
27260    tmp="$complete EOL"
27261    arguments="${tmp#* }"
27262
27263    # Cannot rely on the command "which" here since it doesn't always work.
27264    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27265    if test -z "$is_absolute_path"; then
27266      # Path to executable is not absolute. Find it.
27267      IFS_save="$IFS"
27268      IFS=:
27269      for p in $PATH; do
27270        if test -f "$p/$path" && test -x "$p/$path"; then
27271          new_path="$p/$path"
27272          break
27273        fi
27274      done
27275      IFS="$IFS_save"
27276    else
27277      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27278$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27279      new_path="$path"
27280    fi
27281
27282    if test "x$new_path" = x; then
27283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27284$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27285        has_space=`$ECHO "$complete" | $GREP " "`
27286        if test "x$has_space" != x; then
27287          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27288$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27289        fi
27290        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27291      fi
27292  fi
27293
27294      # Now join together the path and the arguments once again
27295      if test "x$arguments" != xEOL; then
27296        new_complete="$new_path ${arguments% *}"
27297      else
27298        new_complete="$new_path"
27299      fi
27300
27301  if test "x$complete" != "x$new_complete"; then
27302      LIPO="$new_complete"
27303      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27304$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27305    fi
27306
27307fi
27308
27309# Restore old path without tools dir
27310PATH="$OLD_PATH"
27311
27312
27313# FIXME: Currently we must test this after paths but before flags. Fix!
27314
27315# And we can test some aspects on the target using configure macros.
27316
27317
27318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27319$as_echo_n "checking for ANSI C header files... " >&6; }
27320if test "${ac_cv_header_stdc+set}" = set; then :
27321  $as_echo_n "(cached) " >&6
27322else
27323  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27324/* end confdefs.h.  */
27325#include <stdlib.h>
27326#include <stdarg.h>
27327#include <string.h>
27328#include <float.h>
27329
27330int
27331main ()
27332{
27333
27334  ;
27335  return 0;
27336}
27337_ACEOF
27338if ac_fn_cxx_try_compile "$LINENO"; then :
27339  ac_cv_header_stdc=yes
27340else
27341  ac_cv_header_stdc=no
27342fi
27343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27344
27345if test $ac_cv_header_stdc = yes; then
27346  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27348/* end confdefs.h.  */
27349#include <string.h>
27350
27351_ACEOF
27352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27353  $EGREP "memchr" >/dev/null 2>&1; then :
27354
27355else
27356  ac_cv_header_stdc=no
27357fi
27358rm -f conftest*
27359
27360fi
27361
27362if test $ac_cv_header_stdc = yes; then
27363  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27365/* end confdefs.h.  */
27366#include <stdlib.h>
27367
27368_ACEOF
27369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27370  $EGREP "free" >/dev/null 2>&1; then :
27371
27372else
27373  ac_cv_header_stdc=no
27374fi
27375rm -f conftest*
27376
27377fi
27378
27379if test $ac_cv_header_stdc = yes; then
27380  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27381  if test "$cross_compiling" = yes; then :
27382  :
27383else
27384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27385/* end confdefs.h.  */
27386#include <ctype.h>
27387#include <stdlib.h>
27388#if ((' ' & 0x0FF) == 0x020)
27389# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27390# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27391#else
27392# define ISLOWER(c) \
27393		   (('a' <= (c) && (c) <= 'i') \
27394		     || ('j' <= (c) && (c) <= 'r') \
27395		     || ('s' <= (c) && (c) <= 'z'))
27396# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27397#endif
27398
27399#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27400int
27401main ()
27402{
27403  int i;
27404  for (i = 0; i < 256; i++)
27405    if (XOR (islower (i), ISLOWER (i))
27406	|| toupper (i) != TOUPPER (i))
27407      return 2;
27408  return 0;
27409}
27410_ACEOF
27411if ac_fn_cxx_try_run "$LINENO"; then :
27412
27413else
27414  ac_cv_header_stdc=no
27415fi
27416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27417  conftest.$ac_objext conftest.beam conftest.$ac_ext
27418fi
27419
27420fi
27421fi
27422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27423$as_echo "$ac_cv_header_stdc" >&6; }
27424if test $ac_cv_header_stdc = yes; then
27425
27426$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27427
27428fi
27429
27430# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27431for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27432		  inttypes.h stdint.h unistd.h
27433do :
27434  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27435ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27436"
27437if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27438  cat >>confdefs.h <<_ACEOF
27439#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27440_ACEOF
27441
27442fi
27443
27444done
27445
27446
27447
27448###############################################################################
27449#
27450# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27451# (The JVM can use 32 or 64 bit Java pointers but that decision
27452# is made at runtime.)
27453#
27454if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27455  # Always specify -m flags on Solaris
27456
27457  # keep track of c/cxx flags that we added outselves...
27458  #   to prevent emitting warning...
27459  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27460  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27461  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27462
27463  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27464  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27465  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27466
27467  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27468  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27469  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27470
27471elif test "x$COMPILE_TYPE" = xreduced; then
27472  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27473    # Specify -m if running reduced on other Posix platforms
27474
27475  # keep track of c/cxx flags that we added outselves...
27476  #   to prevent emitting warning...
27477  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27478  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27479  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27480
27481  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27482  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27483  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27484
27485  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27486  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27487  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27488
27489  fi
27490fi
27491
27492# Make compilation sanity check
27493for ac_header in stdio.h
27494do :
27495  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27496if test "x$ac_cv_header_stdio_h" = x""yes; then :
27497  cat >>confdefs.h <<_ACEOF
27498#define HAVE_STDIO_H 1
27499_ACEOF
27500
27501else
27502
27503  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27504$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27505  if test "x$COMPILE_TYPE" = xreduced; then
27506    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27507$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27508  elif test "x$COMPILE_TYPE" = xcross; then
27509    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27510$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27511  fi
27512  as_fn_error $? "Cannot continue." "$LINENO" 5
27513
27514fi
27515
27516done
27517
27518
27519# The cast to long int works around a bug in the HP C Compiler
27520# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27521# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27522# This bug is HP SR number 8606223364.
27523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27524$as_echo_n "checking size of int *... " >&6; }
27525if test "${ac_cv_sizeof_int_p+set}" = set; then :
27526  $as_echo_n "(cached) " >&6
27527else
27528  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27529
27530else
27531  if test "$ac_cv_type_int_p" = yes; then
27532     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27534as_fn_error 77 "cannot compute sizeof (int *)
27535See \`config.log' for more details" "$LINENO" 5 ; }
27536   else
27537     ac_cv_sizeof_int_p=0
27538   fi
27539fi
27540
27541fi
27542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27543$as_echo "$ac_cv_sizeof_int_p" >&6; }
27544
27545
27546
27547cat >>confdefs.h <<_ACEOF
27548#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27549_ACEOF
27550
27551
27552
27553if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27554  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27555  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27556fi
27557
27558if test "x$SIZEOF_INT_P" = x; then
27559    # The test failed, lets stick to the assumed value.
27560    { $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
27561$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27562else
27563    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27564
27565    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27566        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
27567    fi
27568fi
27569
27570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27571$as_echo_n "checking for target address size... " >&6; }
27572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27573$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27574
27575
27576###############################################################################
27577#
27578# Is the target little of big endian?
27579#
27580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27581$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27582if test "${ac_cv_c_bigendian+set}" = set; then :
27583  $as_echo_n "(cached) " >&6
27584else
27585  ac_cv_c_bigendian=unknown
27586    # See if we're dealing with a universal compiler.
27587    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27588/* end confdefs.h.  */
27589#ifndef __APPLE_CC__
27590	       not a universal capable compiler
27591	     #endif
27592	     typedef int dummy;
27593
27594_ACEOF
27595if ac_fn_cxx_try_compile "$LINENO"; then :
27596
27597	# Check for potential -arch flags.  It is not universal unless
27598	# there are at least two -arch flags with different values.
27599	ac_arch=
27600	ac_prev=
27601	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27602	 if test -n "$ac_prev"; then
27603	   case $ac_word in
27604	     i?86 | x86_64 | ppc | ppc64)
27605	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27606		 ac_arch=$ac_word
27607	       else
27608		 ac_cv_c_bigendian=universal
27609		 break
27610	       fi
27611	       ;;
27612	   esac
27613	   ac_prev=
27614	 elif test "x$ac_word" = "x-arch"; then
27615	   ac_prev=arch
27616	 fi
27617       done
27618fi
27619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27620    if test $ac_cv_c_bigendian = unknown; then
27621      # See if sys/param.h defines the BYTE_ORDER macro.
27622      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27623/* end confdefs.h.  */
27624#include <sys/types.h>
27625	     #include <sys/param.h>
27626
27627int
27628main ()
27629{
27630#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27631		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27632		     && LITTLE_ENDIAN)
27633	      bogus endian macros
27634	     #endif
27635
27636  ;
27637  return 0;
27638}
27639_ACEOF
27640if ac_fn_cxx_try_compile "$LINENO"; then :
27641  # It does; now see whether it defined to BIG_ENDIAN or not.
27642	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27643/* end confdefs.h.  */
27644#include <sys/types.h>
27645		#include <sys/param.h>
27646
27647int
27648main ()
27649{
27650#if BYTE_ORDER != BIG_ENDIAN
27651		 not big endian
27652		#endif
27653
27654  ;
27655  return 0;
27656}
27657_ACEOF
27658if ac_fn_cxx_try_compile "$LINENO"; then :
27659  ac_cv_c_bigendian=yes
27660else
27661  ac_cv_c_bigendian=no
27662fi
27663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27664fi
27665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27666    fi
27667    if test $ac_cv_c_bigendian = unknown; then
27668      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27669      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27670/* end confdefs.h.  */
27671#include <limits.h>
27672
27673int
27674main ()
27675{
27676#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27677	      bogus endian macros
27678	     #endif
27679
27680  ;
27681  return 0;
27682}
27683_ACEOF
27684if ac_fn_cxx_try_compile "$LINENO"; then :
27685  # It does; now see whether it defined to _BIG_ENDIAN or not.
27686	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27687/* end confdefs.h.  */
27688#include <limits.h>
27689
27690int
27691main ()
27692{
27693#ifndef _BIG_ENDIAN
27694		 not big endian
27695		#endif
27696
27697  ;
27698  return 0;
27699}
27700_ACEOF
27701if ac_fn_cxx_try_compile "$LINENO"; then :
27702  ac_cv_c_bigendian=yes
27703else
27704  ac_cv_c_bigendian=no
27705fi
27706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27707fi
27708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27709    fi
27710    if test $ac_cv_c_bigendian = unknown; then
27711      # Compile a test program.
27712      if test "$cross_compiling" = yes; then :
27713  # Try to guess by grepping values from an object file.
27714	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27715/* end confdefs.h.  */
27716short int ascii_mm[] =
27717		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27718		short int ascii_ii[] =
27719		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27720		int use_ascii (int i) {
27721		  return ascii_mm[i] + ascii_ii[i];
27722		}
27723		short int ebcdic_ii[] =
27724		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27725		short int ebcdic_mm[] =
27726		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27727		int use_ebcdic (int i) {
27728		  return ebcdic_mm[i] + ebcdic_ii[i];
27729		}
27730		extern int foo;
27731
27732int
27733main ()
27734{
27735return use_ascii (foo) == use_ebcdic (foo);
27736  ;
27737  return 0;
27738}
27739_ACEOF
27740if ac_fn_cxx_try_compile "$LINENO"; then :
27741  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27742	      ac_cv_c_bigendian=yes
27743	    fi
27744	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27745	      if test "$ac_cv_c_bigendian" = unknown; then
27746		ac_cv_c_bigendian=no
27747	      else
27748		# finding both strings is unlikely to happen, but who knows?
27749		ac_cv_c_bigendian=unknown
27750	      fi
27751	    fi
27752fi
27753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27754else
27755  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27756/* end confdefs.h.  */
27757$ac_includes_default
27758int
27759main ()
27760{
27761
27762	     /* Are we little or big endian?  From Harbison&Steele.  */
27763	     union
27764	     {
27765	       long int l;
27766	       char c[sizeof (long int)];
27767	     } u;
27768	     u.l = 1;
27769	     return u.c[sizeof (long int) - 1] == 1;
27770
27771  ;
27772  return 0;
27773}
27774_ACEOF
27775if ac_fn_cxx_try_run "$LINENO"; then :
27776  ac_cv_c_bigendian=no
27777else
27778  ac_cv_c_bigendian=yes
27779fi
27780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27781  conftest.$ac_objext conftest.beam conftest.$ac_ext
27782fi
27783
27784    fi
27785fi
27786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27787$as_echo "$ac_cv_c_bigendian" >&6; }
27788 case $ac_cv_c_bigendian in #(
27789   yes)
27790     ENDIAN="big";; #(
27791   no)
27792     ENDIAN="little" ;; #(
27793   universal)
27794     ENDIAN="universal_endianness"
27795     ;; #(
27796   *)
27797     ENDIAN="unknown" ;;
27798 esac
27799
27800
27801if test "x$ENDIAN" = xuniversal_endianness; then
27802    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27803fi
27804if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27805    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
27806fi
27807
27808
27809# Configure flags for the tools
27810
27811
27812###############################################################################
27813#
27814# How to compile shared libraries.
27815#
27816
27817if test "x$GCC" = xyes; then
27818    COMPILER_NAME=gcc
27819    PICFLAG="-fPIC"
27820    LIBRARY_PREFIX=lib
27821    SHARED_LIBRARY='lib$1.so'
27822    STATIC_LIBRARY='lib$1.a'
27823    SHARED_LIBRARY_FLAGS="-shared"
27824    SHARED_LIBRARY_SUFFIX='.so'
27825    STATIC_LIBRARY_SUFFIX='.a'
27826    OBJ_SUFFIX='.o'
27827    EXE_SUFFIX=''
27828    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27829    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27830    C_FLAG_REORDER=''
27831    CXX_FLAG_REORDER=''
27832    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27833    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27834    LD="$CC"
27835    LDEXE="$CC"
27836    LDCXX="$CXX"
27837    LDEXECXX="$CXX"
27838    POST_STRIP_CMD="$STRIP -g"
27839
27840    # Linking is different on MacOSX
27841    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27842        # Might change in the future to clang.
27843        COMPILER_NAME=gcc
27844        SHARED_LIBRARY='lib$1.dylib'
27845        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27846        SHARED_LIBRARY_SUFFIX='.dylib'
27847        EXE_SUFFIX=''
27848        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27849        SET_SHARED_LIBRARY_MAPFILE=''
27850        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27851        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27852        POST_STRIP_CMD="$STRIP -S"
27853    fi
27854else
27855    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27856        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27857        COMPILER_NAME=ossc
27858        PICFLAG="-KPIC"
27859        LIBRARY_PREFIX=lib
27860        SHARED_LIBRARY='lib$1.so'
27861        STATIC_LIBRARY='lib$1.a'
27862        SHARED_LIBRARY_FLAGS="-G"
27863        SHARED_LIBRARY_SUFFIX='.so'
27864        STATIC_LIBRARY_SUFFIX='.a'
27865        OBJ_SUFFIX='.o'
27866        EXE_SUFFIX=''
27867        SET_SHARED_LIBRARY_NAME=''
27868        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27869	C_FLAG_REORDER='-xF'
27870	CXX_FLAG_REORDER='-xF'
27871        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27872        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27873        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27874        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27875        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27876        POST_STRIP_CMD="$STRIP -x"
27877        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27878    fi
27879    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27880        # If it is not gcc, then assume it is the MS Visual Studio compiler
27881        COMPILER_NAME=cl
27882        PICFLAG=""
27883        LIBRARY_PREFIX=
27884        SHARED_LIBRARY='$1.dll'
27885        STATIC_LIBRARY='$1.lib'
27886        SHARED_LIBRARY_FLAGS="-LD"
27887        SHARED_LIBRARY_SUFFIX='.dll'
27888        STATIC_LIBRARY_SUFFIX='.lib'
27889        OBJ_SUFFIX='.obj'
27890        EXE_SUFFIX='.exe'
27891        SET_SHARED_LIBRARY_NAME=''
27892        SET_SHARED_LIBRARY_MAPFILE=''
27893        SET_SHARED_LIBRARY_ORIGIN=''
27894        SET_EXECUTABLE_ORIGIN=''
27895    fi
27896fi
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915# The (cross) compiler is now configured, we can now test capabilities
27916# of the target platform.
27917
27918
27919
27920###############################################################################
27921#
27922# Setup the opt flags for different compilers
27923# and different operating systems.
27924#
27925
27926#
27927# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27928#
27929if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27930    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27931    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27932    CFLAGS="$CFLAGS -mstackrealign"
27933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27934$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27935    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27936/* end confdefs.h.  */
27937int main() { return 0; }
27938_ACEOF
27939if ac_fn_cxx_try_link "$LINENO"; then :
27940
27941		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27942$as_echo "yes" >&6; }
27943
27944else
27945
27946		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27947$as_echo "no" >&6; }
27948	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27949
27950fi
27951rm -f core conftest.err conftest.$ac_objext \
27952    conftest$ac_exeext conftest.$ac_ext
27953fi
27954
27955C_FLAG_DEPS="-MMD -MF"
27956CXX_FLAG_DEPS="-MMD -MF"
27957
27958case $COMPILER_TYPE in
27959  CC )
27960    D_FLAG="-g"
27961    case $COMPILER_NAME in
27962      gcc )
27963      	case $OPENJDK_TARGET_OS in
27964	  macosx )
27965	    # On MacOSX we optimize for size, something
27966	    # we should do for all platforms?
27967	    C_O_FLAG_HI="-Os"
27968	    C_O_FLAG_NORM="-Os"
27969	    C_O_FLAG_NONE=""
27970	    ;;
27971	  *)
27972	    C_O_FLAG_HI="-O3"
27973	    C_O_FLAG_NORM="-O2"
27974	    C_O_FLAG_NONE="-O0"
27975	    CFLAGS_DEBUG_SYMBOLS="-g"
27976	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27977	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27978	       CFLAGS_DEBUG_SYMBOLS="-g1"
27979	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27980	    fi
27981	    ;;
27982	esac
27983        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27984        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27985        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27986        ;;
27987      ossc )
27988        #
27989        # Forte has different names for this with their C++ compiler...
27990        #
27991        C_FLAG_DEPS="-xMMD -xMF"
27992        CXX_FLAG_DEPS="-xMMD -xMF"
27993
27994        # Extra options used with HIGHEST
27995        #
27996        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27997        #          done with care, there are some assumptions below that need to
27998        #          be understood about the use of pointers, and IEEE behavior.
27999        #
28000        # Use non-standard floating point mode (not IEEE 754)
28001        CC_HIGHEST="$CC_HIGHEST -fns"
28002        # Do some simplification of floating point arithmetic (not IEEE 754)
28003        CC_HIGHEST="$CC_HIGHEST -fsimple"
28004        # Use single precision floating point with 'float'
28005        CC_HIGHEST="$CC_HIGHEST -fsingle"
28006        # Assume memory references via basic pointer types do not alias
28007        #   (Source with excessing pointer casting and data access with mixed
28008        #    pointer types are not recommended)
28009        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28010        # Use intrinsic or inline versions for math/std functions
28011        #   (If you expect perfect errno behavior, do not use this)
28012        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28013        # Loop data dependency optimizations (need -xO3 or higher)
28014        CC_HIGHEST="$CC_HIGHEST -xdepend"
28015        # Pointer parameters to functions do not overlap
28016        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28017        #    If you pass in multiple pointers to the same data, do not use this)
28018        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28019        # Inline some library routines
28020        #   (If you expect perfect errno behavior, do not use this)
28021        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28022        # Use optimized math routines
28023        #   (If you expect perfect errno behavior, do not use this)
28024        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28025        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28026
28027        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28028          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28029          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28030        fi
28031
28032        case $OPENJDK_TARGET_CPU_ARCH in
28033          x86)
28034            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28035            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28036            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28037            C_O_FLAG_NONE="-xregs=no%frameptr"
28038            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28039            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28040            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28041            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28042            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28043               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28044               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28045            fi
28046            ;;
28047          sparc)
28048            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28049            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28050            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28051            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28052            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28053            C_O_FLAG_NONE=""
28054            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28055            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28056            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28057            CXX_O_FLAG_NONE=""
28058            ;;
28059        esac
28060
28061    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28062    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28063    esac
28064    ;;
28065  CL )
28066    D_FLAG=
28067    C_O_FLAG_HIGHEST="-O2"
28068    C_O_FLAG_HI="-O1"
28069    C_O_FLAG_NORM="-O1"
28070    C_O_FLAG_NONE="-Od"
28071    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28072    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28073    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28074    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28075    ;;
28076esac
28077
28078if test -z "$C_O_FLAG_HIGHEST"; then
28079   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28080fi
28081
28082if test -z "$CXX_O_FLAG_HIGHEST"; then
28083   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28084fi
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28100   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28101$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28102fi
28103
28104if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28105   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28106$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28107fi
28108
28109if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28110   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28111$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28112fi
28113
28114
28115# Check whether --with-extra-cflags was given.
28116if test "${with_extra_cflags+set}" = set; then :
28117  withval=$with_extra_cflags;
28118fi
28119
28120
28121
28122# Check whether --with-extra-cxxflags was given.
28123if test "${with_extra_cxxflags+set}" = set; then :
28124  withval=$with_extra_cxxflags;
28125fi
28126
28127
28128
28129# Check whether --with-extra-ldflags was given.
28130if test "${with_extra_ldflags+set}" = set; then :
28131  withval=$with_extra_ldflags;
28132fi
28133
28134
28135CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28136CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28137LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28138
28139# Hotspot needs these set in their legacy form
28140LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28141LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28142LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28143
28144
28145
28146
28147
28148###############################################################################
28149#
28150# Now setup the CFLAGS and LDFLAGS for the JDK build.
28151# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28152#
28153case $COMPILER_NAME in
28154      gcc )
28155      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28156                          -pipe \
28157                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28158	  case $OPENJDK_TARGET_CPU_ARCH in
28159	  arm )
28160            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28161	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28162	  ;;
28163	  ppc )
28164            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28165	  ;;
28166	  * )
28167	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28168	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28169          ;;
28170	  esac
28171          ;;
28172      ossc )
28173          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28174          case $OPENJDK_TARGET_CPU_ARCH in
28175          x86 )
28176            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28177       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28178          ;;
28179          esac
28180
28181      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28182      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28183
28184          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28185          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28186          ;;
28187      cl )
28188          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28189               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28190	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28191	       -DWIN32 -DIAL"
28192          case $OPENJDK_TARGET_CPU in
28193              x86 )
28194                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28195                  ;;
28196              x86_64 )
28197                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28198                  ;;
28199          esac
28200          ;;
28201esac
28202
28203###############################################################################
28204
28205CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28206
28207# The package path is used only on macosx?
28208PACKAGE_PATH=/opt/local
28209
28210
28211if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28212    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28213    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28214    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28215    #   Note: -Dmacro         is the same as    #define macro 1
28216    #         -Dmacro=	    is the same as    #define macro
28217    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28218        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28219    else
28220        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28221    fi
28222else
28223    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28224fi
28225if test "x$OPENJDK_TARGET_OS" = xlinux; then
28226    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28227fi
28228if test "x$OPENJDK_TARGET_OS" = xwindows; then
28229    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28230fi
28231if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28232    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28233fi
28234if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28235    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28236fi
28237if test "x$OPENJDK_TARGET_OS" = xbsd; then
28238    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28239fi
28240if test "x$DEBUG_LEVEL" = xrelease; then
28241    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28242    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28243        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28244    fi
28245else
28246    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28247fi
28248
28249CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28250CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28251
28252CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28253        -I${JDK_OUTPUTDIR}/include \
28254        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28255        -I${JDK_TOPDIR}/src/share/javavm/export \
28256        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28257        -I${JDK_TOPDIR}/src/share/native/common \
28258        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28259
28260# The shared libraries are compiled using the picflag.
28261CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28262CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28263
28264# Executable flags
28265CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28266CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28267
28268# Now this is odd. The JDK native libraries have to link against libjvm.so
28269# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28270# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28271# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28272# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28273# libraries will link to whatever is in memory. Yuck.
28274#
28275# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28276if test "x$COMPILER_NAME" = xcl; then
28277    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28278    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28279        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28280    fi
28281    # TODO: make -debug optional "--disable-full-debug-symbols"
28282    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28283    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28284    LDFLAGS_JDKLIB_SUFFIX=""
28285    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28286        LDFLAGS_STACK_SIZE=1048576
28287    else
28288        LDFLAGS_STACK_SIZE=327680
28289    fi
28290    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28291else
28292    if test "x$COMPILER_NAME" = xgcc; then
28293        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28294        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28295        if test -n "$HAS_GNU_HASH"; then
28296            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28297        fi
28298        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28299          # And since we now know that the linker is gnu, then add -z defs, to forbid
28300          # undefined symbols in object files.
28301          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28302          if test "x$DEBUG_LEVEL" = "xrelease"; then
28303              # When building release libraries, tell the linker optimize them.
28304              # Should this be supplied to the OSS linker as well?
28305              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28306          fi
28307        fi
28308    fi
28309    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28310                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28311
28312    # On some platforms (mac) the linker warns about non existing -L dirs.
28313    # Add server first if available. Linking aginst client does not always produce the same results.
28314    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28315    # Default to server for other variants.
28316    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28317        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28318    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28319        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28320    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28321        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28322    else
28323        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28324    fi
28325
28326    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28327    if test "x$COMPILER_NAME" = xossc; then
28328        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28329    fi
28330
28331    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28332    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28333        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28334    fi
28335fi
28336
28337# Adjust flags according to debug level.
28338case $DEBUG_LEVEL in
28339      fastdebug )
28340              CFLAGS="$CFLAGS $D_FLAG"
28341              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28342              ;;
28343      slowdebug )
28344              CFLAGS="$CFLAGS $D_FLAG"
28345	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28346	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28347	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28348	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28349              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28350              ;;
28351esac
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367# Setup debug symbols (need objcopy from the toolchain for that)
28368
28369#
28370# ENABLE_DEBUG_SYMBOLS
28371# This must be done after the toolchain is setup, since we're looking at objcopy.
28372#
28373# Check whether --enable-debug-symbols was given.
28374if test "${enable_debug_symbols+set}" = set; then :
28375  enableval=$enable_debug_symbols;
28376fi
28377
28378
28379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28380$as_echo_n "checking if we should generate debug symbols... " >&6; }
28381
28382if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28383   # explicit enabling of enable-debug-symbols and can't find objcopy
28384   #   this is an error
28385   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28386fi
28387
28388if test "x$enable_debug_symbols" = "xyes"; then
28389  ENABLE_DEBUG_SYMBOLS=true
28390elif test "x$enable_debug_symbols" = "xno"; then
28391  ENABLE_DEBUG_SYMBOLS=false
28392else
28393  # default on macosx is false
28394  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28395    ENABLE_DEBUG_SYMBOLS=false
28396  # Default is on if objcopy is found, otherwise off
28397  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28398    ENABLE_DEBUG_SYMBOLS=true
28399  else
28400    ENABLE_DEBUG_SYMBOLS=false
28401  fi
28402fi
28403
28404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28405$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28406
28407#
28408# ZIP_DEBUGINFO_FILES
28409#
28410# Check whether --enable-zip-debug-info was given.
28411if test "${enable_zip_debug_info+set}" = set; then :
28412  enableval=$enable_zip_debug_info;
28413fi
28414
28415
28416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28417$as_echo_n "checking if we should zip debug-info files... " >&6; }
28418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28419$as_echo "${enable_zip_debug_info}" >&6; }
28420
28421if test "x${enable_zip_debug_info}" = "xno"; then
28422   ZIP_DEBUGINFO_FILES=false
28423else
28424   ZIP_DEBUGINFO_FILES=true
28425fi
28426
28427
28428
28429
28430
28431
28432
28433###############################################################################
28434#
28435# Check dependencies for external and internal libraries.
28436#
28437###############################################################################
28438
28439
28440
28441###############################################################################
28442#
28443# OS specific settings that we never will need to probe.
28444#
28445if test "x$OPENJDK_TARGET_OS" = xlinux; then
28446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28447$as_echo_n "checking what is not needed on Linux?... " >&6; }
28448    PULSE_NOT_NEEDED=yes
28449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28450$as_echo "pulse" >&6; }
28451fi
28452
28453if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28455$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28456    ALSA_NOT_NEEDED=yes
28457    PULSE_NOT_NEEDED=yes
28458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28459$as_echo "alsa pulse" >&6; }
28460fi
28461
28462if test "x$OPENJDK_TARGET_OS" = xwindows; then
28463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28464$as_echo_n "checking what is not needed on Windows?... " >&6; }
28465    CUPS_NOT_NEEDED=yes
28466    ALSA_NOT_NEEDED=yes
28467    PULSE_NOT_NEEDED=yes
28468    X11_NOT_NEEDED=yes
28469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28470$as_echo "alsa cups pulse x11" >&6; }
28471fi
28472
28473if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28475$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28476    ALSA_NOT_NEEDED=yes
28477    PULSE_NOT_NEEDED=yes
28478    X11_NOT_NEEDED=yes
28479    FREETYPE2_NOT_NEEDED=yes
28480    # If the java runtime framework is disabled, then we need X11.
28481    # This will be adjusted below.
28482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28483$as_echo "alsa pulse x11" >&6; }
28484fi
28485
28486if test "x$OPENJDK_TARGET_OS" = xbsd; then
28487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28488$as_echo_n "checking what is not needed on bsd?... " >&6; }
28489    ALSA_NOT_NEEDED=yes
28490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28491$as_echo "alsa" >&6; }
28492fi
28493
28494if test "x$OPENJDK" = "xfalse"; then
28495    FREETYPE2_NOT_NEEDED=yes
28496fi
28497
28498if test "x$SUPPORT_HEADFUL" = xno; then
28499    X11_NOT_NEEDED=yes
28500fi
28501
28502###############################################################################
28503#
28504# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28505# that uses this API.
28506#
28507# Check whether --enable-macosx-runtime-support was given.
28508if test "${enable_macosx_runtime_support+set}" = set; then :
28509  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28510else
28511  MACOSX_RUNTIME_SUPPORT="no"
28512fi
28513
28514
28515USE_MACOSX_RUNTIME_SUPPORT=no
28516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28517$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28518if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28519    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28520        MACOSX_RUNTIME_SUPPORT=yes
28521        USE_MACOSX_RUNTIME_SUPPORT=yes
28522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28523$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28524    else
28525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28526$as_echo "yes, but explicitly disabled." >&6; }
28527    fi
28528else
28529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28530$as_echo "no" >&6; }
28531fi
28532
28533if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28535$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28536    X11_NOT_NEEDED=
28537    FREETYPE2_NOT_NEEDED=
28538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28539$as_echo "alsa pulse" >&6; }
28540fi
28541
28542
28543
28544
28545###############################################################################
28546#
28547# Check for X Windows
28548#
28549
28550# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28551# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28552# --x-libraries for the sysroot, if that seems to be correct.
28553if test "x$SYS_ROOT" != "x/"; then
28554  if test "x$x_includes" = xNONE; then
28555    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28556      x_includes="$SYS_ROOT/usr/X11R6/include"
28557    fi
28558  fi
28559  if test "x$x_libraries" = xNONE; then
28560    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28561      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28562    fi
28563  fi
28564fi
28565
28566# Now let autoconf do it's magic
28567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28568$as_echo_n "checking for X... " >&6; }
28569
28570
28571# Check whether --with-x was given.
28572if test "${with_x+set}" = set; then :
28573  withval=$with_x;
28574fi
28575
28576# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28577if test "x$with_x" = xno; then
28578  # The user explicitly disabled X.
28579  have_x=disabled
28580else
28581  case $x_includes,$x_libraries in #(
28582    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28583    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28584  $as_echo_n "(cached) " >&6
28585else
28586  # One or both of the vars are not set, and there is no cached value.
28587ac_x_includes=no ac_x_libraries=no
28588rm -f -r conftest.dir
28589if mkdir conftest.dir; then
28590  cd conftest.dir
28591  cat >Imakefile <<'_ACEOF'
28592incroot:
28593	@echo incroot='${INCROOT}'
28594usrlibdir:
28595	@echo usrlibdir='${USRLIBDIR}'
28596libdir:
28597	@echo libdir='${LIBDIR}'
28598_ACEOF
28599  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28600    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28601    for ac_var in incroot usrlibdir libdir; do
28602      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28603    done
28604    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28605    for ac_extension in a so sl dylib la dll; do
28606      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28607	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28608	ac_im_usrlibdir=$ac_im_libdir; break
28609      fi
28610    done
28611    # Screen out bogus values from the imake configuration.  They are
28612    # bogus both because they are the default anyway, and because
28613    # using them would break gcc on systems where it needs fixed includes.
28614    case $ac_im_incroot in
28615	/usr/include) ac_x_includes= ;;
28616	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28617    esac
28618    case $ac_im_usrlibdir in
28619	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28620	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28621    esac
28622  fi
28623  cd ..
28624  rm -f -r conftest.dir
28625fi
28626
28627# Standard set of common directories for X headers.
28628# Check X11 before X11Rn because it is often a symlink to the current release.
28629ac_x_header_dirs='
28630/usr/X11/include
28631/usr/X11R7/include
28632/usr/X11R6/include
28633/usr/X11R5/include
28634/usr/X11R4/include
28635
28636/usr/include/X11
28637/usr/include/X11R7
28638/usr/include/X11R6
28639/usr/include/X11R5
28640/usr/include/X11R4
28641
28642/usr/local/X11/include
28643/usr/local/X11R7/include
28644/usr/local/X11R6/include
28645/usr/local/X11R5/include
28646/usr/local/X11R4/include
28647
28648/usr/local/include/X11
28649/usr/local/include/X11R7
28650/usr/local/include/X11R6
28651/usr/local/include/X11R5
28652/usr/local/include/X11R4
28653
28654/usr/X386/include
28655/usr/x386/include
28656/usr/XFree86/include/X11
28657
28658/usr/include
28659/usr/local/include
28660/usr/unsupported/include
28661/usr/athena/include
28662/usr/local/x11r5/include
28663/usr/lpp/Xamples/include
28664
28665/usr/openwin/include
28666/usr/openwin/share/include'
28667
28668if test "$ac_x_includes" = no; then
28669  # Guess where to find include files, by looking for Xlib.h.
28670  # First, try using that file with no special directory specified.
28671  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28672/* end confdefs.h.  */
28673#include <X11/Xlib.h>
28674_ACEOF
28675if ac_fn_cxx_try_cpp "$LINENO"; then :
28676  # We can compile using X headers with no special include directory.
28677ac_x_includes=
28678else
28679  for ac_dir in $ac_x_header_dirs; do
28680  if test -r "$ac_dir/X11/Xlib.h"; then
28681    ac_x_includes=$ac_dir
28682    break
28683  fi
28684done
28685fi
28686rm -f conftest.err conftest.i conftest.$ac_ext
28687fi # $ac_x_includes = no
28688
28689if test "$ac_x_libraries" = no; then
28690  # Check for the libraries.
28691  # See if we find them without any special options.
28692  # Don't add to $LIBS permanently.
28693  ac_save_LIBS=$LIBS
28694  LIBS="-lX11 $LIBS"
28695  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28696/* end confdefs.h.  */
28697#include <X11/Xlib.h>
28698int
28699main ()
28700{
28701XrmInitialize ()
28702  ;
28703  return 0;
28704}
28705_ACEOF
28706if ac_fn_cxx_try_link "$LINENO"; then :
28707  LIBS=$ac_save_LIBS
28708# We can link X programs with no special library path.
28709ac_x_libraries=
28710else
28711  LIBS=$ac_save_LIBS
28712for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28713do
28714  # Don't even attempt the hair of trying to link an X program!
28715  for ac_extension in a so sl dylib la dll; do
28716    if test -r "$ac_dir/libX11.$ac_extension"; then
28717      ac_x_libraries=$ac_dir
28718      break 2
28719    fi
28720  done
28721done
28722fi
28723rm -f core conftest.err conftest.$ac_objext \
28724    conftest$ac_exeext conftest.$ac_ext
28725fi # $ac_x_libraries = no
28726
28727case $ac_x_includes,$ac_x_libraries in #(
28728  no,* | *,no | *\'*)
28729    # Didn't find X, or a directory has "'" in its name.
28730    ac_cv_have_x="have_x=no";; #(
28731  *)
28732    # Record where we found X for the cache.
28733    ac_cv_have_x="have_x=yes\
28734	ac_x_includes='$ac_x_includes'\
28735	ac_x_libraries='$ac_x_libraries'"
28736esac
28737fi
28738;; #(
28739    *) have_x=yes;;
28740  esac
28741  eval "$ac_cv_have_x"
28742fi # $with_x != no
28743
28744if test "$have_x" != yes; then
28745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28746$as_echo "$have_x" >&6; }
28747  no_x=yes
28748else
28749  # If each of the values was on the command line, it overrides each guess.
28750  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28751  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28752  # Update the cache value to reflect the command line values.
28753  ac_cv_have_x="have_x=yes\
28754	ac_x_includes='$x_includes'\
28755	ac_x_libraries='$x_libraries'"
28756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28757$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28758fi
28759
28760if test "$no_x" = yes; then
28761  # Not all programs may use this symbol, but it does not hurt to define it.
28762
28763$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28764
28765  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28766else
28767  if test -n "$x_includes"; then
28768    X_CFLAGS="$X_CFLAGS -I$x_includes"
28769  fi
28770
28771  # It would also be nice to do this for all -L options, not just this one.
28772  if test -n "$x_libraries"; then
28773    X_LIBS="$X_LIBS -L$x_libraries"
28774    # For Solaris; some versions of Sun CC require a space after -R and
28775    # others require no space.  Words are not sufficient . . . .
28776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28777$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28778    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28779    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28780    ac_cxx_werror_flag=yes
28781    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28782/* end confdefs.h.  */
28783
28784int
28785main ()
28786{
28787
28788  ;
28789  return 0;
28790}
28791_ACEOF
28792if ac_fn_cxx_try_link "$LINENO"; then :
28793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28794$as_echo "no" >&6; }
28795       X_LIBS="$X_LIBS -R$x_libraries"
28796else
28797  LIBS="$ac_xsave_LIBS -R $x_libraries"
28798       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28799/* end confdefs.h.  */
28800
28801int
28802main ()
28803{
28804
28805  ;
28806  return 0;
28807}
28808_ACEOF
28809if ac_fn_cxx_try_link "$LINENO"; then :
28810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28811$as_echo "yes" >&6; }
28812	  X_LIBS="$X_LIBS -R $x_libraries"
28813else
28814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28815$as_echo "neither works" >&6; }
28816fi
28817rm -f core conftest.err conftest.$ac_objext \
28818    conftest$ac_exeext conftest.$ac_ext
28819fi
28820rm -f core conftest.err conftest.$ac_objext \
28821    conftest$ac_exeext conftest.$ac_ext
28822    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28823    LIBS=$ac_xsave_LIBS
28824  fi
28825
28826  # Check for system-dependent libraries X programs must link with.
28827  # Do this before checking for the system-independent R6 libraries
28828  # (-lICE), since we may need -lsocket or whatever for X linking.
28829
28830  if test "$ISC" = yes; then
28831    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28832  else
28833    # Martyn Johnson says this is needed for Ultrix, if the X
28834    # libraries were built with DECnet support.  And Karl Berry says
28835    # the Alpha needs dnet_stub (dnet does not exist).
28836    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28837    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28838/* end confdefs.h.  */
28839
28840/* Override any GCC internal prototype to avoid an error.
28841   Use char because int might match the return type of a GCC
28842   builtin and then its argument prototype would still apply.  */
28843#ifdef __cplusplus
28844extern "C"
28845#endif
28846char XOpenDisplay ();
28847int
28848main ()
28849{
28850return XOpenDisplay ();
28851  ;
28852  return 0;
28853}
28854_ACEOF
28855if ac_fn_cxx_try_link "$LINENO"; then :
28856
28857else
28858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28859$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28860if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28861  $as_echo_n "(cached) " >&6
28862else
28863  ac_check_lib_save_LIBS=$LIBS
28864LIBS="-ldnet  $LIBS"
28865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28866/* end confdefs.h.  */
28867
28868/* Override any GCC internal prototype to avoid an error.
28869   Use char because int might match the return type of a GCC
28870   builtin and then its argument prototype would still apply.  */
28871#ifdef __cplusplus
28872extern "C"
28873#endif
28874char dnet_ntoa ();
28875int
28876main ()
28877{
28878return dnet_ntoa ();
28879  ;
28880  return 0;
28881}
28882_ACEOF
28883if ac_fn_cxx_try_link "$LINENO"; then :
28884  ac_cv_lib_dnet_dnet_ntoa=yes
28885else
28886  ac_cv_lib_dnet_dnet_ntoa=no
28887fi
28888rm -f core conftest.err conftest.$ac_objext \
28889    conftest$ac_exeext conftest.$ac_ext
28890LIBS=$ac_check_lib_save_LIBS
28891fi
28892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28893$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28894if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28895  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28896fi
28897
28898    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28899      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28900$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28901if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28902  $as_echo_n "(cached) " >&6
28903else
28904  ac_check_lib_save_LIBS=$LIBS
28905LIBS="-ldnet_stub  $LIBS"
28906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28907/* end confdefs.h.  */
28908
28909/* Override any GCC internal prototype to avoid an error.
28910   Use char because int might match the return type of a GCC
28911   builtin and then its argument prototype would still apply.  */
28912#ifdef __cplusplus
28913extern "C"
28914#endif
28915char dnet_ntoa ();
28916int
28917main ()
28918{
28919return dnet_ntoa ();
28920  ;
28921  return 0;
28922}
28923_ACEOF
28924if ac_fn_cxx_try_link "$LINENO"; then :
28925  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28926else
28927  ac_cv_lib_dnet_stub_dnet_ntoa=no
28928fi
28929rm -f core conftest.err conftest.$ac_objext \
28930    conftest$ac_exeext conftest.$ac_ext
28931LIBS=$ac_check_lib_save_LIBS
28932fi
28933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28934$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28935if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28936  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28937fi
28938
28939    fi
28940fi
28941rm -f core conftest.err conftest.$ac_objext \
28942    conftest$ac_exeext conftest.$ac_ext
28943    LIBS="$ac_xsave_LIBS"
28944
28945    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28946    # to get the SysV transport functions.
28947    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28948    # needs -lnsl.
28949    # The nsl library prevents programs from opening the X display
28950    # on Irix 5.2, according to T.E. Dickey.
28951    # The functions gethostbyname, getservbyname, and inet_addr are
28952    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28953    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28954if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28955
28956fi
28957
28958    if test $ac_cv_func_gethostbyname = no; then
28959      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28960$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28961if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28962  $as_echo_n "(cached) " >&6
28963else
28964  ac_check_lib_save_LIBS=$LIBS
28965LIBS="-lnsl  $LIBS"
28966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28967/* end confdefs.h.  */
28968
28969/* Override any GCC internal prototype to avoid an error.
28970   Use char because int might match the return type of a GCC
28971   builtin and then its argument prototype would still apply.  */
28972#ifdef __cplusplus
28973extern "C"
28974#endif
28975char gethostbyname ();
28976int
28977main ()
28978{
28979return gethostbyname ();
28980  ;
28981  return 0;
28982}
28983_ACEOF
28984if ac_fn_cxx_try_link "$LINENO"; then :
28985  ac_cv_lib_nsl_gethostbyname=yes
28986else
28987  ac_cv_lib_nsl_gethostbyname=no
28988fi
28989rm -f core conftest.err conftest.$ac_objext \
28990    conftest$ac_exeext conftest.$ac_ext
28991LIBS=$ac_check_lib_save_LIBS
28992fi
28993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28994$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28995if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28996  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28997fi
28998
28999      if test $ac_cv_lib_nsl_gethostbyname = no; then
29000	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29001$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29002if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29003  $as_echo_n "(cached) " >&6
29004else
29005  ac_check_lib_save_LIBS=$LIBS
29006LIBS="-lbsd  $LIBS"
29007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29008/* end confdefs.h.  */
29009
29010/* Override any GCC internal prototype to avoid an error.
29011   Use char because int might match the return type of a GCC
29012   builtin and then its argument prototype would still apply.  */
29013#ifdef __cplusplus
29014extern "C"
29015#endif
29016char gethostbyname ();
29017int
29018main ()
29019{
29020return gethostbyname ();
29021  ;
29022  return 0;
29023}
29024_ACEOF
29025if ac_fn_cxx_try_link "$LINENO"; then :
29026  ac_cv_lib_bsd_gethostbyname=yes
29027else
29028  ac_cv_lib_bsd_gethostbyname=no
29029fi
29030rm -f core conftest.err conftest.$ac_objext \
29031    conftest$ac_exeext conftest.$ac_ext
29032LIBS=$ac_check_lib_save_LIBS
29033fi
29034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29035$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29036if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29037  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29038fi
29039
29040      fi
29041    fi
29042
29043    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29044    # socket/setsockopt and other routines are undefined under SCO ODT
29045    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29046    # on later versions), says Simon Leinen: it contains gethostby*
29047    # variants that don't use the name server (or something).  -lsocket
29048    # must be given before -lnsl if both are needed.  We assume that
29049    # if connect needs -lnsl, so does gethostbyname.
29050    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29051if test "x$ac_cv_func_connect" = x""yes; then :
29052
29053fi
29054
29055    if test $ac_cv_func_connect = no; then
29056      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29057$as_echo_n "checking for connect in -lsocket... " >&6; }
29058if test "${ac_cv_lib_socket_connect+set}" = set; then :
29059  $as_echo_n "(cached) " >&6
29060else
29061  ac_check_lib_save_LIBS=$LIBS
29062LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29064/* end confdefs.h.  */
29065
29066/* Override any GCC internal prototype to avoid an error.
29067   Use char because int might match the return type of a GCC
29068   builtin and then its argument prototype would still apply.  */
29069#ifdef __cplusplus
29070extern "C"
29071#endif
29072char connect ();
29073int
29074main ()
29075{
29076return connect ();
29077  ;
29078  return 0;
29079}
29080_ACEOF
29081if ac_fn_cxx_try_link "$LINENO"; then :
29082  ac_cv_lib_socket_connect=yes
29083else
29084  ac_cv_lib_socket_connect=no
29085fi
29086rm -f core conftest.err conftest.$ac_objext \
29087    conftest$ac_exeext conftest.$ac_ext
29088LIBS=$ac_check_lib_save_LIBS
29089fi
29090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29091$as_echo "$ac_cv_lib_socket_connect" >&6; }
29092if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29093  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29094fi
29095
29096    fi
29097
29098    # Guillermo Gomez says -lposix is necessary on A/UX.
29099    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29100if test "x$ac_cv_func_remove" = x""yes; then :
29101
29102fi
29103
29104    if test $ac_cv_func_remove = no; then
29105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29106$as_echo_n "checking for remove in -lposix... " >&6; }
29107if test "${ac_cv_lib_posix_remove+set}" = set; then :
29108  $as_echo_n "(cached) " >&6
29109else
29110  ac_check_lib_save_LIBS=$LIBS
29111LIBS="-lposix  $LIBS"
29112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29113/* end confdefs.h.  */
29114
29115/* Override any GCC internal prototype to avoid an error.
29116   Use char because int might match the return type of a GCC
29117   builtin and then its argument prototype would still apply.  */
29118#ifdef __cplusplus
29119extern "C"
29120#endif
29121char remove ();
29122int
29123main ()
29124{
29125return remove ();
29126  ;
29127  return 0;
29128}
29129_ACEOF
29130if ac_fn_cxx_try_link "$LINENO"; then :
29131  ac_cv_lib_posix_remove=yes
29132else
29133  ac_cv_lib_posix_remove=no
29134fi
29135rm -f core conftest.err conftest.$ac_objext \
29136    conftest$ac_exeext conftest.$ac_ext
29137LIBS=$ac_check_lib_save_LIBS
29138fi
29139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29140$as_echo "$ac_cv_lib_posix_remove" >&6; }
29141if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29142  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29143fi
29144
29145    fi
29146
29147    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29148    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29149if test "x$ac_cv_func_shmat" = x""yes; then :
29150
29151fi
29152
29153    if test $ac_cv_func_shmat = no; then
29154      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29155$as_echo_n "checking for shmat in -lipc... " >&6; }
29156if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29157  $as_echo_n "(cached) " >&6
29158else
29159  ac_check_lib_save_LIBS=$LIBS
29160LIBS="-lipc  $LIBS"
29161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29162/* end confdefs.h.  */
29163
29164/* Override any GCC internal prototype to avoid an error.
29165   Use char because int might match the return type of a GCC
29166   builtin and then its argument prototype would still apply.  */
29167#ifdef __cplusplus
29168extern "C"
29169#endif
29170char shmat ();
29171int
29172main ()
29173{
29174return shmat ();
29175  ;
29176  return 0;
29177}
29178_ACEOF
29179if ac_fn_cxx_try_link "$LINENO"; then :
29180  ac_cv_lib_ipc_shmat=yes
29181else
29182  ac_cv_lib_ipc_shmat=no
29183fi
29184rm -f core conftest.err conftest.$ac_objext \
29185    conftest$ac_exeext conftest.$ac_ext
29186LIBS=$ac_check_lib_save_LIBS
29187fi
29188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29189$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29190if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29191  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29192fi
29193
29194    fi
29195  fi
29196
29197  # Check for libraries that X11R6 Xt/Xaw programs need.
29198  ac_save_LDFLAGS=$LDFLAGS
29199  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29200  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29201  # check for ICE first), but we must link in the order -lSM -lICE or
29202  # we get undefined symbols.  So assume we have SM if we have ICE.
29203  # These have to be linked with before -lX11, unlike the other
29204  # libraries we check for below, so use a different variable.
29205  # John Interrante, Karl Berry
29206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29207$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29208if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29209  $as_echo_n "(cached) " >&6
29210else
29211  ac_check_lib_save_LIBS=$LIBS
29212LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29214/* end confdefs.h.  */
29215
29216/* Override any GCC internal prototype to avoid an error.
29217   Use char because int might match the return type of a GCC
29218   builtin and then its argument prototype would still apply.  */
29219#ifdef __cplusplus
29220extern "C"
29221#endif
29222char IceConnectionNumber ();
29223int
29224main ()
29225{
29226return IceConnectionNumber ();
29227  ;
29228  return 0;
29229}
29230_ACEOF
29231if ac_fn_cxx_try_link "$LINENO"; then :
29232  ac_cv_lib_ICE_IceConnectionNumber=yes
29233else
29234  ac_cv_lib_ICE_IceConnectionNumber=no
29235fi
29236rm -f core conftest.err conftest.$ac_objext \
29237    conftest$ac_exeext conftest.$ac_ext
29238LIBS=$ac_check_lib_save_LIBS
29239fi
29240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29241$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29242if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29243  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29244fi
29245
29246  LDFLAGS=$ac_save_LDFLAGS
29247
29248fi
29249
29250
29251# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29252# this doesn't make sense so we remove it.
29253if test "x$COMPILE_TYPE" = xcross; then
29254  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29255fi
29256
29257if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29258
29259    # Print a helpful message on how to acquire the necessary build dependency.
29260    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29261    MISSING_DEPENDENCY=x11
29262    PKGHANDLER_COMMAND=
29263
29264    case $PKGHANDLER in
29265	apt-get)
29266                apt_help     $MISSING_DEPENDENCY ;;
29267    yum)
29268                yum_help     $MISSING_DEPENDENCY ;;
29269	port)
29270                port_help    $MISSING_DEPENDENCY ;;
29271	pkgutil)
29272                pkgutil_help $MISSING_DEPENDENCY ;;
29273	pkgadd)
29274                pkgadd_help  $MISSING_DEPENDENCY ;;
29275    * )
29276      break ;;
29277    esac
29278
29279    if test "x$PKGHANDLER_COMMAND" != x; then
29280        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29281    fi
29282
29283    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29284fi
29285
29286# Some of the old makefiles require a setting of OPENWIN_HOME
29287# Since the X11R6 directory has disappeared on later Linuxes,
29288# we need to probe for it.
29289if test "x$OPENJDK_TARGET_OS" = xlinux; then
29290    if test -d "$SYS_ROOT/usr/X11R6"; then
29291        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29292    fi
29293    if test -d "$SYS_ROOT/usr/include/X11"; then
29294        OPENWIN_HOME="$SYS_ROOT/usr"
29295    fi
29296fi
29297if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29298    OPENWIN_HOME="/usr/openwin"
29299fi
29300
29301
29302
29303#
29304# Weird Sol10 something check...TODO change to try compile
29305#
29306if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29307  if test "`uname -r`" = "5.10"; then
29308     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29309     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29310     fi
29311  fi
29312fi
29313
29314ac_ext=c
29315ac_cpp='$CPP $CPPFLAGS'
29316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29317ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29318ac_compiler_gnu=$ac_cv_c_compiler_gnu
29319
29320OLD_CFLAGS="$CFLAGS"
29321CFLAGS="$CFLAGS $X_CFLAGS"
29322
29323# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29324for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29325do :
29326  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29327ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29328                   # include <X11/Xutil.h>
29329
29330"
29331if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29332  cat >>confdefs.h <<_ACEOF
29333#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29334_ACEOF
29335 X11_A_OK=yes
29336else
29337  X11_A_OK=no
29338fi
29339
29340done
29341
29342
29343CFLAGS="$OLD_CFLAGS"
29344ac_ext=cpp
29345ac_cpp='$CXXCPP $CPPFLAGS'
29346ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29347ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29348ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29349
29350
29351if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29352
29353    # Print a helpful message on how to acquire the necessary build dependency.
29354    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29355    MISSING_DEPENDENCY=x11
29356    PKGHANDLER_COMMAND=
29357
29358    case $PKGHANDLER in
29359	apt-get)
29360                apt_help     $MISSING_DEPENDENCY ;;
29361    yum)
29362                yum_help     $MISSING_DEPENDENCY ;;
29363	port)
29364                port_help    $MISSING_DEPENDENCY ;;
29365	pkgutil)
29366                pkgutil_help $MISSING_DEPENDENCY ;;
29367	pkgadd)
29368                pkgadd_help  $MISSING_DEPENDENCY ;;
29369    * )
29370      break ;;
29371    esac
29372
29373    if test "x$PKGHANDLER_COMMAND" != x; then
29374        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29375    fi
29376
29377    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29378fi
29379
29380
29381
29382
29383
29384
29385###############################################################################
29386#
29387# The common unix printing system cups is used to print from java.
29388#
29389
29390# Check whether --with-cups was given.
29391if test "${with_cups+set}" = set; then :
29392  withval=$with_cups;
29393fi
29394
29395
29396# Check whether --with-cups-include was given.
29397if test "${with_cups_include+set}" = set; then :
29398  withval=$with_cups_include;
29399fi
29400
29401
29402if test "x$CUPS_NOT_NEEDED" = xyes; then
29403	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29404		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29405$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29406	fi
29407	CUPS_CFLAGS=
29408else
29409	CUPS_FOUND=no
29410
29411	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29412	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29413	fi
29414
29415	if test "x${with_cups}" != x; then
29416	    CUPS_CFLAGS="-I${with_cups}/include"
29417	    CUPS_FOUND=yes
29418	fi
29419	if test "x${with_cups_include}" != x; then
29420	    CUPS_CFLAGS="-I${with_cups_include}"
29421	    CUPS_FOUND=yes
29422	fi
29423	if test "x$CUPS_FOUND" = xno; then
29424
29425
29426    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29427        # Source the builddeps file again, to make sure it uses the latest variables!
29428        . $builddepsfile
29429        # Look for a target and build machine specific resource!
29430        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29431        if test "x$resource" = x; then
29432            # Ok, lets instead look for a target specific resource
29433            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29434        fi
29435        if test "x$resource" = x; then
29436            # Ok, lets instead look for a build specific resource
29437            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29438        fi
29439        if test "x$resource" = x; then
29440            # Ok, lets instead look for a generic resource
29441            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29442            resource=${builddep_cups}
29443        fi
29444        if test "x$resource" != x; then
29445            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29446$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29447	    # If the resource in the builddeps.conf file is an existing directory,
29448	    # for example /java/linux/cups
29449	    if test -d ${resource}; then
29450	       depdir=${resource}
29451	    else
29452
29453# cups is for example mymodule
29454# $resource is for example libs/general/libmymod_1_2_3.zip
29455# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29456# $with_builddeps_dir is for example /localhome/builddeps
29457# depdir is the name of the variable into which we store the depdir, eg MYMOD
29458# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29459# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29460    filename=`basename $resource`
29461    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29462    filebase=${filename%%.*}
29463    extension=${filename#*.}
29464    installdir=$with_builddeps_dir/$filebase
29465    if test ! -f $installdir/$filename.unpacked; then
29466        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29467$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29468        if test ! -d $installdir; then
29469            mkdir -p $installdir
29470        fi
29471        if test ! -d $installdir; then
29472            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29473        fi
29474        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29475        touch $tmpfile
29476        if test ! -f $tmpfile; then
29477            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29478        fi
29479
29480    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29481    # $tmpfile is the local file name for the downloaded file.
29482    VALID_TOOL=no
29483    if test "x$BDEPS_FTP" = xwget; then
29484       VALID_TOOL=yes
29485       wget -O $tmpfile $with_builddeps_server/$resource
29486    fi
29487    if test "x$BDEPS_FTP" = xlftp; then
29488       VALID_TOOL=yes
29489       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29490    fi
29491    if test "x$BDEPS_FTP" = xftp; then
29492        VALID_TOOL=yes
29493        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29494        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29495        FTPUSERPWD=${FTPSERVER%%@*}
29496        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29497            FTPUSER=${userpwd%%:*}
29498            FTPPWD=${userpwd#*@}
29499            FTPSERVER=${FTPSERVER#*@}
29500        else
29501            FTPUSER=ftp
29502            FTPPWD=ftp
29503        fi
29504        # the "pass" command does not work on some
29505        # ftp clients (read ftp.exe) but if it works,
29506        # passive mode is better!
29507        (\
29508            echo "user $FTPUSER $FTPPWD"        ;\
29509            echo "pass"                         ;\
29510            echo "bin"                          ;\
29511            echo "get $FTPPATH $tmpfile"              ;\
29512        ) | ftp -in $FTPSERVER
29513    fi
29514    if test "x$VALID_TOOL" != xyes; then
29515       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29516    fi
29517
29518        mv $tmpfile $installdir/$filename
29519        if test ! -s $installdir/$filename; then
29520            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29521        fi
29522        case "$extension" in
29523            zip)  echo "Unzipping $installdir/$filename..."
29524               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29525            ;;
29526            tar.gz) echo "Untaring $installdir/$filename..."
29527               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29528            ;;
29529            tgz) echo "Untaring $installdir/$filename..."
29530               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29531            ;;
29532            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29533            ;;
29534        esac
29535    fi
29536    if test -f $installdir/$filename.unpacked; then
29537        depdir=$installdir
29538    fi
29539
29540	    fi
29541            # Source the builddeps file again, because in the previous command, the depdir
29542            # was updated to point at the current build dependency install directory.
29543            . $builddepsfile
29544            # Now extract variables from the builddeps.conf files.
29545            theroot=${builddep_cups_ROOT}
29546            thecflags=${builddep_cups_CFLAGS}
29547            thelibs=${builddep_cups_LIBS}
29548            if test "x$depdir" = x; then
29549                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29550            fi
29551            CUPS=$depdir
29552            if test "x$theroot" != x; then
29553               CUPS="$theroot"
29554            fi
29555            if test "x$thecflags" != x; then
29556               CUPS_CFLAGS="$thecflags"
29557            fi
29558            if test "x$thelibs" != x; then
29559               CUPS_LIBS="$thelibs"
29560            fi
29561            CUPS_FOUND=yes
29562
29563        fi
29564
29565    fi
29566
29567	fi
29568	if test "x$CUPS_FOUND" = xno; then
29569	    # Are the cups headers installed in the default /usr/include location?
29570	    for ac_header in cups/cups.h cups/ppd.h
29571do :
29572  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29573ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29574if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29575  cat >>confdefs.h <<_ACEOF
29576#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29577_ACEOF
29578 CUPS_FOUND=yes
29579	                      CUPS_CFLAGS=
29580	                      DEFAULT_CUPS=yes
29581fi
29582
29583done
29584
29585	fi
29586	if test "x$CUPS_FOUND" = xno; then
29587	    # Getting nervous now? Lets poke around for standard Solaris third-party
29588	    # package installation locations.
29589	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29590$as_echo_n "checking for cups headers... " >&6; }
29591	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29592	       # An SFW package seems to be installed!
29593	       CUPS_FOUND=yes
29594	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29595	    elif test -s /opt/csw/include/cups/cups.h; then
29596	       # A CSW package seems to be installed!
29597	       CUPS_FOUND=yes
29598	       CUPS_CFLAGS="-I/opt/csw/include"
29599	    fi
29600	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29601$as_echo "$CUPS_FOUND" >&6; }
29602	fi
29603	if test "x$CUPS_FOUND" = xno; then
29604
29605    # Print a helpful message on how to acquire the necessary build dependency.
29606    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29607    MISSING_DEPENDENCY=cups
29608    PKGHANDLER_COMMAND=
29609
29610    case $PKGHANDLER in
29611	apt-get)
29612                apt_help     $MISSING_DEPENDENCY ;;
29613    yum)
29614                yum_help     $MISSING_DEPENDENCY ;;
29615	port)
29616                port_help    $MISSING_DEPENDENCY ;;
29617	pkgutil)
29618                pkgutil_help $MISSING_DEPENDENCY ;;
29619	pkgadd)
29620                pkgadd_help  $MISSING_DEPENDENCY ;;
29621    * )
29622      break ;;
29623    esac
29624
29625    if test "x$PKGHANDLER_COMMAND" != x; then
29626        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29627    fi
29628
29629	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29630	fi
29631fi
29632
29633
29634
29635
29636
29637
29638###############################################################################
29639#
29640# The ubiquitous freetype2 library is used to render fonts.
29641#
29642
29643# Check whether --with-freetype was given.
29644if test "${with_freetype+set}" = set; then :
29645  withval=$with_freetype;
29646fi
29647
29648
29649# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29650USING_SYSTEM_FT_LIB=false
29651
29652if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29653	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29654		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29655$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29656	fi
29657	FREETYPE2_CFLAGS=
29658	FREETYPE2_LIBS=
29659        FREETYPE2_LIB_PATH=
29660else
29661	FREETYPE2_FOUND=no
29662
29663	if test "x$with_freetype" != x; then
29664
29665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29666
29667  # Input might be given as Windows format, start by converting to
29668  # unix format.
29669  path="$with_freetype"
29670  new_path=`$CYGPATH -u "$path"`
29671
29672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29675  # "foo.exe" is OK but "foo" is an error.
29676  #
29677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29678  # It is also a way to make sure we got the proper file name for the real test later on.
29679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29680  if test "x$test_shortpath" = x; then
29681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29682$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29683    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29684  fi
29685
29686  # Call helper function which possibly converts this using DOS-style short mode.
29687  # If so, the updated path is stored in $new_path.
29688
29689  input_path="$new_path"
29690  # Check if we need to convert this using DOS-style short mode. If the path
29691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29692  # take no chances and rewrite it.
29693  # Note: m4 eats our [], so we need to use [ and ] instead.
29694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29695  if test "x$has_forbidden_chars" != x; then
29696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29700      # Going to short mode and back again did indeed matter. Since short mode is
29701      # case insensitive, let's make it lowercase to improve readability.
29702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29703      # Now convert it back to Unix-stile (cygpath)
29704      input_path=`$CYGPATH -u "$shortmode_path"`
29705      new_path="$input_path"
29706    fi
29707  fi
29708
29709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29710  if test "x$test_cygdrive_prefix" = x; then
29711    # As a simple fix, exclude /usr/bin since it's not a real path.
29712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29714      # a path prefixed by /cygdrive for fixpath to work.
29715      new_path="$CYGWIN_ROOT_PATH$input_path"
29716    fi
29717  fi
29718
29719
29720  if test "x$path" != "x$new_path"; then
29721    with_freetype="$new_path"
29722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29723$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29724  fi
29725
29726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29727
29728  path="$with_freetype"
29729  has_colon=`$ECHO $path | $GREP ^.:`
29730  new_path="$path"
29731  if test "x$has_colon" = x; then
29732    # Not in mixed or Windows style, start by that.
29733    new_path=`cmd //c echo $path`
29734  fi
29735
29736
29737  input_path="$new_path"
29738  # Check if we need to convert this using DOS-style short mode. If the path
29739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29740  # take no chances and rewrite it.
29741  # Note: m4 eats our [], so we need to use [ and ] instead.
29742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29743  if test "x$has_forbidden_chars" != x; then
29744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29746  fi
29747
29748
29749  windows_path="$new_path"
29750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29751    unix_path=`$CYGPATH -u "$windows_path"`
29752    new_path="$unix_path"
29753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29755    new_path="$unix_path"
29756  fi
29757
29758  if test "x$path" != "x$new_path"; then
29759    with_freetype="$new_path"
29760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29761$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29762  fi
29763
29764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29766
29767  else
29768    # We're on a posix platform. Hooray! :)
29769    path="$with_freetype"
29770
29771    if test ! -f "$path" && test ! -d "$path"; then
29772      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29773    fi
29774
29775    has_space=`$ECHO "$path" | $GREP " "`
29776    if test "x$has_space" != x; then
29777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29778$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29779      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29780    fi
29781  fi
29782
29783	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29784            FREETYPE2_LIB_PATH="$with_freetype/lib"
29785            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29786                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29787                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29788            fi
29789            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29790                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29791            fi
29792	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29793            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29794                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29795            fi
29796 	    FREETYPE2_FOUND=yes
29797   	    if test "x$FREETYPE2_FOUND" = xyes; then
29798	        # Verify that the directories exist
29799                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29800		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29801		fi
29802	        # List the contents of the lib.
29803		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29804                if test "x$FREETYPELIB" = x; then
29805		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29806		fi
29807	        # Check one h-file
29808                if ! test -s "$with_freetype/include/ft2build.h"; then
29809		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29810		fi
29811            fi
29812        fi
29813	if test "x$FREETYPE2_FOUND" = xno; then
29814
29815
29816    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29817        # Source the builddeps file again, to make sure it uses the latest variables!
29818        . $builddepsfile
29819        # Look for a target and build machine specific resource!
29820        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29821        if test "x$resource" = x; then
29822            # Ok, lets instead look for a target specific resource
29823            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29824        fi
29825        if test "x$resource" = x; then
29826            # Ok, lets instead look for a build specific resource
29827            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29828        fi
29829        if test "x$resource" = x; then
29830            # Ok, lets instead look for a generic resource
29831            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29832            resource=${builddep_freetype2}
29833        fi
29834        if test "x$resource" != x; then
29835            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29836$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29837	    # If the resource in the builddeps.conf file is an existing directory,
29838	    # for example /java/linux/cups
29839	    if test -d ${resource}; then
29840	       depdir=${resource}
29841	    else
29842
29843# freetype2 is for example mymodule
29844# $resource is for example libs/general/libmymod_1_2_3.zip
29845# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29846# $with_builddeps_dir is for example /localhome/builddeps
29847# depdir is the name of the variable into which we store the depdir, eg MYMOD
29848# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29849# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29850    filename=`basename $resource`
29851    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29852    filebase=${filename%%.*}
29853    extension=${filename#*.}
29854    installdir=$with_builddeps_dir/$filebase
29855    if test ! -f $installdir/$filename.unpacked; then
29856        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29857$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29858        if test ! -d $installdir; then
29859            mkdir -p $installdir
29860        fi
29861        if test ! -d $installdir; then
29862            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29863        fi
29864        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29865        touch $tmpfile
29866        if test ! -f $tmpfile; then
29867            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29868        fi
29869
29870    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29871    # $tmpfile is the local file name for the downloaded file.
29872    VALID_TOOL=no
29873    if test "x$BDEPS_FTP" = xwget; then
29874       VALID_TOOL=yes
29875       wget -O $tmpfile $with_builddeps_server/$resource
29876    fi
29877    if test "x$BDEPS_FTP" = xlftp; then
29878       VALID_TOOL=yes
29879       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29880    fi
29881    if test "x$BDEPS_FTP" = xftp; then
29882        VALID_TOOL=yes
29883        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29884        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29885        FTPUSERPWD=${FTPSERVER%%@*}
29886        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29887            FTPUSER=${userpwd%%:*}
29888            FTPPWD=${userpwd#*@}
29889            FTPSERVER=${FTPSERVER#*@}
29890        else
29891            FTPUSER=ftp
29892            FTPPWD=ftp
29893        fi
29894        # the "pass" command does not work on some
29895        # ftp clients (read ftp.exe) but if it works,
29896        # passive mode is better!
29897        (\
29898            echo "user $FTPUSER $FTPPWD"        ;\
29899            echo "pass"                         ;\
29900            echo "bin"                          ;\
29901            echo "get $FTPPATH $tmpfile"              ;\
29902        ) | ftp -in $FTPSERVER
29903    fi
29904    if test "x$VALID_TOOL" != xyes; then
29905       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29906    fi
29907
29908        mv $tmpfile $installdir/$filename
29909        if test ! -s $installdir/$filename; then
29910            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29911        fi
29912        case "$extension" in
29913            zip)  echo "Unzipping $installdir/$filename..."
29914               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29915            ;;
29916            tar.gz) echo "Untaring $installdir/$filename..."
29917               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29918            ;;
29919            tgz) echo "Untaring $installdir/$filename..."
29920               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29921            ;;
29922            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29923            ;;
29924        esac
29925    fi
29926    if test -f $installdir/$filename.unpacked; then
29927        depdir=$installdir
29928    fi
29929
29930	    fi
29931            # Source the builddeps file again, because in the previous command, the depdir
29932            # was updated to point at the current build dependency install directory.
29933            . $builddepsfile
29934            # Now extract variables from the builddeps.conf files.
29935            theroot=${builddep_freetype2_ROOT}
29936            thecflags=${builddep_freetype2_CFLAGS}
29937            thelibs=${builddep_freetype2_LIBS}
29938            if test "x$depdir" = x; then
29939                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29940            fi
29941            FREETYPE2=$depdir
29942            if test "x$theroot" != x; then
29943               FREETYPE2="$theroot"
29944            fi
29945            if test "x$thecflags" != x; then
29946               FREETYPE2_CFLAGS="$thecflags"
29947            fi
29948            if test "x$thelibs" != x; then
29949               FREETYPE2_LIBS="$thelibs"
29950            fi
29951            FREETYPE2_FOUND=yes
29952            else FREETYPE2_FOUND=no
29953
29954        fi
29955        else FREETYPE2_FOUND=no
29956
29957    fi
29958
29959            USING_SYSTEM_FT_LIB=true
29960	fi
29961	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29962            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29963
29964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29965
29966  # Input might be given as Windows format, start by converting to
29967  # unix format.
29968  path="$FREETYPELOCATION"
29969  new_path=`$CYGPATH -u "$path"`
29970
29971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29974  # "foo.exe" is OK but "foo" is an error.
29975  #
29976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29977  # It is also a way to make sure we got the proper file name for the real test later on.
29978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29979  if test "x$test_shortpath" = x; then
29980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29981$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29982    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29983  fi
29984
29985  # Call helper function which possibly converts this using DOS-style short mode.
29986  # If so, the updated path is stored in $new_path.
29987
29988  input_path="$new_path"
29989  # Check if we need to convert this using DOS-style short mode. If the path
29990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29991  # take no chances and rewrite it.
29992  # Note: m4 eats our [], so we need to use [ and ] instead.
29993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29994  if test "x$has_forbidden_chars" != x; then
29995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29999      # Going to short mode and back again did indeed matter. Since short mode is
30000      # case insensitive, let's make it lowercase to improve readability.
30001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30002      # Now convert it back to Unix-stile (cygpath)
30003      input_path=`$CYGPATH -u "$shortmode_path"`
30004      new_path="$input_path"
30005    fi
30006  fi
30007
30008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30009  if test "x$test_cygdrive_prefix" = x; then
30010    # As a simple fix, exclude /usr/bin since it's not a real path.
30011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30013      # a path prefixed by /cygdrive for fixpath to work.
30014      new_path="$CYGWIN_ROOT_PATH$input_path"
30015    fi
30016  fi
30017
30018
30019  if test "x$path" != "x$new_path"; then
30020    FREETYPELOCATION="$new_path"
30021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30022$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30023  fi
30024
30025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30026
30027  path="$FREETYPELOCATION"
30028  has_colon=`$ECHO $path | $GREP ^.:`
30029  new_path="$path"
30030  if test "x$has_colon" = x; then
30031    # Not in mixed or Windows style, start by that.
30032    new_path=`cmd //c echo $path`
30033  fi
30034
30035
30036  input_path="$new_path"
30037  # Check if we need to convert this using DOS-style short mode. If the path
30038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30039  # take no chances and rewrite it.
30040  # Note: m4 eats our [], so we need to use [ and ] instead.
30041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30042  if test "x$has_forbidden_chars" != x; then
30043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30045  fi
30046
30047
30048  windows_path="$new_path"
30049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30050    unix_path=`$CYGPATH -u "$windows_path"`
30051    new_path="$unix_path"
30052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30054    new_path="$unix_path"
30055  fi
30056
30057  if test "x$path" != "x$new_path"; then
30058    FREETYPELOCATION="$new_path"
30059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30060$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30061  fi
30062
30063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30065
30066  else
30067    # We're on a posix platform. Hooray! :)
30068    path="$FREETYPELOCATION"
30069
30070    if test ! -f "$path" && test ! -d "$path"; then
30071      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30072    fi
30073
30074    has_space=`$ECHO "$path" | $GREP " "`
30075    if test "x$has_space" != x; then
30076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30077$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30078      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30079    fi
30080  fi
30081
30082	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30083$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30084	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30085	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30086	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30087 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30088                if ! test -s "$FREETYPE2_LIBS"; then
30089		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30090		fi
30091                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30092		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30093		fi
30094                USING_SYSTEM_FT_LIB=true
30095                FREETYPE2_FOUND=yes
30096	    fi
30097	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30098$as_echo "$FREETYPE2_FOUND" >&6; }
30099        fi
30100	if test "x$FREETYPE2_FOUND" = xno; then
30101
30102pkg_failed=no
30103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30104$as_echo_n "checking for FREETYPE2... " >&6; }
30105
30106if test -n "$FREETYPE2_CFLAGS"; then
30107    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30108 elif test -n "$PKG_CONFIG"; then
30109    if test -n "$PKG_CONFIG" && \
30110    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30111  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30112  ac_status=$?
30113  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30114  test $ac_status = 0; }; then
30115  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30116else
30117  pkg_failed=yes
30118fi
30119 else
30120    pkg_failed=untried
30121fi
30122if test -n "$FREETYPE2_LIBS"; then
30123    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30124 elif test -n "$PKG_CONFIG"; then
30125    if test -n "$PKG_CONFIG" && \
30126    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30127  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30128  ac_status=$?
30129  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30130  test $ac_status = 0; }; then
30131  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30132else
30133  pkg_failed=yes
30134fi
30135 else
30136    pkg_failed=untried
30137fi
30138
30139
30140
30141if test $pkg_failed = yes; then
30142
30143if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30144        _pkg_short_errors_supported=yes
30145else
30146        _pkg_short_errors_supported=no
30147fi
30148        if test $_pkg_short_errors_supported = yes; then
30149	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30150        else
30151	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30152        fi
30153	# Put the nasty error message in config.log where it belongs
30154	echo "$FREETYPE2_PKG_ERRORS" >&5
30155
30156	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30157$as_echo "no" >&6; }
30158                FREETYPE2_FOUND=no
30159elif test $pkg_failed = untried; then
30160	FREETYPE2_FOUND=no
30161else
30162	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30163	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30165$as_echo "yes" >&6; }
30166	FREETYPE2_FOUND=yes
30167fi
30168            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30169            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30170            USING_SYSTEM_FT_LIB=true
30171            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30172            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30173              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30174            fi
30175	fi
30176	if test "x$FREETYPE2_FOUND" = xno; then
30177	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30178$as_echo_n "checking for freetype in some standard locations... " >&6; }
30179
30180	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30181	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30182	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30183	    fi
30184	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30185	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30186	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30187	    fi
30188
30189	    PREV_CXXCFLAGS="$CXXFLAGS"
30190	    PREV_LDFLAGS="$LDFLAGS"
30191	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30192	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30193	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30194/* end confdefs.h.  */
30195#include<ft2build.h>
30196	                    #include FT_FREETYPE_H
30197	                   int main() { return 0; }
30198
30199_ACEOF
30200if ac_fn_cxx_try_link "$LINENO"; then :
30201
30202	                      # Yes, the default cflags and libs did the trick.
30203	                      FREETYPE2_FOUND=yes
30204	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30205	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30206
30207else
30208
30209	                      FREETYPE2_FOUND=no
30210
30211fi
30212rm -f core conftest.err conftest.$ac_objext \
30213    conftest$ac_exeext conftest.$ac_ext
30214            CXXCFLAGS="$PREV_CXXFLAGS"
30215	    LDFLAGS="$PREV_LDFLAGS"
30216	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30217$as_echo "$FREETYPE2_FOUND" >&6; }
30218            USING_SYSTEM_FT_LIB=true
30219	fi
30220	if test "x$FREETYPE2_FOUND" = xno; then
30221
30222    # Print a helpful message on how to acquire the necessary build dependency.
30223    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30224    MISSING_DEPENDENCY=freetype2
30225    PKGHANDLER_COMMAND=
30226
30227    case $PKGHANDLER in
30228	apt-get)
30229                apt_help     $MISSING_DEPENDENCY ;;
30230    yum)
30231                yum_help     $MISSING_DEPENDENCY ;;
30232	port)
30233                port_help    $MISSING_DEPENDENCY ;;
30234	pkgutil)
30235                pkgutil_help $MISSING_DEPENDENCY ;;
30236	pkgadd)
30237                pkgadd_help  $MISSING_DEPENDENCY ;;
30238    * )
30239      break ;;
30240    esac
30241
30242    if test "x$PKGHANDLER_COMMAND" != x; then
30243        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30244    fi
30245
30246		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30247	fi
30248
30249        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30250            # AC_CHECK_LIB does not support use of cl.exe
30251            PREV_LDFLAGS="$LDFLAGS"
30252            LDFLAGS="$FREETYPE2_LIBS"
30253            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30254$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30255if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30256  $as_echo_n "(cached) " >&6
30257else
30258  ac_check_lib_save_LIBS=$LIBS
30259LIBS="-lfreetype  $LIBS"
30260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30261/* end confdefs.h.  */
30262
30263/* Override any GCC internal prototype to avoid an error.
30264   Use char because int might match the return type of a GCC
30265   builtin and then its argument prototype would still apply.  */
30266#ifdef __cplusplus
30267extern "C"
30268#endif
30269char FT_Init_FreeType ();
30270int
30271main ()
30272{
30273return FT_Init_FreeType ();
30274  ;
30275  return 0;
30276}
30277_ACEOF
30278if ac_fn_cxx_try_link "$LINENO"; then :
30279  ac_cv_lib_freetype_FT_Init_FreeType=yes
30280else
30281  ac_cv_lib_freetype_FT_Init_FreeType=no
30282fi
30283rm -f core conftest.err conftest.$ac_objext \
30284    conftest$ac_exeext conftest.$ac_ext
30285LIBS=$ac_check_lib_save_LIBS
30286fi
30287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30288$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30289if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30290  FREETYPE2_FOUND=true
30291else
30292  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30293fi
30294
30295            LDFLAGS="$PREV_LDFLAGS"
30296        fi
30297fi
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307###############################################################################
30308#
30309# Check for alsa headers and libraries. Used on Linux/GNU systems.
30310#
30311
30312# Check whether --with-alsa was given.
30313if test "${with_alsa+set}" = set; then :
30314  withval=$with_alsa;
30315fi
30316
30317
30318# Check whether --with-alsa-include was given.
30319if test "${with_alsa_include+set}" = set; then :
30320  withval=$with_alsa_include;
30321fi
30322
30323
30324# Check whether --with-alsa-lib was given.
30325if test "${with_alsa_lib+set}" = set; then :
30326  withval=$with_alsa_lib;
30327fi
30328
30329
30330if test "x$ALSA_NOT_NEEDED" = xyes; then
30331	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30332		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30333$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30334	fi
30335	ALSA_CFLAGS=
30336	ALSA_LIBS=
30337else
30338	ALSA_FOUND=no
30339
30340	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30341	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30342	fi
30343
30344	if test "x${with_alsa}" != x; then
30345	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30346	    ALSA_CFLAGS="-I${with_alsa}/include"
30347	    ALSA_FOUND=yes
30348	fi
30349	if test "x${with_alsa_include}" != x; then
30350	    ALSA_CFLAGS="-I${with_alsa_include}"
30351	    ALSA_FOUND=yes
30352	fi
30353	if test "x${with_alsa_lib}" != x; then
30354	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30355	    ALSA_FOUND=yes
30356	fi
30357	if test "x$ALSA_FOUND" = xno; then
30358
30359
30360    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30361        # Source the builddeps file again, to make sure it uses the latest variables!
30362        . $builddepsfile
30363        # Look for a target and build machine specific resource!
30364        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30365        if test "x$resource" = x; then
30366            # Ok, lets instead look for a target specific resource
30367            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30368        fi
30369        if test "x$resource" = x; then
30370            # Ok, lets instead look for a build specific resource
30371            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30372        fi
30373        if test "x$resource" = x; then
30374            # Ok, lets instead look for a generic resource
30375            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30376            resource=${builddep_alsa}
30377        fi
30378        if test "x$resource" != x; then
30379            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30380$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30381	    # If the resource in the builddeps.conf file is an existing directory,
30382	    # for example /java/linux/cups
30383	    if test -d ${resource}; then
30384	       depdir=${resource}
30385	    else
30386
30387# alsa is for example mymodule
30388# $resource is for example libs/general/libmymod_1_2_3.zip
30389# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30390# $with_builddeps_dir is for example /localhome/builddeps
30391# depdir is the name of the variable into which we store the depdir, eg MYMOD
30392# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30393# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30394    filename=`basename $resource`
30395    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30396    filebase=${filename%%.*}
30397    extension=${filename#*.}
30398    installdir=$with_builddeps_dir/$filebase
30399    if test ! -f $installdir/$filename.unpacked; then
30400        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30401$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30402        if test ! -d $installdir; then
30403            mkdir -p $installdir
30404        fi
30405        if test ! -d $installdir; then
30406            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30407        fi
30408        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30409        touch $tmpfile
30410        if test ! -f $tmpfile; then
30411            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30412        fi
30413
30414    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30415    # $tmpfile is the local file name for the downloaded file.
30416    VALID_TOOL=no
30417    if test "x$BDEPS_FTP" = xwget; then
30418       VALID_TOOL=yes
30419       wget -O $tmpfile $with_builddeps_server/$resource
30420    fi
30421    if test "x$BDEPS_FTP" = xlftp; then
30422       VALID_TOOL=yes
30423       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30424    fi
30425    if test "x$BDEPS_FTP" = xftp; then
30426        VALID_TOOL=yes
30427        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30428        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30429        FTPUSERPWD=${FTPSERVER%%@*}
30430        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30431            FTPUSER=${userpwd%%:*}
30432            FTPPWD=${userpwd#*@}
30433            FTPSERVER=${FTPSERVER#*@}
30434        else
30435            FTPUSER=ftp
30436            FTPPWD=ftp
30437        fi
30438        # the "pass" command does not work on some
30439        # ftp clients (read ftp.exe) but if it works,
30440        # passive mode is better!
30441        (\
30442            echo "user $FTPUSER $FTPPWD"        ;\
30443            echo "pass"                         ;\
30444            echo "bin"                          ;\
30445            echo "get $FTPPATH $tmpfile"              ;\
30446        ) | ftp -in $FTPSERVER
30447    fi
30448    if test "x$VALID_TOOL" != xyes; then
30449       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30450    fi
30451
30452        mv $tmpfile $installdir/$filename
30453        if test ! -s $installdir/$filename; then
30454            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30455        fi
30456        case "$extension" in
30457            zip)  echo "Unzipping $installdir/$filename..."
30458               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30459            ;;
30460            tar.gz) echo "Untaring $installdir/$filename..."
30461               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30462            ;;
30463            tgz) echo "Untaring $installdir/$filename..."
30464               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30465            ;;
30466            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30467            ;;
30468        esac
30469    fi
30470    if test -f $installdir/$filename.unpacked; then
30471        depdir=$installdir
30472    fi
30473
30474	    fi
30475            # Source the builddeps file again, because in the previous command, the depdir
30476            # was updated to point at the current build dependency install directory.
30477            . $builddepsfile
30478            # Now extract variables from the builddeps.conf files.
30479            theroot=${builddep_alsa_ROOT}
30480            thecflags=${builddep_alsa_CFLAGS}
30481            thelibs=${builddep_alsa_LIBS}
30482            if test "x$depdir" = x; then
30483                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30484            fi
30485            ALSA=$depdir
30486            if test "x$theroot" != x; then
30487               ALSA="$theroot"
30488            fi
30489            if test "x$thecflags" != x; then
30490               ALSA_CFLAGS="$thecflags"
30491            fi
30492            if test "x$thelibs" != x; then
30493               ALSA_LIBS="$thelibs"
30494            fi
30495            ALSA_FOUND=yes
30496            else ALSA_FOUND=no
30497
30498        fi
30499        else ALSA_FOUND=no
30500
30501    fi
30502
30503	fi
30504	if test "x$ALSA_FOUND" = xno; then
30505
30506pkg_failed=no
30507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30508$as_echo_n "checking for ALSA... " >&6; }
30509
30510if test -n "$ALSA_CFLAGS"; then
30511    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30512 elif test -n "$PKG_CONFIG"; then
30513    if test -n "$PKG_CONFIG" && \
30514    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30515  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30516  ac_status=$?
30517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30518  test $ac_status = 0; }; then
30519  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30520else
30521  pkg_failed=yes
30522fi
30523 else
30524    pkg_failed=untried
30525fi
30526if test -n "$ALSA_LIBS"; then
30527    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30528 elif test -n "$PKG_CONFIG"; then
30529    if test -n "$PKG_CONFIG" && \
30530    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30531  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30532  ac_status=$?
30533  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30534  test $ac_status = 0; }; then
30535  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30536else
30537  pkg_failed=yes
30538fi
30539 else
30540    pkg_failed=untried
30541fi
30542
30543
30544
30545if test $pkg_failed = yes; then
30546
30547if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30548        _pkg_short_errors_supported=yes
30549else
30550        _pkg_short_errors_supported=no
30551fi
30552        if test $_pkg_short_errors_supported = yes; then
30553	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30554        else
30555	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30556        fi
30557	# Put the nasty error message in config.log where it belongs
30558	echo "$ALSA_PKG_ERRORS" >&5
30559
30560	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30561$as_echo "no" >&6; }
30562                ALSA_FOUND=no
30563elif test $pkg_failed = untried; then
30564	ALSA_FOUND=no
30565else
30566	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30567	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30569$as_echo "yes" >&6; }
30570	ALSA_FOUND=yes
30571fi
30572	fi
30573	if test "x$ALSA_FOUND" = xno; then
30574	    for ac_header in alsa/asoundlib.h
30575do :
30576  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30577if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30578  cat >>confdefs.h <<_ACEOF
30579#define HAVE_ALSA_ASOUNDLIB_H 1
30580_ACEOF
30581 ALSA_FOUND=yes
30582	                      ALSA_CFLAGS=-Iignoreme
30583	                      ALSA_LIBS=-lasound
30584	                      DEFAULT_ALSA=yes
30585else
30586  ALSA_FOUND=no
30587fi
30588
30589done
30590
30591	fi
30592	if test "x$ALSA_FOUND" = xno; then
30593
30594    # Print a helpful message on how to acquire the necessary build dependency.
30595    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30596    MISSING_DEPENDENCY=alsa
30597    PKGHANDLER_COMMAND=
30598
30599    case $PKGHANDLER in
30600	apt-get)
30601                apt_help     $MISSING_DEPENDENCY ;;
30602    yum)
30603                yum_help     $MISSING_DEPENDENCY ;;
30604	port)
30605                port_help    $MISSING_DEPENDENCY ;;
30606	pkgutil)
30607                pkgutil_help $MISSING_DEPENDENCY ;;
30608	pkgadd)
30609                pkgadd_help  $MISSING_DEPENDENCY ;;
30610    * )
30611      break ;;
30612    esac
30613
30614    if test "x$PKGHANDLER_COMMAND" != x; then
30615        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30616    fi
30617
30618	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30619	fi
30620fi
30621
30622
30623
30624
30625
30626
30627
30628###############################################################################
30629#
30630# Check for the jpeg library
30631#
30632
30633USE_EXTERNAL_LIBJPEG=true
30634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30635$as_echo_n "checking for main in -ljpeg... " >&6; }
30636if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30637  $as_echo_n "(cached) " >&6
30638else
30639  ac_check_lib_save_LIBS=$LIBS
30640LIBS="-ljpeg  $LIBS"
30641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30642/* end confdefs.h.  */
30643
30644
30645int
30646main ()
30647{
30648return main ();
30649  ;
30650  return 0;
30651}
30652_ACEOF
30653if ac_fn_cxx_try_link "$LINENO"; then :
30654  ac_cv_lib_jpeg_main=yes
30655else
30656  ac_cv_lib_jpeg_main=no
30657fi
30658rm -f core conftest.err conftest.$ac_objext \
30659    conftest$ac_exeext conftest.$ac_ext
30660LIBS=$ac_check_lib_save_LIBS
30661fi
30662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30663$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30664if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30665  cat >>confdefs.h <<_ACEOF
30666#define HAVE_LIBJPEG 1
30667_ACEOF
30668
30669  LIBS="-ljpeg $LIBS"
30670
30671else
30672   USE_EXTERNAL_LIBJPEG=false
30673               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30674$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30675
30676fi
30677
30678
30679
30680###############################################################################
30681#
30682# Check for the gif library
30683#
30684
30685USE_EXTERNAL_LIBJPEG=true
30686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30687$as_echo_n "checking for main in -lgif... " >&6; }
30688if test "${ac_cv_lib_gif_main+set}" = set; then :
30689  $as_echo_n "(cached) " >&6
30690else
30691  ac_check_lib_save_LIBS=$LIBS
30692LIBS="-lgif  $LIBS"
30693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30694/* end confdefs.h.  */
30695
30696
30697int
30698main ()
30699{
30700return main ();
30701  ;
30702  return 0;
30703}
30704_ACEOF
30705if ac_fn_cxx_try_link "$LINENO"; then :
30706  ac_cv_lib_gif_main=yes
30707else
30708  ac_cv_lib_gif_main=no
30709fi
30710rm -f core conftest.err conftest.$ac_objext \
30711    conftest$ac_exeext conftest.$ac_ext
30712LIBS=$ac_check_lib_save_LIBS
30713fi
30714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30715$as_echo "$ac_cv_lib_gif_main" >&6; }
30716if test "x$ac_cv_lib_gif_main" = x""yes; then :
30717  cat >>confdefs.h <<_ACEOF
30718#define HAVE_LIBGIF 1
30719_ACEOF
30720
30721  LIBS="-lgif $LIBS"
30722
30723else
30724   USE_EXTERNAL_LIBGIF=false
30725               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30726$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30727
30728fi
30729
30730
30731
30732###############################################################################
30733#
30734# Check for the zlib library
30735#
30736
30737
30738# Check whether --with-zlib was given.
30739if test "${with_zlib+set}" = set; then :
30740  withval=$with_zlib;
30741fi
30742
30743
30744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30745$as_echo_n "checking for compress in -lz... " >&6; }
30746if test "${ac_cv_lib_z_compress+set}" = set; then :
30747  $as_echo_n "(cached) " >&6
30748else
30749  ac_check_lib_save_LIBS=$LIBS
30750LIBS="-lz  $LIBS"
30751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30752/* end confdefs.h.  */
30753
30754/* Override any GCC internal prototype to avoid an error.
30755   Use char because int might match the return type of a GCC
30756   builtin and then its argument prototype would still apply.  */
30757#ifdef __cplusplus
30758extern "C"
30759#endif
30760char compress ();
30761int
30762main ()
30763{
30764return compress ();
30765  ;
30766  return 0;
30767}
30768_ACEOF
30769if ac_fn_cxx_try_link "$LINENO"; then :
30770  ac_cv_lib_z_compress=yes
30771else
30772  ac_cv_lib_z_compress=no
30773fi
30774rm -f core conftest.err conftest.$ac_objext \
30775    conftest$ac_exeext conftest.$ac_ext
30776LIBS=$ac_check_lib_save_LIBS
30777fi
30778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30779$as_echo "$ac_cv_lib_z_compress" >&6; }
30780if test "x$ac_cv_lib_z_compress" = x""yes; then :
30781   ZLIB_FOUND=yes
30782else
30783   ZLIB_FOUND=no
30784fi
30785
30786
30787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30788$as_echo_n "checking for which zlib to use... " >&6; }
30789
30790DEFAULT_ZLIB=bundled
30791if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30792#
30793# On macosx default is system...on others default is
30794#
30795    DEFAULT_ZLIB=system
30796fi
30797
30798if test "x${ZLIB_FOUND}" != "xyes"; then
30799#
30800# If we don't find any system...set default to bundled
30801#
30802    DEFAULT_ZLIB=bundled
30803fi
30804
30805#
30806# If user didn't specify, use DEFAULT_ZLIB
30807#
30808if test "x${with_zlib}" = "x"; then
30809    with_zlib=${DEFAULT_ZLIB}
30810fi
30811
30812if test "x${with_zlib}" = "xbundled"; then
30813    USE_EXTERNAL_LIBZ=false
30814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30815$as_echo "bundled" >&6; }
30816elif test "x${with_zlib}" = "xsystem"; then
30817    if test "x${ZLIB_FOUND}" = "xyes"; then
30818        USE_EXTERNAL_LIBZ=true
30819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30820$as_echo "system" >&6; }
30821    else
30822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30823$as_echo "system not found" >&6; }
30824        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30825    fi
30826else
30827    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30828fi
30829
30830
30831
30832###############################################################################
30833LIBZIP_CAN_USE_MMAP=true
30834
30835
30836
30837###############################################################################
30838#
30839# Check if altzone exists in time.h
30840#
30841
30842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30843/* end confdefs.h.  */
30844#include <time.h>
30845int
30846main ()
30847{
30848return (int)altzone;
30849  ;
30850  return 0;
30851}
30852_ACEOF
30853if ac_fn_cxx_try_link "$LINENO"; then :
30854  has_altzone=yes
30855else
30856  has_altzone=no
30857fi
30858rm -f core conftest.err conftest.$ac_objext \
30859    conftest$ac_exeext conftest.$ac_ext
30860if test "x$has_altzone" = xyes; then
30861
30862$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30863
30864fi
30865
30866###############################################################################
30867#
30868# Check the maths library
30869#
30870
30871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30872$as_echo_n "checking for cos in -lm... " >&6; }
30873if test "${ac_cv_lib_m_cos+set}" = set; then :
30874  $as_echo_n "(cached) " >&6
30875else
30876  ac_check_lib_save_LIBS=$LIBS
30877LIBS="-lm  $LIBS"
30878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30879/* end confdefs.h.  */
30880
30881/* Override any GCC internal prototype to avoid an error.
30882   Use char because int might match the return type of a GCC
30883   builtin and then its argument prototype would still apply.  */
30884#ifdef __cplusplus
30885extern "C"
30886#endif
30887char cos ();
30888int
30889main ()
30890{
30891return cos ();
30892  ;
30893  return 0;
30894}
30895_ACEOF
30896if ac_fn_cxx_try_link "$LINENO"; then :
30897  ac_cv_lib_m_cos=yes
30898else
30899  ac_cv_lib_m_cos=no
30900fi
30901rm -f core conftest.err conftest.$ac_objext \
30902    conftest$ac_exeext conftest.$ac_ext
30903LIBS=$ac_check_lib_save_LIBS
30904fi
30905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30906$as_echo "$ac_cv_lib_m_cos" >&6; }
30907if test "x$ac_cv_lib_m_cos" = x""yes; then :
30908  cat >>confdefs.h <<_ACEOF
30909#define HAVE_LIBM 1
30910_ACEOF
30911
30912  LIBS="-lm $LIBS"
30913
30914else
30915
30916                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30917$as_echo "$as_me: Maths library was not found" >&6;}
30918
30919fi
30920
30921
30922
30923###############################################################################
30924#
30925# Check for libdl.so
30926
30927save_LIBS="$LIBS"
30928LIBS=""
30929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30930$as_echo_n "checking for dlopen in -ldl... " >&6; }
30931if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30932  $as_echo_n "(cached) " >&6
30933else
30934  ac_check_lib_save_LIBS=$LIBS
30935LIBS="-ldl  $LIBS"
30936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30937/* end confdefs.h.  */
30938
30939/* Override any GCC internal prototype to avoid an error.
30940   Use char because int might match the return type of a GCC
30941   builtin and then its argument prototype would still apply.  */
30942#ifdef __cplusplus
30943extern "C"
30944#endif
30945char dlopen ();
30946int
30947main ()
30948{
30949return dlopen ();
30950  ;
30951  return 0;
30952}
30953_ACEOF
30954if ac_fn_cxx_try_link "$LINENO"; then :
30955  ac_cv_lib_dl_dlopen=yes
30956else
30957  ac_cv_lib_dl_dlopen=no
30958fi
30959rm -f core conftest.err conftest.$ac_objext \
30960    conftest$ac_exeext conftest.$ac_ext
30961LIBS=$ac_check_lib_save_LIBS
30962fi
30963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30964$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30965if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30966  cat >>confdefs.h <<_ACEOF
30967#define HAVE_LIBDL 1
30968_ACEOF
30969
30970  LIBS="-ldl $LIBS"
30971
30972fi
30973
30974LIBDL="$LIBS"
30975
30976LIBS="$save_LIBS"
30977
30978
30979
30980###############################################################################
30981#
30982# statically link libstdc++ before C++ ABI is stablized on Linux unless
30983# dynamic build is configured on command line.
30984#
30985
30986# Check whether --with-stdc++lib was given.
30987if test "${with_stdc__lib+set}" = set; then :
30988  withval=$with_stdc__lib;
30989    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30990        && test "x$with_stdc__lib" != xdefault; then
30991      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30992    fi
30993
30994else
30995  with_stdc__lib=default
30996
30997fi
30998
30999
31000if test "x$OPENJDK_TARGET_OS" = xlinux; then
31001    # Test if -lstdc++ works.
31002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31003$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31004    ac_ext=cpp
31005ac_cpp='$CXXCPP $CPPFLAGS'
31006ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31007ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31008ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31009
31010    OLD_CXXFLAGS="$CXXFLAGS"
31011    CXXFLAGS="$CXXFLAGS -lstdc++"
31012    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31013/* end confdefs.h.  */
31014
31015int
31016main ()
31017{
31018return 0;
31019  ;
31020  return 0;
31021}
31022_ACEOF
31023if ac_fn_cxx_try_link "$LINENO"; then :
31024  has_dynamic_libstdcxx=yes
31025else
31026  has_dynamic_libstdcxx=no
31027fi
31028rm -f core conftest.err conftest.$ac_objext \
31029    conftest$ac_exeext conftest.$ac_ext
31030    CXXFLAGS="$OLD_CXXFLAGS"
31031    ac_ext=cpp
31032ac_cpp='$CXXCPP $CPPFLAGS'
31033ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31034ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31035ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31036
31037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31038$as_echo "$has_dynamic_libstdcxx" >&6; }
31039
31040    # Test if stdc++ can be linked statically.
31041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31042$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31043    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31044    ac_ext=cpp
31045ac_cpp='$CXXCPP $CPPFLAGS'
31046ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31047ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31048ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31049
31050    OLD_LIBS="$LIBS"
31051    OLD_CXX="$CXX"
31052    LIBS="$STATIC_STDCXX_FLAGS"
31053    CXX="$CC"
31054    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31055/* end confdefs.h.  */
31056
31057int
31058main ()
31059{
31060return 0;
31061  ;
31062  return 0;
31063}
31064_ACEOF
31065if ac_fn_cxx_try_link "$LINENO"; then :
31066  has_static_libstdcxx=yes
31067else
31068  has_static_libstdcxx=no
31069fi
31070rm -f core conftest.err conftest.$ac_objext \
31071    conftest$ac_exeext conftest.$ac_ext
31072    LIBS="$OLD_LIBS"
31073    CXX="$OLD_CXX"
31074    ac_ext=cpp
31075ac_cpp='$CXXCPP $CPPFLAGS'
31076ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31077ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31078ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31079
31080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31081$as_echo "$has_static_libstdcxx" >&6; }
31082
31083    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31084        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31085    fi
31086
31087    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31088        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31089    fi
31090
31091    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31092        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31093    fi
31094
31095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31096$as_echo_n "checking how to link with libstdc++... " >&6; }
31097    # If dynamic was requested, it's available since it would fail above otherwise.
31098    # If dynamic wasn't requested, go with static unless it isn't available.
31099    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31100        LIBCXX="$LIBCXX -lstdc++"
31101        LDCXX="$CXX"
31102        STATIC_CXX_SETTING="STATIC_CXX=false"
31103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31104$as_echo "dynamic" >&6; }
31105    else
31106        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31107        LDCXX="$CC"
31108        STATIC_CXX_SETTING="STATIC_CXX=true"
31109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31110$as_echo "static" >&6; }
31111    fi
31112fi
31113
31114
31115# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31116if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31117    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31118fi
31119
31120# TODO better (platform agnostic) test
31121if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31122    LIBCXX="-lstdc++"
31123fi
31124
31125
31126
31127
31128
31129# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31130
31131# When using cygwin or msys, we need a wrapper binary that renames
31132# /cygdrive/c/ arguments into c:/ arguments and peeks into
31133# @files and rewrites these too! This wrapper binary is
31134# called fixpath.
31135FIXPATH=
31136if test "x$OPENJDK_BUILD_OS" = xwindows; then
31137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31138$as_echo_n "checking if fixpath can be created... " >&6; }
31139    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31140    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31141    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31142      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31143      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31144      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31145      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31146    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31147      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31148      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31149
31150      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31151      # @ was chosen as separator to minimize risk of other tools messing around with it
31152      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31153      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31154
31155      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31156    fi
31157    rm -f $OUTPUT_ROOT/fixpath*
31158    cd $OUTPUT_ROOT
31159    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31160    cd $CURDIR
31161
31162    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31164$as_echo "no" >&6; }
31165        cat $OUTPUT_ROOT/fixpath1.log
31166        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31167    fi
31168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31169$as_echo "yes" >&6; }
31170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31171$as_echo_n "checking if fixpath.exe works... " >&6; }
31172    cd $OUTPUT_ROOT
31173    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31174    cd $CURDIR
31175    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31177$as_echo "no" >&6; }
31178        cat $OUTPUT_ROOT/fixpath2.log
31179        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31180    fi
31181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31182$as_echo "yes" >&6; }
31183    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31184fi
31185
31186
31187
31188
31189###############################################################################
31190#
31191# We need to do some final tweaking, when everything else is done.
31192#
31193###############################################################################
31194
31195
31196HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31197
31198
31199# The name of the Service Agent jar.
31200SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31201if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31202  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31203fi
31204
31205
31206
31207
31208###############################################################################
31209#
31210# Configure parts of the build that only affect the build performance,
31211# not the result.
31212#
31213###############################################################################
31214
31215
31216# How many cores do we have on this build system?
31217
31218# Check whether --with-num-cores was given.
31219if test "${with_num_cores+set}" = set; then :
31220  withval=$with_num_cores;
31221fi
31222
31223if test "x$with_num_cores" = x; then
31224    # The number of cores were not specified, try to probe them.
31225
31226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31227$as_echo_n "checking for number of cores... " >&6; }
31228    NUM_CORES=1
31229    FOUND_CORES=no
31230
31231    if test -f /proc/cpuinfo; then
31232        # Looks like a Linux (or cygwin) system
31233        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31234        FOUND_CORES=yes
31235    elif test -x /usr/sbin/psrinfo; then
31236        # Looks like a Solaris system
31237        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31238        FOUND_CORES=yes
31239    elif test -x /usr/sbin/system_profiler; then
31240        # Looks like a MacOSX system
31241        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31242        FOUND_CORES=yes
31243    elif test -n "$NUMBER_OF_PROCESSORS"; then
31244        # On windows, look in the env
31245        NUM_CORES=$NUMBER_OF_PROCESSORS
31246        FOUND_CORES=yes
31247    fi
31248
31249    # For c/c++ code we run twice as many concurrent build
31250    # jobs than we have cores, otherwise we will stall on io.
31251    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31252
31253    if test "x$FOUND_CORES" = xyes; then
31254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31255$as_echo "$NUM_CORES" >&6; }
31256    else
31257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31258$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31260$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31261    fi
31262
31263
31264else
31265    NUM_CORES=$with_num_cores
31266    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31267fi
31268
31269
31270
31271
31272# How much memory do we have on this build system?
31273
31274# Check whether --with-memory-size was given.
31275if test "${with_memory_size+set}" = set; then :
31276  withval=$with_memory_size;
31277fi
31278
31279if test "x$with_memory_size" = x; then
31280    # The memory size was not specified, try to probe it.
31281
31282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31283$as_echo_n "checking for memory size... " >&6; }
31284    # Default to 1024 MB
31285    MEMORY_SIZE=1024
31286    FOUND_MEM=no
31287
31288    if test -f /proc/meminfo; then
31289        # Looks like a Linux (or cygwin) system
31290        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31291        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31292        FOUND_MEM=yes
31293    elif test -x /usr/sbin/prtconf; then
31294        # Looks like a Solaris system
31295        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31296        FOUND_MEM=yes
31297    elif test -x /usr/sbin/system_profiler; then
31298        # Looks like a MacOSX system
31299        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31300        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31301        FOUND_MEM=yes
31302    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31303        # Windows, but without cygwin
31304        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31305        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31306        FOUND_MEM=yes
31307    fi
31308
31309    if test "x$FOUND_MEM" = xyes; then
31310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31311$as_echo "$MEMORY_SIZE MB" >&6; }
31312    else
31313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31314$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31316$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31317    fi
31318
31319else
31320    MEMORY_SIZE=$with_memory_size
31321fi
31322
31323
31324
31325# Setup smart javac (after cores and memory have been setup)
31326
31327
31328# Check whether --with-sjavac-server-java was given.
31329if test "${with_sjavac_server_java+set}" = set; then :
31330  withval=$with_sjavac_server_java;
31331fi
31332
31333
31334if test "x$with_sjavac_server_java" != x; then
31335    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31336    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31337    if test "x$FOUND_VERSION" = x; then
31338        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31339    fi
31340else
31341    SJAVAC_SERVER_JAVA=""
31342    # Hotspot specific options.
31343
31344    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31345    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31346    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31347    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31348    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31349        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31350    fi
31351
31352    # JRockit specific options.
31353
31354    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31355    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31356    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31357    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31358    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31359        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31360    fi
31361
31362    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31363fi
31364
31365
31366
31367# Check whether --with-sjavac-server-cores was given.
31368if test "${with_sjavac_server_cores+set}" = set; then :
31369  withval=$with_sjavac_server_cores;
31370fi
31371
31372if test "x$with_sjavac_server_cores" != x; then
31373    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31374else
31375    if test "$NUM_CORES" -gt 16; then
31376        # We set this arbitrary limit because we want to limit the heap
31377        # size of the javac server.
31378        # In the future we will make the javac compilers in the server
31379        # share more and more state, thus enabling us to use more and
31380        # more concurrent threads in the server.
31381        SJAVAC_SERVER_CORES="16"
31382    else
31383        SJAVAC_SERVER_CORES="$NUM_CORES"
31384    fi
31385
31386    if test "$MEMORY_SIZE" -gt "17000"; then
31387        MAX_HEAP_MEM=10000
31388
31389    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31390    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31391    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31392    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31393    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31394        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31395    fi
31396
31397
31398    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31399    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31400    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31401    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31402    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31403        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31404    fi
31405
31406    elif test "$MEMORY_SIZE" -gt "10000"; then
31407        MAX_HEAP_MEM=6000
31408
31409    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31410    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31411    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31412    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31413    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31414        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31415    fi
31416
31417
31418    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31419    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31420    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31421    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31422    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31423        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31424    fi
31425
31426    elif test "$MEMORY_SIZE" -gt "5000"; then
31427        MAX_HEAP_MEM=3000
31428
31429    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31430    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31431    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31432    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31433    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31434        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31435    fi
31436
31437
31438    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31439    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31440    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31441    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31442    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31443        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31444    fi
31445
31446    elif test "$MEMORY_SIZE" -gt "3800"; then
31447        MAX_HEAP_MEM=2500
31448
31449    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31450    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31451    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31452    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31453    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31454        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31455    fi
31456
31457    elif test "$MEMORY_SIZE" -gt "1900"; then
31458        MAX_HEAP_MEM=1200
31459
31460    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31461    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31462    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31463    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31464    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31465        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31466    fi
31467
31468    elif test "$MEMORY_SIZE" -gt "1000"; then
31469        MAX_HEAP_MEM=900
31470
31471    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31472    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31473    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31474    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31475    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31476        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31477    fi
31478
31479    else
31480        MAX_HEAP_MEM=512
31481
31482    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31483    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31484    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31485    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31486    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31487        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31488    fi
31489
31490    fi
31491
31492
31493    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31494    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31495    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31496    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31497    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31498        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31499    fi
31500
31501
31502    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31503    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31504    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31505    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31506    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31507        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31508    fi
31509
31510
31511    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31512    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31513    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31514    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31515    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31516        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31517    fi
31518
31519
31520    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31521    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31523$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31524        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31526$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31527    fi
31528fi
31529
31530
31531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31532$as_echo_n "checking whether to use sjavac... " >&6; }
31533# Check whether --enable-sjavac was given.
31534if test "${enable_sjavac+set}" = set; then :
31535  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31536else
31537  ENABLE_SJAVAC='no'
31538fi
31539
31540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31541$as_echo "$ENABLE_SJAVAC" >&6; }
31542
31543
31544if test "x$ENABLE_SJAVAC" = xyes; then
31545    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31546else
31547    SJAVAC_SERVER_DIR=
31548fi
31549
31550
31551
31552
31553# Can the C/C++ compiler use precompiled headers?
31554
31555
31556###############################################################################
31557#
31558# Can the C/C++ compiler use precompiled headers?
31559#
31560# Check whether --enable-precompiled-headers was given.
31561if test "${enable_precompiled_headers+set}" = set; then :
31562  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31563else
31564  ENABLE_PRECOMPH=yes
31565fi
31566
31567
31568USE_PRECOMPILED_HEADER=1
31569if test "x$ENABLE_PRECOMPH" = xno; then
31570    USE_PRECOMPILED_HEADER=0
31571fi
31572
31573if test "x$ENABLE_PRECOMPH" = xyes; then
31574    # Check that the compiler actually supports precomp headers.
31575    if test "x$GCC" = xyes; then
31576         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31577$as_echo_n "checking that precompiled headers work... " >&6; }
31578         echo "int alfa();" > conftest.h
31579         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31580         if test ! -f conftest.hpp.gch; then
31581             USE_PRECOMPILED_HEADER=0
31582             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31583$as_echo "no" >&6; }
31584         else
31585             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31586$as_echo "yes" >&6; }
31587         fi
31588         rm -f conftest.h conftest.hpp.gch
31589    fi
31590fi
31591
31592
31593
31594
31595# Setup use of ccache, if available
31596
31597    # Check whether --enable-ccache was given.
31598if test "${enable_ccache+set}" = set; then :
31599  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31600else
31601  ENABLE_CCACHE=yes
31602fi
31603
31604    if test "x$ENABLE_CCACHE" = xyes; then
31605        # Extract the first word of "ccache", so it can be a program name with args.
31606set dummy ccache; ac_word=$2
31607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31608$as_echo_n "checking for $ac_word... " >&6; }
31609if test "${ac_cv_path_CCACHE+set}" = set; then :
31610  $as_echo_n "(cached) " >&6
31611else
31612  case $CCACHE in
31613  [\\/]* | ?:[\\/]*)
31614  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31615  ;;
31616  *)
31617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31618for as_dir in $PATH
31619do
31620  IFS=$as_save_IFS
31621  test -z "$as_dir" && as_dir=.
31622    for ac_exec_ext in '' $ac_executable_extensions; do
31623  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31624    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31626    break 2
31627  fi
31628done
31629  done
31630IFS=$as_save_IFS
31631
31632  ;;
31633esac
31634fi
31635CCACHE=$ac_cv_path_CCACHE
31636if test -n "$CCACHE"; then
31637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31638$as_echo "$CCACHE" >&6; }
31639else
31640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31641$as_echo "no" >&6; }
31642fi
31643
31644
31645    else
31646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31647$as_echo_n "checking for ccache... " >&6; }
31648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31649$as_echo "explicitly disabled" >&6; }
31650        CCACHE=
31651    fi
31652
31653
31654
31655# Check whether --with-ccache-dir was given.
31656if test "${with_ccache_dir+set}" = set; then :
31657  withval=$with_ccache_dir;
31658fi
31659
31660
31661    if test "x$with_ccache_dir" != x; then
31662        # When using a non home ccache directory, assume the use is to share ccache files
31663        # with other users. Thus change the umask.
31664        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31665    fi
31666    CCACHE_FOUND=""
31667    if test "x$CCACHE" != x; then
31668
31669    if test "x$CCACHE" != x; then
31670        CCACHE_FOUND="true"
31671        # Only use ccache if it is 3.1.4 or later, which supports
31672        # precompiled headers.
31673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31674$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31675        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31676        if test "x$HAS_GOOD_CCACHE" = x; then
31677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31678$as_echo "no, disabling ccache" >&6; }
31679            CCACHE=
31680        else
31681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31682$as_echo "yes" >&6; }
31683            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31684$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31685            PUSHED_FLAGS="$CXXFLAGS"
31686            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31687            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31688/* end confdefs.h.  */
31689
31690int
31691main ()
31692{
31693
31694  ;
31695  return 0;
31696}
31697_ACEOF
31698if ac_fn_cxx_try_compile "$LINENO"; then :
31699  CC_KNOWS_CCACHE_TRICK=yes
31700else
31701  CC_KNOWS_CCACHE_TRICK=no
31702fi
31703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31704            CXXFLAGS="$PUSHED_FLAGS"
31705            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31706                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31707$as_echo "yes" >&6; }
31708            else
31709                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31710$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31711                CCACHE=
31712            fi
31713        fi
31714    fi
31715
31716    if test "x$CCACHE" != x; then
31717        CCACHE_SLOPPINESS=time_macros
31718        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31719        CCACHE_FLAGS=-fpch-preprocess
31720
31721        if test "x$SET_CCACHE_DIR" != x; then
31722            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31723	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31724        fi
31725    fi
31726
31727    fi
31728
31729
31730###############################################################################
31731#
31732# And now the finish...
31733#
31734###############################################################################
31735
31736# Check for some common pitfalls
31737
31738  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31739    file_to_test="$SRC_ROOT/LICENSE"
31740    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31741      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
31742    fi
31743  fi
31744
31745
31746
31747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31748$as_echo_n "checking if build directory is on local disk... " >&6; }
31749
31750	# df -l lists only local disks; if the given directory is not found then
31751	# a non-zero exit code is given
31752  if test "x$DF" = x; then
31753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31754      # msys does not have df; use Windows "net use" instead.
31755      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31756      if test "x$IS_NETWORK_DISK" = x; then
31757        OUTPUT_DIR_IS_LOCAL="yes"
31758      else
31759        OUTPUT_DIR_IS_LOCAL="no"
31760      fi
31761    else
31762      # No df here, say it's local
31763      OUTPUT_DIR_IS_LOCAL="yes"
31764    fi
31765  else
31766    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31767      OUTPUT_DIR_IS_LOCAL="yes"
31768    else
31769      OUTPUT_DIR_IS_LOCAL="no"
31770    fi
31771  fi
31772
31773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31774$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31775
31776
31777
31778# Check if the user has any old-style ALT_ variables set.
31779FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31780
31781# Before generating output files, test if they exist. If they do, this is a reconfigure.
31782# Since we can't properly handle the dependencies for this, warn the user about the situation
31783if test -e $OUTPUT_ROOT/spec.gmk; then
31784  IS_RECONFIGURE=yes
31785else
31786  IS_RECONFIGURE=no
31787fi
31788
31789if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31790  HIDE_PERFORMANCE_HINTS=yes
31791else
31792  HIDE_PERFORMANCE_HINTS=no
31793  # Hide it the next time around...
31794  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31795fi
31796
31797
31798
31799# At the end, call the custom hook. (Dummy macro if no custom sources available)
31800
31801
31802# We're messing a bit with internal autoconf variables to put the config.status
31803# in the output directory instead of the current directory.
31804CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31805# Create the actual output files. Now the main work of configure is done.
31806cat >confcache <<\_ACEOF
31807# This file is a shell script that caches the results of configure
31808# tests run on this system so they can be shared between configure
31809# scripts and configure runs, see configure's option --config-cache.
31810# It is not useful on other systems.  If it contains results you don't
31811# want to keep, you may remove or edit it.
31812#
31813# config.status only pays attention to the cache file if you give it
31814# the --recheck option to rerun configure.
31815#
31816# `ac_cv_env_foo' variables (set or unset) will be overridden when
31817# loading this file, other *unset* `ac_cv_foo' will be assigned the
31818# following values.
31819
31820_ACEOF
31821
31822# The following way of writing the cache mishandles newlines in values,
31823# but we know of no workaround that is simple, portable, and efficient.
31824# So, we kill variables containing newlines.
31825# Ultrix sh set writes to stderr and can't be redirected directly,
31826# and sets the high bit in the cache file unless we assign to the vars.
31827(
31828  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31829    eval ac_val=\$$ac_var
31830    case $ac_val in #(
31831    *${as_nl}*)
31832      case $ac_var in #(
31833      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31834$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31835      esac
31836      case $ac_var in #(
31837      _ | IFS | as_nl) ;; #(
31838      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31839      *) { eval $ac_var=; unset $ac_var;} ;;
31840      esac ;;
31841    esac
31842  done
31843
31844  (set) 2>&1 |
31845    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31846    *${as_nl}ac_space=\ *)
31847      # `set' does not quote correctly, so add quotes: double-quote
31848      # substitution turns \\\\ into \\, and sed turns \\ into \.
31849      sed -n \
31850	"s/'/'\\\\''/g;
31851	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31852      ;; #(
31853    *)
31854      # `set' quotes correctly as required by POSIX, so do not add quotes.
31855      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31856      ;;
31857    esac |
31858    sort
31859) |
31860  sed '
31861     /^ac_cv_env_/b end
31862     t clear
31863     :clear
31864     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31865     t end
31866     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31867     :end' >>confcache
31868if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31869  if test -w "$cache_file"; then
31870    test "x$cache_file" != "x/dev/null" &&
31871      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31872$as_echo "$as_me: updating cache $cache_file" >&6;}
31873    cat confcache >$cache_file
31874  else
31875    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31876$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31877  fi
31878fi
31879rm -f confcache
31880
31881test "x$prefix" = xNONE && prefix=$ac_default_prefix
31882# Let make expand exec_prefix.
31883test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31884
31885DEFS=-DHAVE_CONFIG_H
31886
31887ac_libobjs=
31888ac_ltlibobjs=
31889U=
31890for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31891  # 1. Remove the extension, and $U if already installed.
31892  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31893  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31894  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31895  #    will be set to the directory where LIBOBJS objects are built.
31896  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31897  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31898done
31899LIBOBJS=$ac_libobjs
31900
31901LTLIBOBJS=$ac_ltlibobjs
31902
31903
31904
31905: ${CONFIG_STATUS=./config.status}
31906ac_write_fail=0
31907ac_clean_files_save=$ac_clean_files
31908ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31909{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31910$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31911as_write_fail=0
31912cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31913#! $SHELL
31914# Generated by $as_me.
31915# Run this file to recreate the current configuration.
31916# Compiler output produced by configure, useful for debugging
31917# configure, is in config.log if it exists.
31918
31919debug=false
31920ac_cs_recheck=false
31921ac_cs_silent=false
31922
31923SHELL=\${CONFIG_SHELL-$SHELL}
31924export SHELL
31925_ASEOF
31926cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31927## -------------------- ##
31928## M4sh Initialization. ##
31929## -------------------- ##
31930
31931# Be more Bourne compatible
31932DUALCASE=1; export DUALCASE # for MKS sh
31933if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31934  emulate sh
31935  NULLCMD=:
31936  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31937  # is contrary to our usage.  Disable this feature.
31938  alias -g '${1+"$@"}'='"$@"'
31939  setopt NO_GLOB_SUBST
31940else
31941  case `(set -o) 2>/dev/null` in #(
31942  *posix*) :
31943    set -o posix ;; #(
31944  *) :
31945     ;;
31946esac
31947fi
31948
31949
31950as_nl='
31951'
31952export as_nl
31953# Printing a long string crashes Solaris 7 /usr/bin/printf.
31954as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31955as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31956as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31957# Prefer a ksh shell builtin over an external printf program on Solaris,
31958# but without wasting forks for bash or zsh.
31959if test -z "$BASH_VERSION$ZSH_VERSION" \
31960    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31961  as_echo='print -r --'
31962  as_echo_n='print -rn --'
31963elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31964  as_echo='printf %s\n'
31965  as_echo_n='printf %s'
31966else
31967  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31968    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31969    as_echo_n='/usr/ucb/echo -n'
31970  else
31971    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31972    as_echo_n_body='eval
31973      arg=$1;
31974      case $arg in #(
31975      *"$as_nl"*)
31976	expr "X$arg" : "X\\(.*\\)$as_nl";
31977	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31978      esac;
31979      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31980    '
31981    export as_echo_n_body
31982    as_echo_n='sh -c $as_echo_n_body as_echo'
31983  fi
31984  export as_echo_body
31985  as_echo='sh -c $as_echo_body as_echo'
31986fi
31987
31988# The user is always right.
31989if test "${PATH_SEPARATOR+set}" != set; then
31990  PATH_SEPARATOR=:
31991  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31992    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31993      PATH_SEPARATOR=';'
31994  }
31995fi
31996
31997
31998# IFS
31999# We need space, tab and new line, in precisely that order.  Quoting is
32000# there to prevent editors from complaining about space-tab.
32001# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32002# splitting by setting IFS to empty value.)
32003IFS=" ""	$as_nl"
32004
32005# Find who we are.  Look in the path if we contain no directory separator.
32006case $0 in #((
32007  *[\\/]* ) as_myself=$0 ;;
32008  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32009for as_dir in $PATH
32010do
32011  IFS=$as_save_IFS
32012  test -z "$as_dir" && as_dir=.
32013    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32014  done
32015IFS=$as_save_IFS
32016
32017     ;;
32018esac
32019# We did not find ourselves, most probably we were run as `sh COMMAND'
32020# in which case we are not to be found in the path.
32021if test "x$as_myself" = x; then
32022  as_myself=$0
32023fi
32024if test ! -f "$as_myself"; then
32025  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32026  exit 1
32027fi
32028
32029# Unset variables that we do not need and which cause bugs (e.g. in
32030# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32031# suppresses any "Segmentation fault" message there.  '((' could
32032# trigger a bug in pdksh 5.2.14.
32033for as_var in BASH_ENV ENV MAIL MAILPATH
32034do eval test x\${$as_var+set} = xset \
32035  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32036done
32037PS1='$ '
32038PS2='> '
32039PS4='+ '
32040
32041# NLS nuisances.
32042LC_ALL=C
32043export LC_ALL
32044LANGUAGE=C
32045export LANGUAGE
32046
32047# CDPATH.
32048(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32049
32050
32051# as_fn_error STATUS ERROR [LINENO LOG_FD]
32052# ----------------------------------------
32053# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32054# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32055# script with STATUS, using 1 if that was 0.
32056as_fn_error ()
32057{
32058  as_status=$1; test $as_status -eq 0 && as_status=1
32059  if test "$4"; then
32060    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32061    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32062  fi
32063  $as_echo "$as_me: error: $2" >&2
32064  as_fn_exit $as_status
32065} # as_fn_error
32066
32067
32068# as_fn_set_status STATUS
32069# -----------------------
32070# Set $? to STATUS, without forking.
32071as_fn_set_status ()
32072{
32073  return $1
32074} # as_fn_set_status
32075
32076# as_fn_exit STATUS
32077# -----------------
32078# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32079as_fn_exit ()
32080{
32081  set +e
32082  as_fn_set_status $1
32083  exit $1
32084} # as_fn_exit
32085
32086# as_fn_unset VAR
32087# ---------------
32088# Portably unset VAR.
32089as_fn_unset ()
32090{
32091  { eval $1=; unset $1;}
32092}
32093as_unset=as_fn_unset
32094# as_fn_append VAR VALUE
32095# ----------------------
32096# Append the text in VALUE to the end of the definition contained in VAR. Take
32097# advantage of any shell optimizations that allow amortized linear growth over
32098# repeated appends, instead of the typical quadratic growth present in naive
32099# implementations.
32100if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32101  eval 'as_fn_append ()
32102  {
32103    eval $1+=\$2
32104  }'
32105else
32106  as_fn_append ()
32107  {
32108    eval $1=\$$1\$2
32109  }
32110fi # as_fn_append
32111
32112# as_fn_arith ARG...
32113# ------------------
32114# Perform arithmetic evaluation on the ARGs, and store the result in the
32115# global $as_val. Take advantage of shells that can avoid forks. The arguments
32116# must be portable across $(()) and expr.
32117if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32118  eval 'as_fn_arith ()
32119  {
32120    as_val=$(( $* ))
32121  }'
32122else
32123  as_fn_arith ()
32124  {
32125    as_val=`expr "$@" || test $? -eq 1`
32126  }
32127fi # as_fn_arith
32128
32129
32130if expr a : '\(a\)' >/dev/null 2>&1 &&
32131   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32132  as_expr=expr
32133else
32134  as_expr=false
32135fi
32136
32137if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32138  as_basename=basename
32139else
32140  as_basename=false
32141fi
32142
32143if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32144  as_dirname=dirname
32145else
32146  as_dirname=false
32147fi
32148
32149as_me=`$as_basename -- "$0" ||
32150$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32151	 X"$0" : 'X\(//\)$' \| \
32152	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32153$as_echo X/"$0" |
32154    sed '/^.*\/\([^/][^/]*\)\/*$/{
32155	    s//\1/
32156	    q
32157	  }
32158	  /^X\/\(\/\/\)$/{
32159	    s//\1/
32160	    q
32161	  }
32162	  /^X\/\(\/\).*/{
32163	    s//\1/
32164	    q
32165	  }
32166	  s/.*/./; q'`
32167
32168# Avoid depending upon Character Ranges.
32169as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32170as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32171as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32172as_cr_digits='0123456789'
32173as_cr_alnum=$as_cr_Letters$as_cr_digits
32174
32175ECHO_C= ECHO_N= ECHO_T=
32176case `echo -n x` in #(((((
32177-n*)
32178  case `echo 'xy\c'` in
32179  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32180  xy)  ECHO_C='\c';;
32181  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32182       ECHO_T='	';;
32183  esac;;
32184*)
32185  ECHO_N='-n';;
32186esac
32187
32188rm -f conf$$ conf$$.exe conf$$.file
32189if test -d conf$$.dir; then
32190  rm -f conf$$.dir/conf$$.file
32191else
32192  rm -f conf$$.dir
32193  mkdir conf$$.dir 2>/dev/null
32194fi
32195if (echo >conf$$.file) 2>/dev/null; then
32196  if ln -s conf$$.file conf$$ 2>/dev/null; then
32197    as_ln_s='ln -s'
32198    # ... but there are two gotchas:
32199    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32200    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32201    # In both cases, we have to default to `cp -p'.
32202    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32203      as_ln_s='cp -p'
32204  elif ln conf$$.file conf$$ 2>/dev/null; then
32205    as_ln_s=ln
32206  else
32207    as_ln_s='cp -p'
32208  fi
32209else
32210  as_ln_s='cp -p'
32211fi
32212rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32213rmdir conf$$.dir 2>/dev/null
32214
32215
32216# as_fn_mkdir_p
32217# -------------
32218# Create "$as_dir" as a directory, including parents if necessary.
32219as_fn_mkdir_p ()
32220{
32221
32222  case $as_dir in #(
32223  -*) as_dir=./$as_dir;;
32224  esac
32225  test -d "$as_dir" || eval $as_mkdir_p || {
32226    as_dirs=
32227    while :; do
32228      case $as_dir in #(
32229      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32230      *) as_qdir=$as_dir;;
32231      esac
32232      as_dirs="'$as_qdir' $as_dirs"
32233      as_dir=`$as_dirname -- "$as_dir" ||
32234$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32235	 X"$as_dir" : 'X\(//\)[^/]' \| \
32236	 X"$as_dir" : 'X\(//\)$' \| \
32237	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32238$as_echo X"$as_dir" |
32239    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32240	    s//\1/
32241	    q
32242	  }
32243	  /^X\(\/\/\)[^/].*/{
32244	    s//\1/
32245	    q
32246	  }
32247	  /^X\(\/\/\)$/{
32248	    s//\1/
32249	    q
32250	  }
32251	  /^X\(\/\).*/{
32252	    s//\1/
32253	    q
32254	  }
32255	  s/.*/./; q'`
32256      test -d "$as_dir" && break
32257    done
32258    test -z "$as_dirs" || eval "mkdir $as_dirs"
32259  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32260
32261
32262} # as_fn_mkdir_p
32263if mkdir -p . 2>/dev/null; then
32264  as_mkdir_p='mkdir -p "$as_dir"'
32265else
32266  test -d ./-p && rmdir ./-p
32267  as_mkdir_p=false
32268fi
32269
32270if test -x / >/dev/null 2>&1; then
32271  as_test_x='test -x'
32272else
32273  if ls -dL / >/dev/null 2>&1; then
32274    as_ls_L_option=L
32275  else
32276    as_ls_L_option=
32277  fi
32278  as_test_x='
32279    eval sh -c '\''
32280      if test -d "$1"; then
32281	test -d "$1/.";
32282      else
32283	case $1 in #(
32284	-*)set "./$1";;
32285	esac;
32286	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32287	???[sx]*):;;*)false;;esac;fi
32288    '\'' sh
32289  '
32290fi
32291as_executable_p=$as_test_x
32292
32293# Sed expression to map a string onto a valid CPP name.
32294as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32295
32296# Sed expression to map a string onto a valid variable name.
32297as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32298
32299
32300exec 6>&1
32301## ----------------------------------- ##
32302## Main body of $CONFIG_STATUS script. ##
32303## ----------------------------------- ##
32304_ASEOF
32305test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32306
32307cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32308# Save the log message, to keep $0 and so on meaningful, and to
32309# report actual input values of CONFIG_FILES etc. instead of their
32310# values after options handling.
32311ac_log="
32312This file was extended by OpenJDK $as_me jdk8, which was
32313generated by GNU Autoconf 2.67.  Invocation command line was
32314
32315  CONFIG_FILES    = $CONFIG_FILES
32316  CONFIG_HEADERS  = $CONFIG_HEADERS
32317  CONFIG_LINKS    = $CONFIG_LINKS
32318  CONFIG_COMMANDS = $CONFIG_COMMANDS
32319  $ $0 $@
32320
32321on `(hostname || uname -n) 2>/dev/null | sed 1q`
32322"
32323
32324_ACEOF
32325
32326case $ac_config_files in *"
32327"*) set x $ac_config_files; shift; ac_config_files=$*;;
32328esac
32329
32330case $ac_config_headers in *"
32331"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32332esac
32333
32334
32335cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32336# Files that config.status was made for.
32337config_files="$ac_config_files"
32338config_headers="$ac_config_headers"
32339
32340_ACEOF
32341
32342cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32343ac_cs_usage="\
32344\`$as_me' instantiates files and other configuration actions
32345from templates according to the current configuration.  Unless the files
32346and actions are specified as TAGs, all are instantiated by default.
32347
32348Usage: $0 [OPTION]... [TAG]...
32349
32350  -h, --help       print this help, then exit
32351  -V, --version    print version number and configuration settings, then exit
32352      --config     print configuration, then exit
32353  -q, --quiet, --silent
32354                   do not print progress messages
32355  -d, --debug      don't remove temporary files
32356      --recheck    update $as_me by reconfiguring in the same conditions
32357      --file=FILE[:TEMPLATE]
32358                   instantiate the configuration file FILE
32359      --header=FILE[:TEMPLATE]
32360                   instantiate the configuration header FILE
32361
32362Configuration files:
32363$config_files
32364
32365Configuration headers:
32366$config_headers
32367
32368Report bugs to <build-dev@openjdk.java.net>.
32369OpenJDK home page: <http://openjdk.java.net>."
32370
32371_ACEOF
32372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32373ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32374ac_cs_version="\\
32375OpenJDK config.status jdk8
32376configured by $0, generated by GNU Autoconf 2.67,
32377  with options \\"\$ac_cs_config\\"
32378
32379Copyright (C) 2010 Free Software Foundation, Inc.
32380This config.status script is free software; the Free Software Foundation
32381gives unlimited permission to copy, distribute and modify it."
32382
32383ac_pwd='$ac_pwd'
32384srcdir='$srcdir'
32385AWK='$AWK'
32386test -n "\$AWK" || AWK=awk
32387_ACEOF
32388
32389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32390# The default lists apply if the user does not specify any file.
32391ac_need_defaults=:
32392while test $# != 0
32393do
32394  case $1 in
32395  --*=?*)
32396    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32397    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32398    ac_shift=:
32399    ;;
32400  --*=)
32401    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32402    ac_optarg=
32403    ac_shift=:
32404    ;;
32405  *)
32406    ac_option=$1
32407    ac_optarg=$2
32408    ac_shift=shift
32409    ;;
32410  esac
32411
32412  case $ac_option in
32413  # Handling of the options.
32414  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32415    ac_cs_recheck=: ;;
32416  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32417    $as_echo "$ac_cs_version"; exit ;;
32418  --config | --confi | --conf | --con | --co | --c )
32419    $as_echo "$ac_cs_config"; exit ;;
32420  --debug | --debu | --deb | --de | --d | -d )
32421    debug=: ;;
32422  --file | --fil | --fi | --f )
32423    $ac_shift
32424    case $ac_optarg in
32425    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32426    '') as_fn_error $? "missing file argument" ;;
32427    esac
32428    as_fn_append CONFIG_FILES " '$ac_optarg'"
32429    ac_need_defaults=false;;
32430  --header | --heade | --head | --hea )
32431    $ac_shift
32432    case $ac_optarg in
32433    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32434    esac
32435    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32436    ac_need_defaults=false;;
32437  --he | --h)
32438    # Conflict between --help and --header
32439    as_fn_error $? "ambiguous option: \`$1'
32440Try \`$0 --help' for more information.";;
32441  --help | --hel | -h )
32442    $as_echo "$ac_cs_usage"; exit ;;
32443  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32444  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32445    ac_cs_silent=: ;;
32446
32447  # This is an error.
32448  -*) as_fn_error $? "unrecognized option: \`$1'
32449Try \`$0 --help' for more information." ;;
32450
32451  *) as_fn_append ac_config_targets " $1"
32452     ac_need_defaults=false ;;
32453
32454  esac
32455  shift
32456done
32457
32458ac_configure_extra_args=
32459
32460if $ac_cs_silent; then
32461  exec 6>/dev/null
32462  ac_configure_extra_args="$ac_configure_extra_args --silent"
32463fi
32464
32465_ACEOF
32466cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32467if \$ac_cs_recheck; then
32468  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32469  shift
32470  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32471  CONFIG_SHELL='$SHELL'
32472  export CONFIG_SHELL
32473  exec "\$@"
32474fi
32475
32476_ACEOF
32477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32478exec 5>>config.log
32479{
32480  echo
32481  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32482## Running $as_me. ##
32483_ASBOX
32484  $as_echo "$ac_log"
32485} >&5
32486
32487_ACEOF
32488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32489_ACEOF
32490
32491cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32492
32493# Handling of arguments.
32494for ac_config_target in $ac_config_targets
32495do
32496  case $ac_config_target in
32497    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32498    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32499    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32500    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32501    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32502    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32503    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32504
32505  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32506  esac
32507done
32508
32509
32510# If the user did not use the arguments to specify the items to instantiate,
32511# then the envvar interface is used.  Set only those that are not.
32512# We use the long form for the default assignment because of an extremely
32513# bizarre bug on SunOS 4.1.3.
32514if $ac_need_defaults; then
32515  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32516  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32517fi
32518
32519# Have a temporary directory for convenience.  Make it in the build tree
32520# simply because there is no reason against having it here, and in addition,
32521# creating and moving files from /tmp can sometimes cause problems.
32522# Hook for its removal unless debugging.
32523# Note that there is a small window in which the directory will not be cleaned:
32524# after its creation but before its name has been assigned to `$tmp'.
32525$debug ||
32526{
32527  tmp=
32528  trap 'exit_status=$?
32529  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32530' 0
32531  trap 'as_fn_exit 1' 1 2 13 15
32532}
32533# Create a (secure) tmp directory for tmp files.
32534
32535{
32536  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32537  test -n "$tmp" && test -d "$tmp"
32538}  ||
32539{
32540  tmp=./conf$$-$RANDOM
32541  (umask 077 && mkdir "$tmp")
32542} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32543
32544# Set up the scripts for CONFIG_FILES section.
32545# No need to generate them if there are no CONFIG_FILES.
32546# This happens for instance with `./config.status config.h'.
32547if test -n "$CONFIG_FILES"; then
32548
32549
32550ac_cr=`echo X | tr X '\015'`
32551# On cygwin, bash can eat \r inside `` if the user requested igncr.
32552# But we know of no other shell where ac_cr would be empty at this
32553# point, so we can use a bashism as a fallback.
32554if test "x$ac_cr" = x; then
32555  eval ac_cr=\$\'\\r\'
32556fi
32557ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32558if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32559  ac_cs_awk_cr='\\r'
32560else
32561  ac_cs_awk_cr=$ac_cr
32562fi
32563
32564echo 'BEGIN {' >"$tmp/subs1.awk" &&
32565_ACEOF
32566
32567
32568{
32569  echo "cat >conf$$subs.awk <<_ACEOF" &&
32570  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32571  echo "_ACEOF"
32572} >conf$$subs.sh ||
32573  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32574ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32575ac_delim='%!_!# '
32576for ac_last_try in false false false false false :; do
32577  . ./conf$$subs.sh ||
32578    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32579
32580  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32581  if test $ac_delim_n = $ac_delim_num; then
32582    break
32583  elif $ac_last_try; then
32584    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32585  else
32586    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32587  fi
32588done
32589rm -f conf$$subs.sh
32590
32591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32592cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32593_ACEOF
32594sed -n '
32595h
32596s/^/S["/; s/!.*/"]=/
32597p
32598g
32599s/^[^!]*!//
32600:repl
32601t repl
32602s/'"$ac_delim"'$//
32603t delim
32604:nl
32605h
32606s/\(.\{148\}\)..*/\1/
32607t more1
32608s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32609p
32610n
32611b repl
32612:more1
32613s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32614p
32615g
32616s/.\{148\}//
32617t nl
32618:delim
32619h
32620s/\(.\{148\}\)..*/\1/
32621t more2
32622s/["\\]/\\&/g; s/^/"/; s/$/"/
32623p
32624b
32625:more2
32626s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32627p
32628g
32629s/.\{148\}//
32630t delim
32631' <conf$$subs.awk | sed '
32632/^[^""]/{
32633  N
32634  s/\n//
32635}
32636' >>$CONFIG_STATUS || ac_write_fail=1
32637rm -f conf$$subs.awk
32638cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32639_ACAWK
32640cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32641  for (key in S) S_is_set[key] = 1
32642  FS = ""
32643
32644}
32645{
32646  line = $ 0
32647  nfields = split(line, field, "@")
32648  substed = 0
32649  len = length(field[1])
32650  for (i = 2; i < nfields; i++) {
32651    key = field[i]
32652    keylen = length(key)
32653    if (S_is_set[key]) {
32654      value = S[key]
32655      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32656      len += length(value) + length(field[++i])
32657      substed = 1
32658    } else
32659      len += 1 + keylen
32660  }
32661
32662  print line
32663}
32664
32665_ACAWK
32666_ACEOF
32667cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32668if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32669  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32670else
32671  cat
32672fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32673  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32674_ACEOF
32675
32676# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32677# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32678# trailing colons and then remove the whole line if VPATH becomes empty
32679# (actually we leave an empty line to preserve line numbers).
32680if test "x$srcdir" = x.; then
32681  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32682h
32683s///
32684s/^/:/
32685s/[	 ]*$/:/
32686s/:\$(srcdir):/:/g
32687s/:\${srcdir}:/:/g
32688s/:@srcdir@:/:/g
32689s/^:*//
32690s/:*$//
32691x
32692s/\(=[	 ]*\).*/\1/
32693G
32694s/\n//
32695s/^[^=]*=[	 ]*$//
32696}'
32697fi
32698
32699cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32700fi # test -n "$CONFIG_FILES"
32701
32702# Set up the scripts for CONFIG_HEADERS section.
32703# No need to generate them if there are no CONFIG_HEADERS.
32704# This happens for instance with `./config.status Makefile'.
32705if test -n "$CONFIG_HEADERS"; then
32706cat >"$tmp/defines.awk" <<\_ACAWK ||
32707BEGIN {
32708_ACEOF
32709
32710# Transform confdefs.h into an awk script `defines.awk', embedded as
32711# here-document in config.status, that substitutes the proper values into
32712# config.h.in to produce config.h.
32713
32714# Create a delimiter string that does not exist in confdefs.h, to ease
32715# handling of long lines.
32716ac_delim='%!_!# '
32717for ac_last_try in false false :; do
32718  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32719  if test -z "$ac_t"; then
32720    break
32721  elif $ac_last_try; then
32722    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32723  else
32724    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32725  fi
32726done
32727
32728# For the awk script, D is an array of macro values keyed by name,
32729# likewise P contains macro parameters if any.  Preserve backslash
32730# newline sequences.
32731
32732ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32733sed -n '
32734s/.\{148\}/&'"$ac_delim"'/g
32735t rset
32736:rset
32737s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32738t def
32739d
32740:def
32741s/\\$//
32742t bsnl
32743s/["\\]/\\&/g
32744s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32745D["\1"]=" \3"/p
32746s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32747d
32748:bsnl
32749s/["\\]/\\&/g
32750s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32751D["\1"]=" \3\\\\\\n"\\/p
32752t cont
32753s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32754t cont
32755d
32756:cont
32757n
32758s/.\{148\}/&'"$ac_delim"'/g
32759t clear
32760:clear
32761s/\\$//
32762t bsnlc
32763s/["\\]/\\&/g; s/^/"/; s/$/"/p
32764d
32765:bsnlc
32766s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32767b cont
32768' <confdefs.h | sed '
32769s/'"$ac_delim"'/"\\\
32770"/g' >>$CONFIG_STATUS || ac_write_fail=1
32771
32772cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32773  for (key in D) D_is_set[key] = 1
32774  FS = ""
32775}
32776/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32777  line = \$ 0
32778  split(line, arg, " ")
32779  if (arg[1] == "#") {
32780    defundef = arg[2]
32781    mac1 = arg[3]
32782  } else {
32783    defundef = substr(arg[1], 2)
32784    mac1 = arg[2]
32785  }
32786  split(mac1, mac2, "(") #)
32787  macro = mac2[1]
32788  prefix = substr(line, 1, index(line, defundef) - 1)
32789  if (D_is_set[macro]) {
32790    # Preserve the white space surrounding the "#".
32791    print prefix "define", macro P[macro] D[macro]
32792    next
32793  } else {
32794    # Replace #undef with comments.  This is necessary, for example,
32795    # in the case of _POSIX_SOURCE, which is predefined and required
32796    # on some systems where configure will not decide to define it.
32797    if (defundef == "undef") {
32798      print "/*", prefix defundef, macro, "*/"
32799      next
32800    }
32801  }
32802}
32803{ print }
32804_ACAWK
32805_ACEOF
32806cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32807  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32808fi # test -n "$CONFIG_HEADERS"
32809
32810
32811eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32812shift
32813for ac_tag
32814do
32815  case $ac_tag in
32816  :[FHLC]) ac_mode=$ac_tag; continue;;
32817  esac
32818  case $ac_mode$ac_tag in
32819  :[FHL]*:*);;
32820  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32821  :[FH]-) ac_tag=-:-;;
32822  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32823  esac
32824  ac_save_IFS=$IFS
32825  IFS=:
32826  set x $ac_tag
32827  IFS=$ac_save_IFS
32828  shift
32829  ac_file=$1
32830  shift
32831
32832  case $ac_mode in
32833  :L) ac_source=$1;;
32834  :[FH])
32835    ac_file_inputs=
32836    for ac_f
32837    do
32838      case $ac_f in
32839      -) ac_f="$tmp/stdin";;
32840      *) # Look for the file first in the build tree, then in the source tree
32841	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32842	 # because $ac_f cannot contain `:'.
32843	 test -f "$ac_f" ||
32844	   case $ac_f in
32845	   [\\/$]*) false;;
32846	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32847	   esac ||
32848	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32849      esac
32850      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32851      as_fn_append ac_file_inputs " '$ac_f'"
32852    done
32853
32854    # Let's still pretend it is `configure' which instantiates (i.e., don't
32855    # use $as_me), people would be surprised to read:
32856    #    /* config.h.  Generated by config.status.  */
32857    configure_input='Generated from '`
32858	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32859	`' by configure.'
32860    if test x"$ac_file" != x-; then
32861      configure_input="$ac_file.  $configure_input"
32862      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32863$as_echo "$as_me: creating $ac_file" >&6;}
32864    fi
32865    # Neutralize special characters interpreted by sed in replacement strings.
32866    case $configure_input in #(
32867    *\&* | *\|* | *\\* )
32868       ac_sed_conf_input=`$as_echo "$configure_input" |
32869       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32870    *) ac_sed_conf_input=$configure_input;;
32871    esac
32872
32873    case $ac_tag in
32874    *:-:* | *:-) cat >"$tmp/stdin" \
32875      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32876    esac
32877    ;;
32878  esac
32879
32880  ac_dir=`$as_dirname -- "$ac_file" ||
32881$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32882	 X"$ac_file" : 'X\(//\)[^/]' \| \
32883	 X"$ac_file" : 'X\(//\)$' \| \
32884	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32885$as_echo X"$ac_file" |
32886    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32887	    s//\1/
32888	    q
32889	  }
32890	  /^X\(\/\/\)[^/].*/{
32891	    s//\1/
32892	    q
32893	  }
32894	  /^X\(\/\/\)$/{
32895	    s//\1/
32896	    q
32897	  }
32898	  /^X\(\/\).*/{
32899	    s//\1/
32900	    q
32901	  }
32902	  s/.*/./; q'`
32903  as_dir="$ac_dir"; as_fn_mkdir_p
32904  ac_builddir=.
32905
32906case "$ac_dir" in
32907.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32908*)
32909  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32910  # A ".." for each directory in $ac_dir_suffix.
32911  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32912  case $ac_top_builddir_sub in
32913  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32914  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32915  esac ;;
32916esac
32917ac_abs_top_builddir=$ac_pwd
32918ac_abs_builddir=$ac_pwd$ac_dir_suffix
32919# for backward compatibility:
32920ac_top_builddir=$ac_top_build_prefix
32921
32922case $srcdir in
32923  .)  # We are building in place.
32924    ac_srcdir=.
32925    ac_top_srcdir=$ac_top_builddir_sub
32926    ac_abs_top_srcdir=$ac_pwd ;;
32927  [\\/]* | ?:[\\/]* )  # Absolute name.
32928    ac_srcdir=$srcdir$ac_dir_suffix;
32929    ac_top_srcdir=$srcdir
32930    ac_abs_top_srcdir=$srcdir ;;
32931  *) # Relative name.
32932    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32933    ac_top_srcdir=$ac_top_build_prefix$srcdir
32934    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32935esac
32936ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32937
32938
32939  case $ac_mode in
32940  :F)
32941  #
32942  # CONFIG_FILE
32943  #
32944
32945_ACEOF
32946
32947cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32948# If the template does not know about datarootdir, expand it.
32949# FIXME: This hack should be removed a few years after 2.60.
32950ac_datarootdir_hack=; ac_datarootdir_seen=
32951ac_sed_dataroot='
32952/datarootdir/ {
32953  p
32954  q
32955}
32956/@datadir@/p
32957/@docdir@/p
32958/@infodir@/p
32959/@localedir@/p
32960/@mandir@/p'
32961case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32962*datarootdir*) ac_datarootdir_seen=yes;;
32963*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32964  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32965$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32966_ACEOF
32967cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32968  ac_datarootdir_hack='
32969  s&@datadir@&$datadir&g
32970  s&@docdir@&$docdir&g
32971  s&@infodir@&$infodir&g
32972  s&@localedir@&$localedir&g
32973  s&@mandir@&$mandir&g
32974  s&\\\${datarootdir}&$datarootdir&g' ;;
32975esac
32976_ACEOF
32977
32978# Neutralize VPATH when `$srcdir' = `.'.
32979# Shell code in configure.ac might set extrasub.
32980# FIXME: do we really want to maintain this feature?
32981cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32982ac_sed_extra="$ac_vpsub
32983$extrasub
32984_ACEOF
32985cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32986:t
32987/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32988s|@configure_input@|$ac_sed_conf_input|;t t
32989s&@top_builddir@&$ac_top_builddir_sub&;t t
32990s&@top_build_prefix@&$ac_top_build_prefix&;t t
32991s&@srcdir@&$ac_srcdir&;t t
32992s&@abs_srcdir@&$ac_abs_srcdir&;t t
32993s&@top_srcdir@&$ac_top_srcdir&;t t
32994s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32995s&@builddir@&$ac_builddir&;t t
32996s&@abs_builddir@&$ac_abs_builddir&;t t
32997s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32998$ac_datarootdir_hack
32999"
33000eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33001  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33002
33003test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33004  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33005  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33006  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33007which seems to be undefined.  Please make sure it is defined" >&5
33008$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33009which seems to be undefined.  Please make sure it is defined" >&2;}
33010
33011  rm -f "$tmp/stdin"
33012  case $ac_file in
33013  -) cat "$tmp/out" && rm -f "$tmp/out";;
33014  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33015  esac \
33016  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33017 ;;
33018  :H)
33019  #
33020  # CONFIG_HEADER
33021  #
33022  if test x"$ac_file" != x-; then
33023    {
33024      $as_echo "/* $configure_input  */" \
33025      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33026    } >"$tmp/config.h" \
33027      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33028    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33029      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33030$as_echo "$as_me: $ac_file is unchanged" >&6;}
33031    else
33032      rm -f "$ac_file"
33033      mv "$tmp/config.h" "$ac_file" \
33034	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33035    fi
33036  else
33037    $as_echo "/* $configure_input  */" \
33038      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33039      || as_fn_error $? "could not create -" "$LINENO" 5
33040  fi
33041 ;;
33042
33043
33044  esac
33045
33046done # for ac_tag
33047
33048
33049as_fn_exit 0
33050_ACEOF
33051ac_clean_files=$ac_clean_files_save
33052
33053test $ac_write_fail = 0 ||
33054  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33055
33056
33057# configure is writing to config.log, and then calls config.status.
33058# config.status does its own redirection, appending to config.log.
33059# Unfortunately, on DOS this fails, as config.log is still kept open
33060# by configure, so config.status won't be able to write to it; its
33061# output is simply discarded.  So we exec the FD to /dev/null,
33062# effectively closing config.log, so it can be properly (re)opened and
33063# appended to by config.status.  When coming back to configure, we
33064# need to make the FD available again.
33065if test "$no_create" != yes; then
33066  ac_cs_success=:
33067  ac_config_status_args=
33068  test "$silent" = yes &&
33069    ac_config_status_args="$ac_config_status_args --quiet"
33070  exec 5>/dev/null
33071  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33072  exec 5>>config.log
33073  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33074  # would make configure fail if this is the last instruction.
33075  $ac_cs_success || as_fn_exit 1
33076fi
33077if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33078  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33079$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33080fi
33081
33082
33083# Make the compare script executable
33084$CHMOD +x $OUTPUT_ROOT/compare.sh
33085
33086# Finally output some useful information to the user
33087
33088# Finally output some useful information to the user
33089
33090if test "x$CCACHE_FOUND" != x; then
33091	if  test "x$HAS_GOOD_CCACHE" = x; then
33092		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33093		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33094	else
33095		CCACHE_STATUS="installed and in use"
33096	fi
33097else
33098	if test "x$GCC" = xyes; then
33099		CCACHE_STATUS="not installed (consider installing)"
33100		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33101	else
33102		CCACHE_STATUS="not available for your system"
33103	fi
33104fi
33105
33106printf "\n"
33107printf "====================================================\n"
33108printf "A new configuration has been successfully created in\n"
33109printf "$OUTPUT_ROOT\n"
33110if test "x$CONFIGURE_COMMAND_LINE" != x; then
33111	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33112else
33113	printf "using default settings.\n"
33114fi
33115
33116printf "\n"
33117printf "Configuration summary:\n"
33118printf "* Debug level:    $DEBUG_LEVEL\n"
33119printf "* JDK variant:    $JDK_VARIANT\n"
33120printf "* JVM variants:   $with_jvm_variants\n"
33121printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33122
33123printf "\n"
33124printf "Tools summary:\n"
33125if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33126  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33127fi
33128printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33129printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33130printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33131
33132printf "\n"
33133printf "Build performance summary:\n"
33134printf "* Cores to use:   $NUM_CORES\n"
33135printf "* Memory limit:   $MEMORY_SIZE MB\n"
33136printf "* ccache status:  $CCACHE_STATUS\n"
33137printf "\n"
33138
33139if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33140	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33141	printf "$CCACHE_HELP_MSG\n"
33142
33143    # Print a helpful message on how to acquire the necessary build dependency.
33144    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33145    MISSING_DEPENDENCY=ccache
33146    PKGHANDLER_COMMAND=
33147
33148    case $PKGHANDLER in
33149	apt-get)
33150                apt_help     $MISSING_DEPENDENCY ;;
33151    yum)
33152                yum_help     $MISSING_DEPENDENCY ;;
33153	port)
33154                port_help    $MISSING_DEPENDENCY ;;
33155	pkgutil)
33156                pkgutil_help $MISSING_DEPENDENCY ;;
33157	pkgadd)
33158                pkgadd_help  $MISSING_DEPENDENCY ;;
33159    * )
33160      break ;;
33161    esac
33162
33163    if test "x$PKGHANDLER_COMMAND" != x; then
33164        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33165    fi
33166
33167	printf "$HELP_MSG\n"
33168	printf "\n"
33169fi
33170
33171if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33172	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33173	printf "will result in longer build times.\n"
33174	printf "\n"
33175fi
33176
33177if test "x$FOUND_ALT_VARIABLES" != "x"; then
33178	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33179	printf "These are not respected, and will be ignored. It is recommended\n"
33180	printf "that you clean your environment. The following variables are set:\n"
33181	printf "$FOUND_ALT_VARIABLES\n"
33182	printf "\n"
33183fi
33184
33185if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33186	printf "WARNING: Your build output directory is not on a local disk.\n"
33187	printf "This will severely degrade build performance!\n"
33188	printf "It is recommended that you create an output directory on a local disk,\n"
33189	printf "and run the configure script again from that directory.\n"
33190	printf "\n"
33191fi
33192
33193if test "x$IS_RECONFIGURE" = "xyes"; then
33194	printf "WARNING: The result of this configuration has overridden an older\n"
33195	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33196	printf "proper build. Failure to do so might result in strange build problems.\n"
33197	printf "\n"
33198fi
33199
33200